Skip to main content

Anthropic adapter for eager tool calling — wraps the Messages stream to emit SealEvents.

Project description

eager-tools-anthropic

Anthropic adapter for eager tool calling — wraps anthropic.AsyncMessageStream and dispatches each tool the instant its block seals, overlapping tool execution with ongoing LLM generation.

For the mechanism and runtime contract, see the top-level METHOD.md.

Status

Alpha / scaffold. Public API shape is locked; implementation bodies arrive in Move 3 (CloudThinker port). See NEXT.md.

Install (once published)

pip install eager-tools-anthropic

Usage

import anthropic
from eager_tools_anthropic import AnthropicEagerStream

client = anthropic.AsyncAnthropic()

async with client.messages.stream(
    model="claude-opus-4-6",
    tools=[...],
    messages=[...],
) as source:
    runner = AnthropicEagerStream(source, tools=my_tools)

    async for event in runner.events():
        print(event.kind, event.tool_call)

    async for call, result in runner.results():
        print(call.name, "→", result)

Supported SDK versions

  • anthropic>=0.39 (Messages streaming API).

License

MIT. See top-level LICENSE.

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

eager_tools_anthropic-0.3.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

eager_tools_anthropic-0.3.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file eager_tools_anthropic-0.3.0.tar.gz.

File metadata

File hashes

Hashes for eager_tools_anthropic-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a87e0bb7acbf1287570b1e6924d29c1a3a3557c3f4cda8b261f81d807f70f141
MD5 76d42ecdcb5f5196207705d8e0440f5e
BLAKE2b-256 45dca7602f71cb795b6caaeaea34fdff9b33835b3434701d95c7ca9e5bb9567d

See more details on using hashes here.

File details

Details for the file eager_tools_anthropic-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for eager_tools_anthropic-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f0b65c2ee4bbf641dd43e5f91f5ed5b6320fa4f6d2eed8cf35e0fc669353a47
MD5 022a4b671edec2561f79054bda5d151e
BLAKE2b-256 ee31c91570b55b4bf74586e680e8195a9d0a17427ce8aeb9dc8be702fd715ecd

See more details on using hashes here.

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