Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
docs: reorder copied prompt — code first, rules after
Sushmitha Malleshecd602c2b0c5
diff --git a/docs/components/quickstart/prompt-banner.tsx b/docs/components/quickstart/prompt-banner.tsxindex 55964d777..ebb06c0ac 100644--- a/docs/components/quickstart/prompt-banner.tsx+++ b/docs/components/quickstart/prompt-banner.tsx@@ -41,7 +41,13 @@ export function PromptBanner({ children }: PromptBannerProps) {};const handleCopy = () => {- const promptMeta = contentRef.current?.innerText ?? '';+ const fullMeta = contentRef.current?.innerText ?? '';++ // Split prompt into context (before "Key concepts") and rules (from "Key concepts" onward)+ const splitMarker = 'Key concepts';+ const splitIdx = fullMeta.indexOf(splitMarker);+ const context = splitIdx > 0 ? fullMeta.slice(0, splitIdx).trim() : fullMeta;+ const rules = splitIdx > 0 ? fullMeta.slice(splitIdx).trim() : '';// Walk siblings after the banner to find the .fd-steps elementlet sibling = contentRef.current?.closest('.not-prose')?.nextElementSibling;@@ -54,9 +60,11 @@ export function PromptBanner({ children }: PromptBannerProps) {sibling = sibling.nextElementSibling;}- const fullPrompt = stepsText- ? `${promptMeta}\n\n## Code from tutorial\n\n${stepsText}`- : promptMeta;+ // Order: context → code → rules+ const parts = [context];+ if (stepsText) parts.push(`## Code\n\n${stepsText}`);+ if (rules) parts.push(rules);+ const fullPrompt = parts.join('\n\n');navigator.clipboard.writeText(fullPrompt);setCopied(true);diff --git a/docs/content/docs/quickstart.mdx b/docs/content/docs/quickstart.mdxindex a740a0943..652211b2a 100644--- a/docs/content/docs/quickstart.mdx+++ b/docs/content/docs/quickstart.mdx@@ -18,8 +18,6 @@ Build your first AI agent with Composio Tools. You'll create a [session](/docs/uGive your OpenAI Agent access to 1000+ tools (Gmail, GitHub, Slack, Notion, etc.) via Composio. Composio handles authentication, tool discovery, and execution. You create a **session** for a user, get tools from that session, and pass them to your Agent.-The complete code examples from the official tutorial are included below.-**Key concepts**- **Session**: Scoped environment for a user. Created with `composio.create(userId)`. Sessions have access to all toolkits by default — the agent discovers which tools to use via `COMPOSIO_SEARCH_TOOLS`.@@ -201,8 +199,6 @@ readline.close();Give your OpenAI Agent access to 1000+ tools (Gmail, GitHub, Slack, Notion, etc.) via Composio's hosted MCP server. No provider package needed — you connect directly to Composio's MCP endpoint. Composio handles authentication, tool discovery, and execution. You create a **session** for a user and pass the MCP connection to your Agent.-The complete code examples from the official tutorial are included below.-**Key concepts**- **Session**: Scoped environment for a user. Created with `composio.create(userId)`. Sessions have access to all toolkits by default — the agent discovers which tools to use via `COMPOSIO_SEARCH_TOOLS`.@@ -405,8 +401,6 @@ readline.close();Give your Claude agent access to 1000+ tools (Gmail, GitHub, Slack, Notion, etc.) via Composio. Composio handles authentication, tool discovery, and execution. You create a **session** for a user, get tools, wrap them in an SDK MCP server, and pass that server to ClaudeAgentOptions.-The complete code examples from the official tutorial are included below.-**Key concepts**- **Session**: Scoped environment for a user. Created with `composio.create(userId)`. Sessions have access to all toolkits by default — the agent discovers which tools to use via `COMPOSIO_SEARCH_TOOLS`.@@ -617,8 +611,6 @@ readline.close();Give your Claude agent access to 1000+ tools (Gmail, GitHub, Slack, Notion, etc.) via Composio's hosted MCP server. No provider package needed — you connect directly to Composio's MCP endpoint. Composio handles authentication, tool discovery, and execution. You create a **session** for a user and pass the MCP connection to ClaudeAgentOptions.-The complete code examples from the official tutorial are included below.-**Key concepts**- **Session**: Scoped environment for a user. Created with `composio.create(userId)`. Sessions have access to all toolkits by default — the agent discovers which tools to use via `COMPOSIO_SEARCH_TOOLS`.@@ -846,8 +838,6 @@ readline.close();Give your Vercel AI agent access to 1000+ tools (Gmail, GitHub, Slack, Notion, etc.) via Composio. Composio handles authentication, tool discovery, and execution. You create a **session** for a user, get tools from that session, and pass them to `streamText` or `generateText`. TypeScript only.-The complete code examples from the official tutorial are included below.-**Key concepts**- **Session**: Scoped environment for a user. Created with `composio.create(userId)`. Sessions have access to all toolkits by default — the agent discovers which tools to use via `COMPOSIO_SEARCH_TOOLS`.@@ -989,8 +979,6 @@ readline.close();Give your Vercel AI agent access to 1000+ tools (Gmail, GitHub, Slack, Notion, etc.) via Composio's hosted MCP server. No provider package needed — you connect directly to Composio's MCP endpoint using `@ai-sdk/mcp`. Composio handles authentication, tool discovery, and execution. TypeScript only.-The complete code examples from the official tutorial are included below.-**Key concepts**- **Session**: Scoped environment for a user. Created with `composio.create(userId)`. Sessions have access to all toolkits by default — the agent discovers which tools to use via `COMPOSIO_SEARCH_TOOLS`.