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.cpp
Signature and schema smoke
Commandnpm run example -- cpp signature_schema.cpp
Env
None
provider_mapping_no_key.cpp
OpenAI-compatible mapping smoke
Commandnpm run example -- cpp provider_mapping_no_key.cpp
Env
None
provider_stream_no_key.cpp
OpenAI-compatible streaming smoke
Commandnpm run example -- cpp provider_stream_no_key.cpp
Env
None
Provider API examples
axgen_openai_api.cpp
AxGen OpenAI API run
Commandnpm run example -- cpp axgen_openai_api.cpp
EnvOPENAI_API_KEY, OPENAI_APIKEY
agent_openai_api.cpp
AxAgent OpenAI API run
Commandnpm run example -- cpp agent_openai_api.cpp
EnvOPENAI_API_KEY, OPENAI_APIKEY
flow_openai_api.cpp
AxFlow OpenAI API run
Commandnpm run example -- cpp flow_openai_api.cpp
EnvOPENAI_API_KEY, OPENAI_APIKEY
LLM, media, and realtime examples
audio_responses_mapping.cpp
OpenAI Responses audio mapping
Commandnpm run example -- cpp audio_responses_mapping.cpp
Env
None
realtime_audio_events.cpp
Grok and Gemini realtime event folding
Commandnpm run example -- cpp realtime_audio_events.cpp
Env
None
Agent and RLM examples
axagent_pipeline.cpp
Deterministic AxAgent forward and logs
Commandnpm run example -- cpp axagent_pipeline.cpp
Env
None
runtime_adapter.cpp
Custom AxCodeRuntime session
Commandnpm run example -- cpp runtime_adapter.cpp
Env
None
mcp_scripted_tools.cpp
MCP scripted transport tools
Commandnpm run example -- cpp mcp_scripted_tools.cpp
Env
None
Flow examples
axflow_program_graph.cpp
Deterministic AxFlow graph
Commandnpm run example -- cpp axflow_program_graph.cpp
Env
None
Optimization examples
optimizer_artifact.cpp
Optimizer artifact apply round trip
Commandnpm run example -- cpp optimizer_artifact.cpp
Env
None
gepa_local_optimizer.cpp
Local GEPA engine run
Commandnpm run example -- cpp gepa_local_optimizer.cpp
Env
None
Other examples
axgen_scripted_client_tool.cpp
AxGen scripted client and tool
Commandnpm run example -- cpp axgen_scripted_client_tool.cpp
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/cpp/examples