Skip to main content

Anthropic Building Blocks for Meshagent

Project description

Meshagent

MeshAgent Anthropic

The meshagent.anthropic package provides adapters to integrate Anthropic models (Messages API) with MeshAgent tools and agents.

Messages Adapter

  • AnthropicMessagesAdapter: wraps the Anthropic Messages API. It turns Toolkit objects into Anthropic tool definitions, executes tool calls, and returns the final assistant response.
from meshagent.anthropic import AnthropicMessagesAdapter

adapter = AnthropicMessagesAdapter(model="claude-3-5-sonnet-latest")

Compaction can be enabled through Anthropic context management:

adapter = AnthropicMessagesAdapter(
    model="claude-sonnet-4-5",
    context_management="auto",
    compaction_threshold=150000,
)

You can also pass base_url= to AnthropicMessagesAdapter. If omitted, MeshAgent reads ANTHROPIC_BASE_URL from the environment when constructing the provider client.

Tool Response Adapter

AnthropicMessagesToolResponseAdapter converts a tool's structured response into Anthropic tool_result blocks that can be inserted back into the conversation.


Learn more about MeshAgent on our website or check out the docs for additional examples!

Website: www.meshagent.com

Documentation: docs.meshagent.com


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

meshagent_anthropic-0.37.2.tar.gz (59.0 kB view details)

Uploaded Source

Built Distribution

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

meshagent_anthropic-0.37.2-py3-none-any.whl (56.1 kB view details)

Uploaded Python 3

File details

Details for the file meshagent_anthropic-0.37.2.tar.gz.

File metadata

  • Download URL: meshagent_anthropic-0.37.2.tar.gz
  • Upload date:
  • Size: 59.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for meshagent_anthropic-0.37.2.tar.gz
Algorithm Hash digest
SHA256 ce983772de598ddec80c07e20d3003b68e919c0f37e448abbf8502f42e6dcc1c
MD5 7ca8956da40a87e082eef16ad6f67f22
BLAKE2b-256 5609c7567cec1d78d57ed6b4d1514f3d0e77dca6b2aeffa729af39a06609a43a

See more details on using hashes here.

File details

Details for the file meshagent_anthropic-0.37.2-py3-none-any.whl.

File metadata

File hashes

Hashes for meshagent_anthropic-0.37.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2e04b0ff5269ae086a2147b88ea1b9ae26bec39100944b6eac6dffd6a9a7f34e
MD5 cc319a1786784496c94528bbbdaf0813
BLAKE2b-256 6ce8f451e786e4b618181b955a77f0a7ca6bb074aab1f8c0b5aff349389dfe3c

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