@agentxin-ai/plugin-anthropic
v0.0.2
Published
`@agentxin-ai/plugin-anthropic` provides a model adapter for connecting Anthropic's Claude models to the [AgentXinAI](https://github.com/agentxin-ai/agentxin) platform. The plugin enables agents to invoke Claude series models with support for streaming, t
Readme
AgentXin Plugin: Anthropic
Overview
@agentxin-ai/plugin-anthropic provides a model adapter for connecting Anthropic's Claude models to the AgentXinAI platform. The plugin enables agents to invoke Claude series models with support for streaming, tool calling, and vision capabilities within a unified AgentXinAI agentic workflow.
Core Features
- Provides the
AnthropicPluginNestJS module, which automatically registers model providers, lifecycle logging, and configuration validation logic. - Wraps Anthropic's Claude models as AgentXinAI's
LargeLanguageModelviaAnthropicLargeLanguageModel, supporting function calling (tool use), streaming output, and agent token statistics. - Supports vision capabilities for vision-enabled Claude models.
- Integrates seamlessly with AgentXinAI's agent workflow system.
Installation
npm install @agentxin-ai/plugin-anthropicPeer Dependencies: The host project must also provide libraries such as
@agentxin-ai/plugin-sdk,@nestjs/common,@nestjs/config,@metad/contracts,@langchain/anthropic,chalk, andzod. Please refer topackage.jsonfor version requirements.
Enabling in AgentXinAI
- Add the plugin package to your system dependencies and ensure it is resolvable by Node.js.
- Before starting the service, declare the plugin in your environment variables:
PLUGINS=@agentxin-ai/plugin-anthropic - Add a new model provider in the AgentXinAI admin interface or configuration file, and select
anthropic.
Credentials & Model Configuration
The form fields defined in anthropic.yaml cover common Anthropic deployment scenarios:
- API Key: Your Anthropic API key (required)
- Model Name: The Claude model identifier (e.g.,
claude-sonnet-4-6,claude-opus-4-6,claude-haiku-4-5) - Context Size: Maximum context window size (default: 200000)
- Max Tokens: Maximum tokens to generate (default: 4096)
- Function Calling: Enable/disable tool calling support
- Vision Support: Enable/disable vision capabilities
- Streaming: Enable/disable streaming output
Supported Model Types
- Large Language Models (LLM): Claude series models with support for:
- Conversational interactions
- Tool calling (function calling)
- Streaming output
- Vision capabilities (for vision-enabled models)
Model Examples
Common Claude model identifiers:
claude-sonnet-4-6- Latest Claude Sonnet 4.6claude-opus-4-6- Latest Claude Opus 4.6claude-haiku-4-5- Latest Claude Haiku 4.5
The plugin supports all available Claude models from Anthropic. You can use any valid model identifier from the Anthropic API. For the latest model list, refer to Anthropic's documentation.
Configuration Example
When configuring a model provider in AgentXinAI:
- Select provider type:
anthropic - Enter your Anthropic API key
- Specify the model name (e.g.,
claude-sonnet-4-6) - Set context size (default: 200000)
- Configure max tokens (default: 4096)
- Enable/disable features as needed:
- Function calling:
tool_call - Vision support:
support - Streaming:
supported
- Function calling:
Development
This plugin is built using:
- TypeScript
- NestJS
- LangChain Anthropic SDK
- AgentXinAI Plugin SDK
License
See the main repository LICENSE file.
