Skip to content

feat(agent-sdk): add Claude Agent SDK harness#4

Merged
cognect merged 1 commit into
mainfrom
feat/agent-sdk-harness
Jun 8, 2026
Merged

feat(agent-sdk): add Claude Agent SDK harness#4
cognect merged 1 commit into
mainfrom
feat/agent-sdk-harness

Conversation

@cognect

@cognect cognect commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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.

Crates / modules

  • agent-sdk-coreAgentSdkConfig (mirrors ClaudeAgentOptions), normalized message/result/event schema, the AgentSdkBackend/AgentSdkSession trait seam, and an in-memory MockBackend (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::Actor. Default permission_mode = bypassPermissions (overridable).
  • agent-sdk-harness-web — axum REST + SSE companion.
  • py-bindingsPythonAgentSdkBackend + reverse async-iterator bridge (Rust drives the Python __anext__); AgentSdkHarness/Session/Stream pyclasses; invoke_tool. atomr @tool guests + Rust tools bridged in as in-process SDK MCP tools.
  • python/atomr_agents/agent_sdk.pyClaudeAgentSDKBackend wrapper + harness() builder; pip install atomr-agents[agent-sdk].
  • host<root>/agent-sdk/<id>/ loader → spec + .claude projection.
  • Umbrella agent-sdk feature; release publish-order updated; docs + CHANGELOG.

Verification

  • cargo check --workspace clean; new-crate tests 14 + 8 + 2 pass; actor feature compiles + passes; host loader 2 tests pass.
  • py-bindings cdylib builds, links, and imports; Python suite 8 pass (incl. native mock round-trip through the full PyO3 → Rust → MockBackend path); pure-logic tests validate normalization/options. Live SDK test gated on ANTHROPIC_API_KEY + claude CLI.

Note: merging triggers the CI release pipeline, which publishes the three new crates (publish-order updated accordingly).

🤖 Generated with Claude Code

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>
@cognect cognect merged commit 0c93335 into main Jun 8, 2026
1 of 5 checks passed
@cognect cognect deleted the feat/agent-sdk-harness branch June 8, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant