$git clone https://github.com/Kong/volcano-agent-sdkThe TypeScript SDK for Multi-Provider AI Agents
| 1 | [](https://github.com/Kong/volcano-agent-sdk/actions/workflows/ci.yml) |
| 2 | [](LICENSE) |
| 3 | [](https://www.npmjs.com/package/@volcano.dev/agent) |
| 4 | |
| 5 | # 🌋 Volcano Agent SDK |
| 6 | |
| 7 | **The TypeScript SDK for Multi-Provider AI Agents** |
| 8 | |
| 9 | Build agents that chain LLM reasoning with MCP tools. Mix OpenAI, Claude, Mistral in one workflow. Parallel execution, branching, loops. Native retries, streaming, and typed errors. |
| 10 | |
| 11 | 📚 **[Read the full documentation at volcano.dev →](https://volcano.dev/)** |
| 12 | |
| 13 | ## ✨ Features |
| 14 | |
| 15 | <table> |
| 16 | <tr> |
| 17 | <td width="33%"> |
| 18 | |
| 19 | ### 🤖 Automatic Tool Selection |
| 20 | LLM automatically picks which MCP tools to call based on your prompt. No manual routing needed. |
| 21 | |
| 22 | </td> |
| 23 | <td width="33%"> |
| 24 | |
| 25 | ### 🧩 Multi-Agent Crews |
| 26 | Define specialized agents and let the coordinator autonomously delegate tasks. Like automatic tool selection, but for agents. |
| 27 | |
| 28 | </td> |
| 29 | <td width="33%"> |
| 30 | |
| 31 | ### 💬 Conversational Results |
| 32 | Ask questions about what your agent did. Use `.summary()` or `.ask()` instead of parsing JSON. |
| 33 | |
| 34 | </td> |
| 35 | </tr> |
| 36 | |
| 37 | <tr> |
| 38 | <td width="33%"> |
| 39 | |
| 40 | ### 🔧 100s of Models |
| 41 | OpenAI, Anthropic, Mistral, Bedrock, Vertex, Azure. Switch providers per-step or globally. |
| 42 | |
| 43 | </td> |
| 44 | <td width="33%"> |
| 45 | |
| 46 | ### 🔄 Advanced Patterns |
| 47 | Parallel execution, branching, loops, sub-agent composition. Enterprise-grade workflow control. |
| 48 | |
| 49 | </td> |
| 50 | <td width="33%"> |
| 51 | |
| 52 | ### 📡 Streaming |
| 53 | Stream tokens in real-time as LLMs generate them. Perfect for chat UIs and SSE endpoints. |
| 54 | |
| 55 | </td> |
| 56 | </tr> |
| 57 | |
| 58 | <tr> |
| 59 | <td width="33%"> |
| 60 | |
| 61 | ### 🛡️ TypeScript-First |
| 62 | Full type safety with IntelliSense. Catch errors before runtime. |
| 63 | |
| 64 | </td> |
| 65 | <td width="33%"> |
| 66 | |
| 67 | ### 📊 Observability |
| 68 | OpenTelemetry traces and metrics. Export to Jaeger, Prometheus, DataDog, or any OTLP backend. |
| 69 | |
| 70 | </td> |
| 71 | <td width="33%"> |
| 72 | |
| 73 | ### ⚡ Production-Ready |
| 74 | Built-in retries, timeouts, error handling, and connection pooling. Battle-tested at scale. |
| 75 | |
| 76 | </td> |
| 77 | </tr> |
| 78 | </table> |
| 79 | |
| 80 | **[Explore all features →](https://volcano.dev/docs#key-features)** |
| 81 | |
| 82 | ## Quick Start |
| 83 | |
| 84 | ### Installation |
| 85 | |
| 86 | ```bash |
| 87 | npm install @volcano.dev/agent |
| 88 | ``` |
| 89 | |
| 90 | That's it! Includes MCP support and all common LLM providers (OpenAI, Anthropic, Mistral, Llama, Vertex). |
| 91 | |
| 92 | **[View installation guide →](https://volcano.dev/docs#installation)** |
| 93 | |
| 94 | ### Hello World with Automatic Tool Selection |
| 95 | |
| 96 | ```ts |
| 97 | import { agent, llmOpenAI, mcp } from "@volcano.dev/agent"; |
| 98 | |
| 99 | const llm = llmOpenAI({ |
| 100 | apiKey: process.env.OPENAI_API_KEY!, |
| 101 | model: "gpt-4o-mini" |
| 102 | }); |
| 103 | |
| 104 | const weather = mcp("http://localhost:8001/mcp"); |
| 105 | const tasks = mcp("http://localhost:8002/mcp"); |
| 106 | |
| 107 | // Agent automatically picks the right tools |
| 108 | const results = await agent({ llm }) |
| 109 | .then({ |
| 110 | prompt: "What's the weather in Seattle? If it will rain, create a task to bring an umbrella", |
| 111 | mcps: [weather, tasks] // LLM chooses which tools to call |
| 112 | }) |
| 113 | .run(); |
| 114 | |
| 115 | // Ask questions about what happened |
| 116 | const summary = await results.summary(llm); |
| 117 | console.log(summary); |
| 118 | ``` |
| 119 | |
| 120 | ### Multi-Agent Coordinator |
| 121 | |
| 122 | ```ts |
| 123 | import { agent, llmOpenAI } from "@volcano.dev/agent"; |
| 124 | |
| 125 | const llm = llmOpenAI({ apiKey: process.env.OPENAI_API_KEY! }); |
| 126 | |
| 127 | // Define specialized agents |
| 128 | const researcher = agent({ llm, name: 'researcher', description: 'Finds facts and data' }) |
| 129 | .then({ prompt: "Research the topic." }) |
| 130 | .then({ prompt: "Summarize the research." }); |
| 131 | |
| 132 | const writer = agent({ llm, name: 'writer', description: 'Creates content' }) |
| 133 | .then({ prompt: "Write content." }); |
| 134 | |
| 135 | // Coordinator autonomously delegates to specialists |
| 136 | const results = await agent({ llm }) |
| 137 | .then({ |
| 138 | prompt: "Write a blog post about quantum computing", |
| 139 | agents: [researcher, writer] // Coordinator decides when done |
| 140 | }) |
| 141 | .run(); |
| 142 | |
| 143 | // Ask what happened |
| 144 | const post = await results.ask(llm, "Show me the final blog post"); |
| 145 | console.log(post); |
| 146 | ``` |
| 147 | |
| 148 | **[View more examples →](https://volcano.dev/docs/examples)** |
| 149 | |
| 150 | ## Documentation |
| 151 | |
| 152 | ### 📖 Comprehensive Guides |