Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.remoteagent.chat/llms.txt

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

The claude-sdk runner uses Anthropic’s @anthropic-ai/claude-code Node.js SDK directly within the agent process — no subprocess, no CLI binary, no shell invocation. The model runs in-process, which means lower latency, better error handling, and access to the full SDK feature set including tool use and streaming.

Requirements

  • An Anthropic API key (sk-ant-...). Get one at console.anthropic.com.
  • No additional binary to install. The SDK runs in-process within the RemoteAgent.CHAT binary.

Setup

During remoteagent init, choose claude-sdk from the interactive list. When prompted for your API key, paste your Anthropic key:
remoteagent init
# ? Which runner? claude-sdk
# ? Anthropic API key: sk-ant-...
The key is saved to ~/.remoteagent/agents/{agentId}.json on your local machine. It is never transmitted to RemoteAgent.CHAT servers. Each project can use a different key — useful if you have multiple projects billed to separate Anthropic accounts. To use this runner from the command line without the interactive wizard:
remoteagent init --runner claude-sdk

How it works

When your agent receives a command, the claude-sdk runner calls the @anthropic-ai/claude-code SDK with the prompt and the current working directory. The SDK handles:
  • Model selection (latest Claude model configured in the SDK)
  • Tool use (file read/write, bash execution, etc.)
  • Streaming output chunks back to the agent
Each chunk is forwarded to Telegram as it arrives, so you see the response progressively rather than waiting for the full completion.

Pros and cons

ProsCons
Best output quality — full SDK capabilityRequires a paid Anthropic API key
Lowest latency — no subprocess overheadAPI usage is billed per token
Best error handling and retry logic
Access to all Claude tools (bash, file I/O)
No extra installation step

API key security

Your Anthropic API key is stored locally in ~/.remoteagent/agents/{agentId}.json and is never sent to RemoteAgent.CHAT servers or included in any network request made by the relay. The SDK calls Anthropic’s API directly from your machine.
The key is stored in plain text in the config file. Make sure ~/.remoteagent/ has appropriate permissions:
chmod 700 ~/.remoteagent
chmod 600 ~/.remoteagent/agents/*.json

Costs

API usage is billed by Anthropic based on input and output tokens. RemoteAgent.CHAT does not add any markup or take a cut of API costs. Your Anthropic account is billed directly for all model usage. Refer to Anthropic’s pricing page for current token rates.