Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ctrlnode.ai/llms.txt

Use this file to discover all available pages before exploring further.

Provider id: claude-sdk · CtrlNode agent type: ClaudeAgentSdk Uses @anthropic-ai/claude-agent-sdk to run agentic tasks in the task workspace. CtrlNode labels this Claude in the UI (SDK mode).

When to use it

  • You have an Anthropic API key and want programmatic tool access
  • You need configurable tool lists (Read, Write, Bash, etc.)
  • You run headless servers without Claude Code subscription

Prerequisites

Option A — API key (servers)
ANTHROPIC_API_KEY=sk-ant-...
Option B — CLI login (workstation)
npm install -g @anthropic-ai/claude-code
claude login
Optional: set CLAUDE_SDK_EXECUTABLE to a custom claude binary path on Linux.

Environment variables

VariableDefaultDescription
ANTHROPIC_API_KEYAPI key (if not using CLI login)
CLAUDE_SDK_TOOLSRead,Write,Edit,Bash,Glob,GrepAllowed tools
CLAUDE_SDK_MAX_TURNS50Max turns
CLAUDE_SDK_TIMEOUT_MINUTES10Task timeout
CLAUDE_SDK_PERMISSION_MODEbypassPermissionsbypassPermissions | acceptEdits | dontAsk
CLAUDE_SDK_EXECUTABLEPath to claude binary
AGENTS_FOLDERHomeWorkspace root

Example .env

PAIRING_TOKEN=...
PROVIDERS=claude-sdk
ANTHROPIC_API_KEY=sk-ant-...
AGENTS_FOLDER=/home/you

CtrlNode setup

  1. Project agent type Claude / ClaudeAgentSdk
  2. Register agents in Team
  3. Start Bridge with key or login present

Combine providers

PROVIDERS=claude-sdk,copilot
ANTHROPIC_API_KEY=...
COPILOT_GITHUB_TOKEN=...

Troubleshooting

IssueFix
Warning anthropic_api_key_missingSet ANTHROPIC_API_KEY or run claude login
SDK cannot find binarySet CLAUDE_SDK_EXECUTABLE
Task uses CLI provider insteadAgent type must be ClaudeAgentSdk
← All providers