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, 13:15 UTC
docs: fix Claude Agent SDK native example message handling
Add AssistantMessage and TextBlock imports with proper type checking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sushmithamallesh committed
Jan 27, 2026 at 00:57 UTC
ad9431c0db78dcb23d22454af577fd2983c069bd
1 file changed
+6
-3
docs/content/docs/quickstart.mdx
+6
-3
@@ -364,7 +364,7 @@ import asyncio
364
from dotenv import load_dotenv
365
from composio import Composio
366
from composio_claude_agent_sdk import ClaudeAgentSDKProvider
367
-from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, create_sdk_mcp_server
367
+from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, create_sdk_mcp_server, AssistantMessage, TextBlock
368
369
load_dotenv()
370
@@ -395,8 +395,11 @@ async def main():
395
396
await client.query(user_input)
397
print("Claude: ", end="")
398
- async for msg in client.receive_response():
399
- print(msg, end="", flush=True)
398
+ async for message in client.receive_response():
399
+ if isinstance(message, AssistantMessage):
400
+ for block in message.content:
401
+ if isinstance(block, TextBlock):
402
+ print(block.text, end="", flush=True)
403
print()
404
405
asyncio.run(main())