Skip to content

claude_code

diapason.agents.claude_code

ClaudeCodeAgent -- wraps the Claude Agent SDK via Node.js subprocess bridge.

Spawns a Node.js runner process that calls the @anthropic-ai/claude-code SDK, communicating via JSON over stdin/stdout with sentinel-delimited output.

The engine parameter is accepted for interface conformance with BaseAgent but is not used -- inference is handled entirely by the Claude Agent SDK.

ClaudeCodeAgent

Bases: BaseAgent

Agent that wraps the Claude Agent SDK via a Node.js subprocess.

Spawns a Node.js process running dist/index.js which imports @anthropic-ai/claude-code and streams agentic responses. Results are communicated back via sentinel-delimited JSON on stdout.

The engine parameter is accepted for BaseAgent interface conformance but is not used -- all inference is handled by the Claude Agent SDK.

run(input, context=None, **kwargs)

Execute a query via the Claude Agent SDK subprocess.

Spawns node dist/index.js, writes a JSON request to stdin, and reads sentinel-delimited JSON output from stdout.