@devries-cameron20 / composio Mirror · read-only / commits / 9c71ca90d
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 23:15 UTC

docs: fix high priority issues in Python custom provider documentation

- Fix import syntax error in create-provider.sh (remove extra dot) - Restructure documentation: move architecture section before quick start - Break up long opening sentence for better readability - Add missing 'import time' statement in retry logic example Co-authored-by: Siddharth Balyan <alt-glitch@users.noreply.github.com>

claude[bot] committed Jul 1, 2025 at 00:28 UTC 9c71ca90deacd0951f13a249b82789efb8b47af4
2 files changed +31 -30
fern/pages/src/providers/py-custom.mdx
+30 -29
@@ -5,7 +5,35 @@ keywords: ""
5 hide-nav-links: false
6 ---
7
8 -This guide provides a comprehensive walkthrough of creating custom providers for the Composio Python SDK, enabling integration with different AI frameworks and platforms.
8 +This guide shows how to create custom providers for the Composio Python SDK. Custom providers enable integration with different AI frameworks and platforms.
9 +
10 +## Provider architecture
11 +
12 +The Composio SDK uses a provider architecture to adapt tools for different AI frameworks. The provider handles:
13 +
14 +1. **Tool format transformation**: Converting Composio tools into formats compatible with specific AI platforms
15 +2. **Tool execution**: Managing the flow of tool execution and results
16 +3. **Platform-specific integration**: Providing helper methods for seamless integration
17 +
18 +## Types of providers
19 +
20 +There are two types of providers:
21 +
22 +1. **Non-agentic providers**: Transform tools for platforms that don't have their own agency (e.g., OpenAI, Anthropic)
23 +2. **Agentic providers**: Transform tools for platforms that have their own agency (e.g., LangChain, CrewAI)
24 +
25 +## Provider class hierarchy
26 +
27 +```
28 +BaseProvider (Abstract)
29 +├── NonAgenticProvider (Abstract)
30 +│ └── OpenAIProvider (Concrete)
31 +│ └── AnthropicProvider (Concrete)
32 +│ └── [Your Custom Non-Agentic Provider] (Concrete)
33 +└── AgenticProvider (Abstract)
34 + └── LangchainProvider (Concrete)
35 + └── [Your Custom Agentic Provider] (Concrete)
36 +```
37
38 ## Quick start
39
@@ -52,34 +80,6 @@ After generation, you can:
80 3. Implement your provider logic in `composio_<provider-name>/provider.py`
81 4. Test with the demo script: `python <provider-name>_demo.py`
82
55 -## Provider architecture
56 -
57 -The Composio SDK uses a provider architecture to adapt tools for different AI frameworks. The provider handles:
58 -
59 -1. **Tool format transformation**: Converting Composio tools into formats compatible with specific AI platforms
60 -2. **Tool execution**: Managing the flow of tool execution and results
61 -3. **Platform-specific integration**: Providing helper methods for seamless integration
62 -
63 -## Types of providers
64 -
65 -There are two types of providers:
66 -
67 -1. **Non-agentic providers**: Transform tools for platforms that don't have their own agency (e.g., OpenAI, Anthropic)
68 -2. **Agentic providers**: Transform tools for platforms that have their own agency (e.g., LangChain, CrewAI)
69 -
70 -## Provider class hierarchy
71 -
72 -```
73 -BaseProvider (Abstract)
74 -├── NonAgenticProvider (Abstract)
75 -│ └── OpenAIProvider (Concrete)
76 -│ └── AnthropicProvider (Concrete)
77 -│ └── [Your Custom Non-Agentic Provider] (Concrete)
78 -└── AgenticProvider (Abstract)
79 - └── LangchainProvider (Concrete)
80 - └── [Your Custom Agentic Provider] (Concrete)
81 -```
82 -
83 ## Creating a non-agentic provider
84
85 Non-agentic providers inherit from the `NonAgenticProvider` abstract class:
@@ -283,6 +283,7 @@ class StatefulProvider(NonAgenticProvider[ProviderTool, ProviderToolCollection],
283 You can compose functionality by extending existing providers:
284
285 ```python
286 +import time
287 from composio_openai import OpenAIProvider
288 from typing import Optional
289 from composio.types import Modifiers
python/scripts/create-provider.sh
+1 -1
@@ -87,7 +87,7 @@ cat > "$PROVIDER_PATH/$PACKAGE_NAME/__init__.py" << EOL
87 ${CAPITAL_PROVIDER_NAME} Provider for composio SDK.
88 """
89
90 -from .$PACKAGE_NAME.provider import ${CAPITAL_PROVIDER_NAME}Provider
90 +from .provider import ${CAPITAL_PROVIDER_NAME}Provider
91
92 __all__ = ["${CAPITAL_PROVIDER_NAME}Provider"]
93 EOL