With the SDK tools
streamText and in a Next.js route: the agent calls Doconda on your server and the API key
never reaches the browser.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Doconda in the Vercel AI SDK, with any model.
npm install ai @doconda/sdk
import { anthropic } from "@ai-sdk/anthropic"
import { generateText, isStepCount, jsonSchema, tool } from "ai"
import { Doconda } from "@doconda/sdk"
const doconda = new Doconda()
const tools = Object.fromEntries(
doconda.tools().map((t) => [
t.name,
tool({ description: t.description, inputSchema: jsonSchema(t.inputSchema), execute: (input) => t.run(input as Record<string, unknown>) }),
]),
)
const { text } = await generateText({
model: anthropic("claude-sonnet-5-5"), // or any other provider
tools,
stopWhen: isStepCount(5),
prompt: "Create a 5-slide presentation on our quarterly results",
})
streamText and in a Next.js route: the agent calls Doconda on your server and the API key
never reaches the browser.
npm install @ai-sdk/mcp
import { createMCPClient } from "@ai-sdk/mcp"
const doconda = await createMCPClient({
transport: {
type: "http",
url: "https://api.eu.doconda.com/mcp",
headers: { Authorization: `Bearer ${process.env.DOCONDA_API_KEY}` },
},
})
const { text } = await generateText({ model, tools: await doconda.tools(), stopWhen: isStepCount(5), prompt: "…" })
await doconda.close()