Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
test(python): add Gmail proxy + mixed all-paths to agent e2e test
6 scenarios: standalone, toolkit, mixed local, remote, Gmail proxy (CREATE_DRAFT via ctx.proxy_execute), mixed all paths in one turn. manage_connections=True, user_id=default throughout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dhawal Upadhyay committed
Mar 20, 2026 at 16:28 UTC
60328a01ddca1db8cf3a41688c56bc53d7516a18
1 file changed
+13
-5
python/examples/custom_tools_agent_test.py
+13
-5
@@ -130,7 +130,7 @@ async def run_test(composio, prompt, test_name):
130
session = composio.create(
131
user_id="default",
132
toolkits=["gmail", "weathermap"],
133
- manage_connections=False,
133
+ manage_connections=True,
134
experimental={
135
"custom_tools": [get_user, create_draft],
136
"custom_toolkits": [role_manager],
@@ -197,13 +197,21 @@ async def main():
197
)
198
results.append(("Remote Composio tool", ok))
199
200
- # Test 5: Mixed local + remote
200
+ # Test 5: Gmail proxy execute (CREATE_DRAFT via ctx.proxy_execute)
201
ok = await run_test(
202
composio,
203
- "Look up user-1's info, then check the weather in their city (assume they're in San Francisco)",
204
- "Mixed local + remote (GET_USER + weathermap)",
203
+ 'Create a Gmail draft to bob@acme.com with subject "Hello from Python SDK" and body "Testing custom tools proxy_execute!"',
204
+ "Gmail proxy execute (CREATE_DRAFT)",
205
)
206
- results.append(("Mixed local + remote", ok))
206
+ results.append(("Gmail proxy (CREATE_DRAFT)", ok))
207
+
208
+ # Test 6: Mixed all paths — local + proxy + remote in one turn
209
+ ok = await run_test(
210
+ composio,
211
+ "Look up user-1, then draft them an email saying hi and include the current weather in San Francisco in the body",
212
+ "Mixed all paths (GET_USER + CREATE_DRAFT + weathermap)",
213
+ )
214
+ results.append(("Mixed all paths", ok))
215
216
# Summary
217
print(f"\n{'='*60}")