Plug in your tools
Connect MCP servers and APIs once. Credentials stay in a vault, out of every sandbox.
-
Store tokens in a vault
Tokens live in the Vault's Connection Durable Object, never inside the sandbox.
Read the docsconst vault = await client.waitForPending( await client.vaults.create({ display_name: "Support tools" }),)curl --fail-with-body -X POST "$CHECKFU_BASE_URL/v1/vaults" \ -H "Authorization: Bearer $CHECKFU_API_KEY" \ -H "Content-Type: application/json" \ -d '{"display_name":"Support tools"}'checkfu vaults create --display-name "Support tools"{ "name": "vaults_createVault", "arguments": { "body": { "display_name": "Support tools" } }}# vaults/support.yamldisplay_name: Support tools -
Attach MCP and OpenAPI tools
Set per-tool approval rules. Calls pause for approval by default unless allowed.
Read the docsconst agent = await client.waitForPending( await client.agents.create({ name: "Docs helper", model: "claude-sonnet-5-5", mcp_servers: [{ type: "url", name: "docs", url: "https://mcp.example.com/mcp" }], tools: [ { type: "mcp_toolset", mcp_server_name: "docs", default_config: { permission_policy: { type: "always_allow" } }, configs: [{ name: "delete_page", permission_policy: { type: "always_ask" } }], }, ], }),)curl --fail-with-body -X POST "$CHECKFU_BASE_URL/v1/agents" \ -H "Authorization: Bearer $CHECKFU_API_KEY" \ -H "Content-Type: application/json" \ -d @docs-helper.jsoncheckfu agents create < docs-helper.json{ "name": "agents_createAgent", "arguments": { "body": { "name": "Docs helper", "model": "claude-sonnet-5-5", "mcp_servers": [{ "type": "url", "name": "docs", "url": "https://mcp.example.com/mcp" }] } }}---name: Docs helpermodel: claude-sonnet-5-5mcp_servers: - type: url name: docs url: https://mcp.example.com/mcptools: - type: mcp_toolset mcp_server_name: docs default_config: permission_policy: { type: always_allow } configs: - name: delete_page permission_policy: { type: always_ask }--- -
Answer custom tools in your app
When an agent calls a custom tool, the turn pauses at zero compute until you post the result.
Read the docsfor await (const event of await client.sessions.events.stream(session.id)) { if (event.type === "session.status_idle" && event.stop_reason.type === "requires_action") { await client.sessions.events.send(session.id, { events: [ { type: "user.custom_tool_result", custom_tool_use_id: event.stop_reason.event_ids[0]!, content: [{ type: "text", text: "Order 1042 shipped." }], }, ], }) break }}curl --fail-with-body -X POST "$CHECKFU_BASE_URL/v1/sessions/$SESSION_ID/events" \ -H "Authorization: Bearer $CHECKFU_API_KEY" \ -H "Content-Type: application/json" \ -d '{"events":[{"type":"user.custom_tool_result","custom_tool_use_id":"evt_123","content":[{"type":"text","text":"Order 1042 shipped."}]}]}'checkfu sessions:events send --session-id "$SESSION_ID" \ --event '{"type":"user.custom_tool_result","custom_tool_use_id":"evt_123","content":[{"type":"text","text":"Order 1042 shipped."}]}'{ "name": "sessions_sendSessionEvents", "arguments": { "path": { "session_id": "sess_123" }, "body": { "events": [ { "type": "user.custom_tool_result", "custom_tool_use_id": "evt_123", "content": [{ "type": "text", "text": "Order 1042 shipped." }] } ] } }}events: - type: user.custom_tool_result custom_tool_use_id: evt_123 content: [{ type: text, text: "Order 1042 shipped." }]
Managed agents for any harness
Pick the harness and model. Checkfu runs everything around them.