composio icon indicating copy to clipboard operation
composio copied to clipboard

[WIP]: Add Claude Agent SDK Provider for Composio

Open VENUCODE opened this issue 1 month ago • 1 comments

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

VENUCODE avatar Nov 14 '25 18:11 VENUCODE

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.

macroscopeapp[bot] avatar Nov 14 '25 18:11 macroscopeapp[bot]

bugbot run

VENUCODE avatar Dec 03 '25 17:12 VENUCODE

PR Summary

Introduces a Claude Agent SDK provider that wraps Composio tools for MCP usage, plus a working demo, docs, and packaging.

  • Providers:
    • Add ClaudeAgentSDKProvider in python/providers/claude_agent/composio_claude_agent/provider.py to adapt Composio Tools to Claude Agent SDK SdkMcpTools via @tool.
    • Implements wrap_tool/wrap_tools and a factory _create_tool_function with pydantic validation error handling and Claude-compatible responses.
  • Demo:
    • Add python/providers/claude_agent/claude_agent_demo.py showing fetching GMAIL_GET_PROFILE, creating an MCP server, configuring ClaudeAgentOptions, and running ClaudeSDKClient.
  • Docs:
    • Add python/providers/claude_agent/README.md with installation, quick start, and API reference for ClaudeAgentSDKProvider.
  • Packaging:
    • Add pyproject.toml, setup.py, and composio_claude_agent/py.typed for distribution and type hints.

Written by Cursor Bugbot for commit 1582eb19d7fa9800f51aad54df65fd97567ff584. This will update automatically on new commits. Configure here.

cursor[bot] avatar Dec 03 '25 18:12 cursor[bot]