docs: update chat-app cookbook and examples to use composio.use()#3381
Conversation
The chat app now creates the session once and reuses it across requests via composio.use(sessionId), which is the correct pattern for multi-turn chat apps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @abir-taheer's task in 1m 9s —— View job ReviewLooks good. ✅ The cookbook now correctly demonstrates the multi-turn session pattern:
No issues to flag against the docs-reviewer checklist — no wrong API usage, no missing steps, no outdated patterns, and no new pages requiring index entries.
|
There was a problem hiding this comment.
Pull request overview
Updates the chat-app cookbook and its example API route to demonstrate the recommended multi-turn pattern: create a Composio session once, then reuse it across subsequent requests via composio.use(sessionId).
Changes:
- Updated
docs/examples/chat-app/route.tsto reuse an existing session when asessionIdis available. - Updated the cookbook narrative to describe the create-once/reuse pattern for multi-turn chat apps.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/examples/chat-app/route.ts | Introduces session reuse via .use(sessionId) in the chat route example. |
| docs/content/cookbooks/chat-app.mdx | Updates the cookbook explanation to match the intended multi-turn session reuse workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Shows how to modify a session's config (toolkits, auth configs, connected accounts, etc.) without creating a new session. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @abir-taheer's task in 1m 24s —— View job Review (synchronize)Looks good. ✅ The push since my last review adds an "Updating a session" section to API accuracy verified
No new index entries required — section was added to an existing page, not a new file. Re: prior Copilot comments
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c1b1fa7. Configure here.
Sessions preserve tool access and connected accounts, not chat memory. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @abir-taheer's task in 48s —— View job Review (synchronize)Looks good. ✅ The push since my last review is a single one-line wording fix in What changed
Why this is the right fix This addresses the exact concern flagged in my previous review and in Copilot's review comment on the same line: a Composio session scopes tool access and connected-account state, while chat context comes from the message history sent to the model on each request. The new wording is technically accurate without overclaiming. Re-applied docs-reviewer checklist
|
zen-agent
left a comment
There was a problem hiding this comment.
Docs follow-up looks good. Session reuse pattern via composio.use(sessionId) is the right guidance, and the new session.update() section in users-and-sessions.mdx is a useful addition.

Summary
Follow-up to #3357 per Dhawal's review comments.
route.tsto create session once and reuse viacomposio.use(sessionId)across requests — the correct pattern for multi-turn chat appsWhat was checked but didn't need changes
.use()doesn't applyTest plan
🤖 Generated with Claude Code