Skip to main content

Sinapsis templates for Anthropic Claude models.

Project description



Sinapsis Anthropic

Sinapsis templates for Anthropic Claude text, multimodal, and MCP workflows.

🐍 Installation🚀 Features📚 Usage example📙 Documentation🔍 License

The sinapsis-anthropic package provides packet-native templates for running Claude models with LLMConversationPacket, including standard text generation, multimodal inputs, and MCP tool flows.

🐍 Installation

Install using your preferred package manager. We strongly recommend using uv.

Install the base package:

uv pip install sinapsis-anthropic --extra-index-url https://pypi.sinapsis.tech

Or with raw pip:

pip install sinapsis-anthropic --extra-index-url https://pypi.sinapsis.tech

[!IMPORTANT] Anthropic templates require an API key. Set it before running your agent:

export ANTHROPIC_API_KEY="your-api-key"

[!IMPORTANT] AnthropicMultiModal requires the optional multimodal extra:

uv pip install sinapsis-anthropic[multimodal] --extra-index-url https://pypi.sinapsis.tech

Or install all optional dependencies:

uv pip install sinapsis-anthropic[all] --extra-index-url https://pypi.sinapsis.tech

🚀 Features

Templates Supported

  • AnthropicTextGeneration: Standard Claude text generation on top of LLMConversationPacket.
  • AnthropicMultiModal: Multimodal completion that reads image packets from container.images.
  • AnthropicWithMCP: Packet-native MCP orchestration using LLMConversationPacket.tools, tool_calls, and tool_results.
🧩 Common Attributes
  • init_args (LLMInitArgs, required): Anthropic model selection arguments.
    • llm_model_name (str, required): Claude model identifier.
  • completion_args (AnthropicCompletionArgs, required): Request-time generation parameters such as max_tokens, temperature, top_p, top_k, service_tier, and stop_sequences.
  • extended_thinking (AnthropicThinkingArgs, optional): Extended-thinking configuration.
  • web_search (bool, optional): Enables Anthropic's built-in web search tool for supported models.
  • cleanup_response (bool, optional): Whether to clean leaked transport or template markers from the final response.
  • reasoning_start_tag / reasoning_end_tag (str | None, optional): Optional tags used to extract reasoning into the packet reasoning field and keep the final answer in response.

[!TIP] Use sinapsis info --all-template-names to inspect the templates installed in your environment.

📚 Usage example

The following configuration runs one Claude text-generation step from an LLMConversationPacket.

Config
agent:
  name: my_claude_agent
  description: Agent with support for text-to-text conversational chat using Anthropic Claude models

templates:
  - template_name: InputTemplate
    class_name: InputTemplate
    attributes: {}

  - template_name: LLMConversationInput
    class_name: LLMConversationInput
    template_input: InputTemplate
    attributes:
      prompt: "Give three short tips for staying organized during a busy week."
      system_prompt: "You are a helpful assistant."

  - template_name: AnthropicTextGeneration
    class_name: AnthropicTextGeneration
    template_input: LLMConversationInput
    attributes:
      init_args:
        llm_model_name: "claude-sonnet-4-6"
      completion_args:
        max_tokens: 1024
        temperature: 0.7
        service_tier: standard_only
      extended_thinking:
        type: disabled
      web_search: false

To run a config:

sinapsis run path_to_config.yaml

📙 Documentation

Documentation for this and other sinapsis packages is available on the sinapsis website

Tutorials for different projects within sinapsis are available at sinapsis tutorials page

🔍 License

This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the LICENSE file.

For commercial use, please refer to our official Sinapsis website for information on obtaining a commercial 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

sinapsis_anthropic-0.2.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

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

sinapsis_anthropic-0.2.0-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file sinapsis_anthropic-0.2.0.tar.gz.

File metadata

  • Download URL: sinapsis_anthropic-0.2.0.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.17

File hashes

Hashes for sinapsis_anthropic-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2e9a4d3b4d031c6adaea6934f9caaa482b8ff48bf468a4ad28ca0358e64d02d2
MD5 c8aabfc882244a941147aacb7d05c91f
BLAKE2b-256 709a90cbd4ba2154fe50562b28c9d438a8af87c483d9faba36cdd8c545180642

See more details on using hashes here.

File details

Details for the file sinapsis_anthropic-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sinapsis_anthropic-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a3cd9e740e58b4debbe79ef797aa39caf5762a8e0902ba5d4ccba6a2dbbc480
MD5 f1527dce11f827589e1fd6611f5c113a
BLAKE2b-256 b307cd5f53b1281862a765db7d4b787be1670a30b811f279f1cc3520dd3c799f

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