Managed agents for any harness
Open-source agent infrastructure for the right harness, model, and context.
$npm install -g checkfu && $checkfu deploy 1import Checkfu from "@checkfu/sdk"
2
3const client = new Checkfu()
4
5const agent = await client.waitForPending(
6 await client.agents.create({
7 name: "Reviewer",
8 harness: "opencode",
9 model: "anthropic/claude-sonnet-5-5",
10 system: "Review pull requests. Say what to change and why.",
11 }),
12)
1curl --fail-with-body -X POST "$CHECKFU_BASE_URL/v1/agents" \
2 -H "Authorization: Bearer $CHECKFU_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "name": "Reviewer",
6 "harness": "opencode",
7 "model": "anthropic/claude-sonnet-5-5",
8 "system": "Review pull requests. Say what to change and why."
9 }'
1checkfu agents create \
2 --name Reviewer \
3 --harness opencode \
4 --model anthropic/claude-sonnet-5-5 \
5 --system @agents/reviewer.md
1{
2 "name": "agents_createAgent",
3 "arguments": {
4 "body": {
5 "name": "Reviewer",
6 "harness": "opencode",
7 "model": "anthropic/claude-sonnet-5-5",
8 "system": "Review pull requests. Say what to change and why."
9 }
10 }
11}
1---
2# agents/reviewer.md
3name: Reviewer
4harness: opencode
5model: anthropic/claude-sonnet-5-5
6---
7
8Review pull requests. Say what to change and why.
Isolated sandboxes
Set packages and network rules once. Each session gets its own sandbox.
Learn more about environment →1const environment = await client.waitForPending(
2 await client.environments.create({
3 name: "locked-down",
4 config: {
5 type: "cloud",
6 setup: { packages: { npm: ["typescript", "vitest"] } },
7 networking: {
8 type: "limited",
9 allowed_hosts: ["github.com"],
10 allow_package_managers: true,
11 allow_mcp_servers: true,
12 },
13 },
14 }),
15)
1curl --fail-with-body -X POST "$CHECKFU_BASE_URL/v1/environments" \
2 -H "Authorization: Bearer $CHECKFU_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "name": "locked-down",
6 "config": {
7 "type": "cloud",
8 "networking": {
9 "type": "limited",
10 "allowed_hosts": ["github.com"],
11 "allow_package_managers": true,
12 "allow_mcp_servers": true
13 }
14 }
15 }'
1checkfu environments create \
2 --name locked-down \
3 --config '{"type":"cloud","networking":{"type":"limited","allowed_hosts":["github.com"],"allow_package_managers":true,"allow_mcp_servers":true}}'
1{
2 "name": "environments_createEnvironment",
3 "arguments": {
4 "body": {
5 "name": "locked-down",
6 "config": {
7 "type": "cloud",
8 "networking": {
9 "type": "limited",
10 "allowed_hosts": ["github.com"],
11 "allow_package_managers": true,
12 "allow_mcp_servers": true
13 }
14 }
15 }
16 }
17}
1# environments/locked-down.yaml
2name: locked-down
3config:
4 type: cloud
5 setup:
6 packages:
7 npm: [typescript, vitest]
8 networking:
9 type: limited
10 allowed_hosts: [github.com]
11 allow_package_managers: true
12 allow_mcp_servers: true
Right context, right time
Share repos, files, memory, artifacts, and skills. Mount only what each task needs.
Learn more about context →1const store = await client.waitForPending(
2 await client.memoryStores.create({
3 name: "Release notes",
4 description: "Shared changelog entries across sessions.",
5 }),
6)
7
8const session = await client.waitForPending(
9 await client.sessions.create({
10 agent: agent.id,
11 environment_id: environment.id,
12 resources: [
13 { type: "memory_store", memory_store_id: store.id, access: "read_write" },
14 { type: "artifact", artifact_id: "art_123", version: 2 },
15 ],
16 }),
17)
1curl --fail-with-body -X POST "$CHECKFU_BASE_URL/v1/memory_stores" \
2 -H "Authorization: Bearer $CHECKFU_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "name": "Release notes",
6 "description": "Shared changelog entries across sessions."
7 }'
1checkfu memory-stores create \
2 --name "Release notes" \
3 --description "Shared changelog entries across sessions."
4
5checkfu memory-stores:memories create \
6 --memory-store-id "$MEMORY_STORE_ID" \
7 --path /release/v1.md --content @v1.md
1{
2 "name": "memoryStores_createMemoryStore",
3 "arguments": {
4 "body": {
5 "name": "Release notes",
6 "description": "Shared changelog entries across sessions."
7 }
8 }
9}
1# memory_stores/release-notes.yaml
2name: Release notes
3description: Shared changelog entries across sessions.
Plug in your tools
Connect MCP servers and APIs once. Credentials stay in a vault, out of every sandbox.
Learn more about tools →1const vault = await client.waitForPending(
2 await client.vaults.create({ display_name: "Support tools" }),
3)
4
5const agent = await client.waitForPending(
6 await client.agents.create({
7 name: "Docs helper",
8 model: "claude-sonnet-5-5",
9 mcp_servers: [{ type: "url", name: "docs", url: "https://mcp.example.com/mcp" }],
10 tools: [
11 {
12 type: "mcp_toolset",
13 mcp_server_name: "docs",
14 default_config: { permission_policy: { type: "always_allow" } },
15 configs: [{ name: "delete_page", permission_policy: { type: "always_ask" } }],
16 },
17 ],
18 }),
19)
1curl --fail-with-body -X POST "$CHECKFU_BASE_URL/v1/vaults" \
2 -H "Authorization: Bearer $CHECKFU_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{"display_name":"Support tools"}'
1checkfu vaults create --display-name "Support tools"
2
3checkfu vaults:credentials create \
4 --vault-id "$VAULT_ID" < credential.json
1{
2 "name": "vaults_createVault",
3 "arguments": {
4 "body": {
5 "display_name": "Support tools"
6 }
7 }
8}
1---
2# agents/docs-helper.md
3name: Docs helper
4model: claude-sonnet-5-5
5mcp_servers:
6 - type: url
7 name: docs
8 url: https://mcp.example.com/mcp
9tools:
10 - type: mcp_toolset
11 mcp_server_name: docs
12 default_config:
13 permission_policy: { type: always_allow }
14 configs:
15 - name: delete_page
16 permission_policy: { type: always_ask }
17---
Scheduled and triggered runs
Run agents on a schedule, on demand, or from webhooks and Discord.
Learn more about automations →1const deployment = await client.waitForPending(
2 await client.deployments.create(
3 {
4 name: "Morning report",
5 agent: process.env.AGENT_ID!,
6 environment_id: process.env.ENVIRONMENT_ID!,
7 initial_events: [
8 { type: "user.message", content: [{ type: "text", text: "Write the morning report." }] },
9 ],
10 schedule: { type: "cron", expression: "0 9 * * 1-5", timezone: "America/New_York" },
11 },
12 { idempotencyKey: process.env.DEPLOYMENT_CREATE_KEY! },
13 ),
14)
1curl --fail-with-body -X POST "$CHECKFU_BASE_URL/v1/inbound_bindings" \
2 -H "Authorization: Bearer $CHECKFU_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{"type":"webhook","deployment_id":"dep_123"}'
1checkfu apply . --dry-run
2checkfu apply . --yes
3
4checkfu webhooks:deliveries list --webhook-id "$WEBHOOK_ID"
1{
2 "name": "deployments_create",
3 "arguments": {
4 "idempotency_key": "morning-report-1",
5 "body": {
6 "name": "Morning report",
7 "agent": "agent_123",
8 "environment_id": "env_123",
9 "initial_events": [
10 { "type": "user.message", "content": [{ "type": "text", "text": "Write the morning report." }] }
11 ],
12 "schedule": { "type": "cron", "expression": "0 9 * * 1-5", "timezone": "America/New_York" }
13 }
14 }
15}
1# deployments/report.yaml
2type: deployment
3name: Weekday report
4agent: ../agents/reviewer.md
5environment_id: ../environments/locked-down.yaml
6initial_events:
7 - type: user.message
8 content: [{ type: text, text: Write the daily support report. }]
9schedule:
10 type: cron
11 expression: "0 9 * * 1-5"
12 timezone: America/New_York
Durable sessions
Stream ordered events, switch harness mid-session, and pick up where you left off.
Learn more about sessions →1await client.sessions.events.send(session.id, {
2 events: [{ type: "user.message", content: [{ type: "text", text: "Summarize the open ticket." }] }],
3})
4
5for await (const event of await client.sessions.events.stream(session.id)) {
6 if (event.type === "agent.message") console.log(event.content.map((b) => b.text).join(""))
7 if (event.type === "session.status_idle" || event.type === "session.status_terminated") break
8}
9
10await client.sessions.selectRuntime(session.id, { harness: "codex", model: "gpt-5.4" })
1curl -N --fail-with-body "$CHECKFU_BASE_URL/v1/sessions/$SESSION_ID/events/stream" \
2 -H "Authorization: Bearer $CHECKFU_API_KEY"
1SESSION_ID=$(checkfu sessions create --agent "$AGENT_ID" --environment-id "$ENVIRONMENT_ID" --transform id -r)
2checkfu sessions connect "$SESSION_ID"
3checkfu sessions select-runtime --session-id "$SESSION_ID" --harness codex --model gpt-5.4
1{
2 "name": "sessions_sendSessionEvents",
3 "arguments": {
4 "path": { "session_id": "sess_123" },
5 "body": {
6 "events": [
7 { "type": "user.message", "content": [{ "type": "text", "text": "Summarize the open ticket." }] }
8 ]
9 }
10 }
11}
1# Session workspace mounts
2/workspace: Working files and cloned repositories
3/mnt/session/outputs: Saved as immutable Files after each turn
4/mnt/memory/<store>: Cross-session Memory store mount
5/mnt/artifacts/<name>: Version-pinned Artifact mount
6/mnt/session/uploads/<path>: Uploaded Files
7/mnt/skills/<name>: Skills (SKILL.md and supporting files)
Managed agents for any harness
Pick the harness and model. Checkfu runs everything around them.