Skip to main content

Claude Agent SDK provider for Zeno (Anthropic Claude with sub-agents, built-in tools, and SDK hooks).

Project description

zeno-provider-claude

Claude Agent SDK provider for Zeno. Wraps claude-agent-sdk (ClaudeSDKClient) behind Zeno's Provider Protocol so an Agent definition stays portable across providers.

Install

uv add 'zeno-framework[claude]'

The zeno-framework meta-package ships Claude as the default; this extra is the explicit form for environments that pin extras.

Usage

from zeno.agent import Agent
from zeno.app import ZenoApp
from zeno.channels.cli.channel import CliChannel
from zeno.providers.claude_sdk import ClaudeSDKProvider

app = ZenoApp(
    agent=Agent(
        name="root",
        instructions="You are a helpful personal assistant.",
        permission_mode="bypassPermissions",
    ),
    channels=[CliChannel()],
    provider=ClaudeSDKProvider(),
)

ClaudeSDKProvider reads ANTHROPIC_API_KEY from the environment via the underlying SDK. Set it before app.start(). If the env var is unset, start() logs a warning at the zeno.providers.claude_sdk logger pointing at both auth paths (env var + claude login OAuth) — OAuth users can ignore it; users who haven't set up either get a clear hint before the first turn fails.

Resuming SDK sessions

Pass a session_lookup callable to resume a prior SDK session keyed by (user_id, channel, thread_key):

async def lookup_session(user_id: str, channel: str, thread_key: str | None) -> str | None:
    return await my_store.get_sdk_session_id(user_id, channel, thread_key)


provider = ClaudeSDKProvider(session_lookup=lookup_session)

When session_lookup returns None (or is omitted), each turn starts a fresh SDK session.

Capabilities

ClaudeSDKProvider is the only Zeno provider that supports:

  • sub_agents — Claude Agent SDK dispatch via AgentDefinition
  • built_in_toolsWebSearch, WebFetch, Bash, etc.
  • permission_modedefault / acceptEdits / bypassPermissions / plan
  • Streaming assistant text via ctx.stream(...)
  • SDK hook bridge (PreToolUse / PostToolUse / UserPromptSubmit and the optional SubagentStart / SubagentStop / PostToolUseFailure hooks when available) translated into Zeno trace events.

See also

Part of the Zeno framework.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zeno_provider_claude-1.1.0.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zeno_provider_claude-1.1.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file zeno_provider_claude-1.1.0.tar.gz.

File metadata

  • Download URL: zeno_provider_claude-1.1.0.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zeno_provider_claude-1.1.0.tar.gz
Algorithm Hash digest
SHA256 708280050d25164395dac6dac3924fe176f21d2a5428f80d996b55854bcc29cf
MD5 2909699cbb11fb627f7ab4936b1e9e38
BLAKE2b-256 26c881572bc1644e4692be39aa58b698468f332015238ceb839ec4a0ff22785d

See more details on using hashes here.

Provenance

The following attestation bundles were made for zeno_provider_claude-1.1.0.tar.gz:

Publisher: publish.yml on nkootstra/zeno

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zeno_provider_claude-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zeno_provider_claude-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f80c2786242c7c8183220341bc16c0e7c04e8d0aefa73f2b4852809e34e2f37b
MD5 4281efea6c326bcadd6b721dd70e19ee
BLAKE2b-256 08a2c7bac440805162766bc8143cd0c7623c0073072a4637c829301c3c31c6d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for zeno_provider_claude-1.1.0-py3-none-any.whl:

Publisher: publish.yml on nkootstra/zeno

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page