Examples
Examples are grouped by what they prove and by whether they need real provider credentials. Start with no-key examples for deterministic protocol, runtime, and generated-package behavior. Use provider-api examples when you want the live provider request path.
Quick no-key starters
signature_schema.rs
Signature and schema smoke
Commandnpm run example -- rust signature_schema.rs
Env
None
provider_mapping_no_key.rs
OpenAI-compatible mapping smoke
Commandnpm run example -- rust provider_mapping_no_key.rs
Env
None
provider_stream_no_key.rs
OpenAI-compatible streaming smoke
Commandnpm run example -- rust provider_stream_no_key.rs
Env
None
Provider API examples
axgen_openai_api.rs
AxGen OpenAI API run
Commandnpm run example -- rust axgen_openai_api.rs
EnvOPENAI_API_KEY, OPENAI_APIKEY
agent_openai_api.rs
AxAgent OpenAI API run
Commandnpm run example -- rust agent_openai_api.rs
EnvOPENAI_API_KEY, OPENAI_APIKEY
flow_openai_api.rs
AxFlow OpenAI API run
Commandnpm run example -- rust flow_openai_api.rs
EnvOPENAI_API_KEY, OPENAI_APIKEY
LLM, media, and realtime examples
audio_responses_mapping.rs
OpenAI Responses audio mapping
Commandnpm run example -- rust audio_responses_mapping.rs
Env
None
realtime_audio_events.rs
Grok and Gemini realtime event folding
Commandnpm run example -- rust realtime_audio_events.rs
Env
None
Agent and RLM examples
axagent_pipeline.rs
Deterministic AxAgent forward and logs
Commandnpm run example -- rust axagent_pipeline.rs
Env
None
runtime_adapter.rs
Custom AxCodeRuntime session
Commandnpm run example -- rust runtime_adapter.rs
Env
None
runtime_protocol.rs
Process AxCodeRuntime protocol
Commandnpm run example -- rust runtime_protocol.rs
Env
None
mcp_scripted_tools.rs
MCP scripted transport tools
Commandnpm run example -- rust mcp_scripted_tools.rs
Env
None
Flow examples
axflow_program_graph.rs
Deterministic AxFlow graph
Commandnpm run example -- rust axflow_program_graph.rs
Env
None
Optimization examples
optimizer_artifact.rs
Optimizer artifact smoke
Commandnpm run example -- rust optimizer_artifact.rs
Env
None
gepa_local_optimizer.rs
Local GEPA engine run
Commandnpm run example -- rust gepa_local_optimizer.rs
Env
None
Other examples
axgen_scripted_client_tool.rs
AxGen scripted client and tool
Commandnpm run example -- rust axgen_scripted_client_tool.rs
Env
None
How To Read These
No keyexamples use scripted clients, protocol adapters, or generated package tests.Provider APIexamples make real HTTP calls and list the environment variables they normally need.- Generated language examples live under each package’s
examplesdirectory. - TypeScript examples live under
src/examples.
Source
- Catalog:
npm run example -- list/scripts/run-example.mjs - Files:
packages/rust/examples