You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Runnable examples demonstrating every feature of the Agentspan TypeScript SDK.
200+ runnable examples in total: the core examples cataloged below, plus
the quickstart/ guides and framework ports for Google ADK,
LangGraph, OpenAI Agents SDK, and Vercel AI SDK.
Examples vs. Production
Every example uses runtime.run() for convenience. In production, you should not.
Examples call runtime.run() so you can try them in a single command — no setup, no
separate processes. But run() blocks the caller until the agent finishes, which is fine
for demos but not how you deploy real agents.
Production: Deploy → Serve → Run
In production, the three concerns are separated:
┌──────────────────────────────────────────────────────────────┐
│ 1. DEPLOY (once, during CI/CD) │
│ Registers the agent definition with the Conductor server │
│ │
│ await runtime.deploy(agent); │
│ // or CLI: agentspan deploy --package my-agents │
├──────────────────────────────────────────────────────────────┤
│ 2. SERVE (long-running worker process) │
│ Listens for tool-call tasks and executes them │
│ │
│ await runtime.serve(agent); │
│ // typically run as a daemon or container │
├──────────────────────────────────────────────────────────────┤
│ 3. RUN (on-demand, from anywhere) │
│ Triggers an agent execution │
│ │
│ agentspan run <agent-name> "prompt" │
│ // or SDK: await runtime.run("agent_name", "prompt"); │
│ // or REST API │
└──────────────────────────────────────────────────────────────┘
Every example includes the deploy/serve pattern as commented code at the bottom of its
main() function — look for the // Production pattern: comment.
The core examples (numbered files in this directory) are repository examples.
They resolve @io-orkes/conductor-javascript/agents straight to the repo's
src/agents/ sources (via this directory's tsconfig.json paths), so they are
meant to be run from this checkout of the SDK:
# from the repository root
npm install
Framework-specific examples require additional packages. Install only what you need:
1.1. Copy/paste into your own project
If you want to copy an example into a separate project after npm install, switch
its imports to the published package: