feat(agent-sdk): add Claude Agent SDK harness#4
Merged
Conversation
Wrap Anthropic's programmable Claude Code agent (`claude-agent-sdk`) as a first-class atomr-agents harness: slash commands, subagents, hooks, MCP, permission modes, sessions, custom system prompts, and the built-in tool set, billed against your Anthropic API credits via the bundled `claude` CLI. Distinct from the server-side Managed Agents API. - agent-sdk-core: AgentSdkConfig (mirrors ClaudeAgentOptions), normalized message/result/event schema, AgentSdkBackend/AgentSdkSession trait seam, in-memory MockBackend for network-free tests. - agent-sdk-harness: orchestrator impl Callable, session registry under an atomic concurrency quota, SpendLedger credit tracking, .claude/ projection, and (feature `actor`) the interactive session as an atomr_core actor. Default permission_mode = bypassPermissions (overridable). - agent-sdk-harness-web: axum REST + SSE companion. - py-bindings: PythonAgentSdkBackend + reverse async-iterator bridge, AgentSdkHarness/Session/Stream pyclasses, invoke_tool; atomr @tool guests and Rust tools bridged into the agent as in-process SDK MCP tools. - python/atomr_agents/agent_sdk.py: ClaudeAgentSDKBackend wrapper + harness() builder; opt-in `pip install atomr-agents[agent-sdk]`. - host: <root>/agent-sdk/<id>/ loader → spec + .claude projection. - umbrella `agent-sdk` feature; release publish-order updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wrap Anthropic's programmable Claude Code agent (
claude-agent-sdk) as a first-class atomr-agents harness — slash commands, subagents, hooks, MCP, permission modes, sessions, custom system prompts, and the built-in tool set, billed against your Anthropic API credits via the bundledclaudeCLI. Distinct from the server-side Managed Agents API.Crates / modules
agent-sdk-core—AgentSdkConfig(mirrorsClaudeAgentOptions), normalized message/result/event schema, theAgentSdkBackend/AgentSdkSessiontrait seam, and an in-memoryMockBackend(network-free tests).agent-sdk-harness— orchestratorimpl Callable, session registry under an atomic concurrency quota,SpendLedgercredit tracking,.claude/projection, and (featureactor) the interactive session as anatomr_core::actor::Actor. Defaultpermission_mode = bypassPermissions(overridable).agent-sdk-harness-web— axum REST + SSE companion.PythonAgentSdkBackend+ reverse async-iterator bridge (Rust drives the Python__anext__);AgentSdkHarness/Session/Streampyclasses;invoke_tool. atomr@toolguests + Rust tools bridged in as in-process SDK MCP tools.python/atomr_agents/agent_sdk.py—ClaudeAgentSDKBackendwrapper +harness()builder;pip install atomr-agents[agent-sdk].<root>/agent-sdk/<id>/loader → spec +.claudeprojection.agent-sdkfeature; release publish-order updated; docs + CHANGELOG.Verification
cargo check --workspaceclean; new-crate tests 14 + 8 + 2 pass;actorfeature compiles + passes; host loader 2 tests pass.MockBackendpath); pure-logic tests validate normalization/options. Live SDK test gated onANTHROPIC_API_KEY+claudeCLI.🤖 Generated with Claude Code