Skip to content

Examples

Use examples by task first, then by language. Go reference and cross-language examples live in the repository examples/ directory. Language-specific examples live under language/<language>/examples/ so they are included in the dedicated language mirror repositories. For the thirteen-theme, thirty-language matrix, see Language Coverage.

Choose by Task

Task Example Notes
Run a real model Live Model Golden Path Published package, OpenAI-compatible endpoint, one get_time(zone) tool
Connect another provider or MCP Provider and MCP walkthrough, MCP tutorial Published-package adapters, local MCP clients, and transport boundaries
Host MCP tools language/python/examples/mcp, language/typescript/examples/mcp, language/csharp/examples/mcp, language/rust/examples/mcp, language/java/examples/mcp, language/ruby/examples/mcp, language/php/examples/mcp, language/elixir/examples/mcp, language/erlang/examples/mcp, language/lua/examples/mcp, language/r/examples/mcp, language/c/examples/mcp, language/cpp/examples/mcp, language/fortran/examples/mcp, language/cobol/examples/mcp In-process or stdio MCP clients with deterministic tool discovery and calls
Add provider fallback language/python/examples/provider-fallback, language/typescript/examples/provider-fallback, language/csharp/examples/provider-fallback, language/rust/examples/provider-fallback, language/ruby/examples/provider-fallback, language/php/examples/provider-fallback, language/c/examples/provider-fallback, language/cpp/examples/provider-fallback, language/fortran/examples/provider-fallback, language/elixir/examples/provider-fallback, language/erlang/examples/provider-fallback, language/lua/examples/provider-fallback, language/r/examples/provider-fallback, language/cobol/examples/provider-fallback, language/java/examples/provider-fallback Primary model failure falls back to a second model; deterministic tests
Retry transient model failures language/python/examples/retry, language/typescript/examples/retry, language/csharp/examples/retry, language/rust/examples/retry, language/java/examples/retry, language/ruby/examples/retry, language/php/examples/retry, language/c/examples/retry, language/cpp/examples/retry, language/fortran/examples/retry, language/elixir/examples/retry, language/erlang/examples/retry, language/lua/examples/retry, language/r/examples/retry, language/cobol/examples/retry Bounded model middleware retries only retryable errors and preserves exhausted failures
Observe agent events language/python/examples/event-sink, language/typescript/examples/event-sink, language/csharp/examples/event-sink, language/rust/examples/event-sink, language/java/examples/event-sink, language/ruby/examples/event-sink, language/php/examples/event-sink, language/c/examples/event-sink, language/cpp/examples/event-sink, language/fortran/examples/event-sink, language/elixir/examples/event-sink, language/erlang/examples/event-sink, language/lua/examples/event-sink, language/r/examples/event-sink, language/cobol/examples/event-sink run.started, tool.call, run.completed, and FilterSink with deterministic tests
Stream a response language/python/examples/streaming, language/typescript/examples/streaming, language/csharp/examples/streaming, language/rust/examples/streaming, language/ruby/examples/streaming, language/php/examples/streaming, language/c/examples/streaming, language/cpp/examples/streaming, language/fortran/examples/streaming, language/elixir/examples/streaming, language/erlang/examples/streaming, language/lua/examples/streaming, language/r/examples/streaming, language/cobol/examples/streaming, language/java/examples/streaming Delta callbacks reconstruct the final output; deterministic fake streaming models
Verify installation and denial Consumer starters Published package plus deterministic allow/deny checks
Produce validated JSON Structured Output tutorial Python, TypeScript, Java, C#, and Rust StructuredOutput with deterministic fake-model tests
Validate structured output language/python/examples/structured-output, language/typescript/examples/structured-output, language/csharp/examples/structured-output, language/rust/examples/structured-output, language/java/examples/structured-output, language/ruby/examples/structured-output, language/php/examples/structured-output, language/c/examples/structured-output, language/cpp/examples/structured-output, language/fortran/examples/structured-output, language/elixir/examples/structured-output, language/erlang/examples/structured-output, language/lua/examples/structured-output, language/r/examples/structured-output, language/cobol/examples/structured-output JSON Schema validation; valid output accepted and invalid output rejected
Build a workspace agent Workspace Agent tutorial Read-only published-package Go application
Embed in an application Application Integration Checklist Risk-tiered checklist for read-only, side-effecting, and high-risk deployments
Run Core behind HTTP Embedded HTTP service tutorial, examples/embedded-service-auth, language/python/examples/service, language/python/examples/service-auth, language/typescript/examples/service, language/typescript/examples/service-auth, language/csharp/examples/service, language/rust/examples/service, language/java/examples/service, language/ruby/examples/service, language/php/examples/service, language/c/examples/service, language/cpp/examples/service, language/fortran/examples/service, language/elixir/examples/service, language/erlang/examples/service, language/lua/examples/service, language/r/examples/service, language/cobol/examples/service Go/Python/TypeScript/C#/Rust/Java/Ruby/PHP/C/C++/Fortran/Elixir/Erlang/Lua/R/COBOL services plus authenticated HMAC token and tenant-policy variants
Explore the Go reference examples/reference Go reference application
Add policy and approvals examples/governed-workspace Go example of governed execution boundaries
Enforce identity and policy language/python/examples/identity-policy, language/typescript/examples/identity-policy, language/csharp/examples/identity-policy, language/rust/examples/identity-policy, language/java/examples/identity-policy, language/ruby/examples/identity-policy, language/php/examples/identity-policy, language/c/examples/identity-policy, language/cpp/examples/identity-policy, language/fortran/examples/identity-policy, language/elixir/examples/identity-policy, language/erlang/examples/identity-policy, language/lua/examples/identity-policy, language/r/examples/identity-policy, language/cobol/examples/identity-policy Trusted principal binding, model-claim rejection, and pre-effect denial
Add checkpoints examples/checkpoint Go checkpoint-store example
Persist checkpoints language/python/examples/checkpoint, language/typescript/examples/checkpoint, language/csharp/examples/checkpoint, language/rust/examples/checkpoint, language/java/examples/checkpoint, language/ruby/examples/checkpoint, language/php/examples/checkpoint, language/c/examples/checkpoint, language/cpp/examples/checkpoint, language/fortran/examples/checkpoint, language/elixir/examples/checkpoint, language/erlang/examples/checkpoint, language/lua/examples/checkpoint, language/r/examples/checkpoint, language/cobol/examples/checkpoint Application-owned storage with allowlisted payloads; latest-record round trip and unregistered-type rejection
Add a plugin examples/plugin Go process/WASM plugin host example
Delegate work examples/multiagent Go local delegation example
Use focused recipes examples/recipes Go recipes for providers, events, retries, VFS, and related seams
Integrate an ecosystem component examples/ecosystem Optional AxisVela adapter shapes

Prototype Paths

Pick one path and finish it before adding another integration. These groups are guidance, not release gates.

Group Outcome Start with
Basic Install a published package, call a tool, and deny one unsafe call Quickstart, Live Model Golden Path, Consumer starters
Integration Add one real boundary: MCP, provider fallback, structured output, streaming, or HTTP service Provider and MCP walkthrough, Structured Output tutorial, Embedded HTTP service tutorial
Hardening Make one integration safe to deny, approve, persist, retry, or cancel Identity and policy, Application Integration Checklist, Consumer test template
Advanced Add plugins, delegation, long-running operations, workspace providers, or embodied seams Plugin guide, Multi-agent patterns, Long-running operations

The primary SDKs share the same task-oriented catalog, but each language keeps its own install command and executable example. A Go example is not evidence that another SDK's example runs.

Examples vs Recipes

  • examples/recipes contains Go-focused copy-paste recipes and scoped test evidence.
  • examples/ contains runnable projects, including published-package and language-specific integrations.

Topics such as structured output, checkpoint stores, identity, VFS containment, and long-running operations appear in both forms. Use the recipe for the mechanism and the example for an application-shaped integration; do not copy both into one project.

By Language

Language Examples
Go examples/
Python language/python/examples
TypeScript language/typescript/examples
Java language/java/examples
C# language/csharp/examples
Rust language/rust/examples
Ruby language/ruby/examples
PHP language/php/examples
C language/c/examples
C++ language/cpp/examples
Fortran language/fortran/examples
Erlang language/erlang/examples
R language/r/examples
COBOL language/cobol/examples
Elixir language/elixir/examples
Lua language/lua/examples

Each language example directory has its own README with installation and run commands. Every Core language includes consumer and live-model entries; hitl and session-checkpoint are present where the language declares those capabilities. See Language Coverage for the explicit not-applicable lists. Python, TypeScript, Java, Rust, C#, and other Core implementations remain independently versioned; use the language matrix for current support. The only complete end-to-end prototype tutorial today is the Go Workspace Agent tutorial; the other primary SDKs have task-focused examples but still need a comparable tutorial.

How Examples Are Organized

  • examples/ contains Go reference examples and cross-language integrations.
  • language/<language>/examples/ contains language-specific runnable examples.
  • Language examples are copied into the corresponding discovery mirror.
  • Examples that install a published package do not require a repository checkout or local package replacement.

Do not treat examples as production security profiles. Identity, durable approvals, effect reconciliation, and isolation remain application responsibilities.