[WIP]: Add Claude Agent SDK Provider for Composio
Description
This PR adds a new agentic provider for Claude Agent SDK, enabling Composio tools to be used with Claude Agent SDK applications. The implementation follows the established provider pattern used by other agentic providers in the codebase, using the @tool decorator pattern to create Claude Agent SDK-compatible tool definitions. The provider includes proper error handling with pydantic validation error parsing, comprehensive documentation with usage examples, and a complete demo showcasing integration with Gmail Get Profile tool. The implementation uses a factory function pattern to ensure proper closure capture when creating multiple tools dynamically, preventing variable capture issues. The provider is structured with a helper method _create_tool_function() that encapsulates the tool creation logic, following best practices for code organization and maintainability. A fully functional demo (claude_agent_demo.py) demonstrates the complete integration flow, including MCP server setup, Claude Agent Options configuration, and tool execution. All code has been formatted and linted according to project standards, and the implementation includes comprehensive docstrings with parameter descriptions, return types, and usage examples to aid developer understanding. Status: Work in Progress - Ready for review and testing
Add composio_claude_agent.ClaudeAgentSDKProvider and a runnable demo to integrate Composio tools with Claude Agent SDK in provider.py
Introduce a new provider that wraps Composio tools as Claude Agent SDK MCP tools, add a demo script that runs an async query for GMAIL_GET_PROFILE, and include package metadata and docs for distribution.
📍Where to Start
Start with the provider implementation in provider.py, then run the demo in claude_agent_demo.py.
Macroscope summarized d8ca975.
bugbot run
PR Summary
Introduces a Claude Agent SDK provider that wraps Composio tools for MCP usage, plus a working demo, docs, and packaging.
- Providers:
- Add
ClaudeAgentSDKProviderinpython/providers/claude_agent/composio_claude_agent/provider.pyto adapt ComposioTools to Claude Agent SDKSdkMcpTools via@tool. - Implements
wrap_tool/wrap_toolsand a factory_create_tool_functionwith pydantic validation error handling and Claude-compatible responses.
- Add
- Demo:
- Add
python/providers/claude_agent/claude_agent_demo.pyshowing fetchingGMAIL_GET_PROFILE, creating an MCP server, configuringClaudeAgentOptions, and runningClaudeSDKClient.
- Add
- Docs:
- Add
python/providers/claude_agent/README.mdwith installation, quick start, and API reference forClaudeAgentSDKProvider.
- Add
- Packaging:
- Add
pyproject.toml,setup.py, andcomposio_claude_agent/py.typedfor distribution and type hints.
- Add
Written by Cursor Bugbot for commit 1582eb19d7fa9800f51aad54df65fd97567ff584. This will update automatically on new commits. Configure here.