@devries-cameron20 / composio Mirror · read-only / commits / f9405755e
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 21, 09:45 UTC

docs(instant): consolidate catalog cleanup and dashboard screenshots

palash-c committed Oct 8, 2026 at 01:02 UTC f9405755e0396efed475b2ec860c712b9ccb47f4
25 files changed +221 -64
docs/app/(home)/toolkits/[[...slug]]/page.tsx
+3 -4
@@ -28,8 +28,7 @@ export const dynamicParams = true;
28 // Fetch detailed tool info from Composio API (server-side only)
29 // Returns null on failure, empty array if toolkit has no tools
30 async function fetchDetailedTools(
31 - toolkitSlug: string,
32 - version?: string | null
31 + toolkitSlug: string
32 ): Promise<Tool[] | null> {
33 if (!API_KEY) {
34 console.warn('[Toolkits] COMPOSIO_API_KEY not set, skipping detailed tool fetch');
@@ -38,7 +37,7 @@ async function fetchDetailedTools(
37
38 try {
39 const response = await fetch(
41 - `${API_BASE}/tools?toolkit_slug=${toolkitSlug.toUpperCase()}&toolkit_versions=latest&limit=10000${version ? `&version=${encodeURIComponent(version)}` : ''}`,
40 + `${API_BASE}/tools?toolkit_slug=${toolkitSlug.toUpperCase()}&toolkit_versions=latest&include_pricing=true&limit=10000`,
41 {
42 headers: {
43 'Content-Type': 'application/json',
@@ -241,7 +240,7 @@ export default async function ToolkitsPage({ params }: { params: Promise<{ slug?
240 if (toolkit) {
241 // Fetch detailed tool/trigger info and FAQ content in parallel
242 const [detailedTools, detailedTriggers, faq] = await Promise.all([
244 - fetchDetailedTools(toolkit.slug, toolkit.version),
243 + fetchDetailedTools(toolkit.slug),
244 fetchDetailedTriggers(toolkit.slug, toolkit.version),
245 readToolkitFaq(toolkit.slug),
246 ]);
docs/app/api/tools/[slug]/route.ts
+13 -3
@@ -1,4 +1,14 @@
1 import { NextRequest, NextResponse } from 'next/server';
2 +import { z } from 'zod';
3 +import { instantSchema } from '@/lib/instant';
4 +
5 +const toolDetailsSchema = z.object({
6 + input_parameters: z.unknown().optional(),
7 + parameters: z.unknown().optional(),
8 + output_parameters: z.unknown().optional(),
9 + response: z.unknown().optional(),
10 + instant: instantSchema,
11 +});
12
13 const API_BASE = process.env.COMPOSIO_API_BASE || 'https://backend.composio.dev/api/v3';
14 const API_KEY = process.env.COMPOSIO_API_KEY;
@@ -20,7 +30,7 @@ export async function GET(
30
31 try {
32 const response = await fetch(
23 - `${API_BASE}/tools/${slug.toUpperCase()}?version=${encodeURIComponent(version)}`,
33 + `${API_BASE}/tools/${slug.toUpperCase()}?version=${encodeURIComponent(version)}${version === 'latest' ? '&include_pricing=true' : ''}`,
34 {
35 headers: {
36 'Content-Type': 'application/json',
@@ -34,15 +44,15 @@ export async function GET(
44 return NextResponse.json({ error: 'Tool not found' }, { status: response.status });
45 }
46
37 - const tool = await response.json();
47 + const tool = toolDetailsSchema.parse(await response.json());
48
39 - // Return just the schemas
49 const inputSchema = tool.input_parameters || tool.parameters;
50 const outputSchema = tool.output_parameters || tool.response;
51
52 return NextResponse.json({
53 input_parameters: inputSchema || null,
54 output_parameters: outputSchema || null,
55 + ...(version === 'latest' && tool.instant ? { instant: tool.instant } : {}),
56 });
57 } catch {
58 return NextResponse.json({ error: 'Failed to fetch tool' }, { status: 500 });
docs/app/llms.mdx/[[...slug]]/route.ts
+13 -2
@@ -1,3 +1,4 @@
1 +import { instantDiscount, instantPricingDescription } from '@/lib/instant';
2 import {
3 source,
4 getReferenceSource,
@@ -55,7 +56,7 @@ async function fetchDetailedTools(toolkitSlug: string): Promise<Tool[] | null> {
56
57 try {
58 const response = await fetch(
58 - `${API_BASE}/tools?toolkit_slug=${toolkitSlug.toUpperCase()}&toolkit_versions=latest&limit=${API_FETCH_LIMIT}`,
59 + `${API_BASE}/tools?toolkit_slug=${toolkitSlug.toUpperCase()}&toolkit_versions=latest&include_pricing=true&limit=${API_FETCH_LIMIT}`,
60 {
61 headers: {
62 'Content-Type': 'application/json',
@@ -870,6 +871,10 @@ function toolkitToMarkdown(
871 lines.push(`- **Version:** ${toolkit.version}`);
872 }
873
874 + if (toolkit.instant?.supported === true) {
875 + lines.push('- **Instant:** Supported on the latest version. Support varies by tool.');
876 + }
877 +
878 if (faqMarkdown && faqMarkdown.trim()) {
879 lines.push('', '## Frequently Asked Questions', '');
880 // Bump ## headings to ### so FAQ questions are children of the FAQ section
@@ -882,6 +887,12 @@ function toolkitToMarkdown(
887 lines.push(`### ${tool.name}`, '');
888 lines.push(`**Slug:** \`${tool.slug}\``, '');
889 lines.push(tool.description, '');
890 + if (tool.instant?.supported === true) {
891 + lines.push('**Instant:** Supported on the latest version.', '',
892 + `**Instant pricing:** ${instantPricingDescription(tool.instant)}`, '');
893 + const discount = instantDiscount(tool.instant);
894 + if (discount !== undefined) lines.push(`**Discount:** ${discount}`, '');
895 + }
896
897 // Input parameters
898 if (tool.input_parameters && Object.keys(tool.input_parameters).length > 0) {
@@ -1009,7 +1020,7 @@ async function generateToolkitsIndex(): Promise<string> {
1020 '',
1021 `Composio supports ${toolkits.length} toolkits for building AI agents.`,
1022 '',
1012 - '- [Premium Tools](/toolkits/pro-tools.md) - Which tools cost extra, how they are priced, and what the limits are',
1023 + '- [Instant Tools](/docs/instant-tools.md) - Run supported tools on Composio accounts and control usage charges',
1024 '- [Managed OAuth apps](/toolkits/managed-auth.md) - Check whether Composio provides the OAuth app for a toolkit',
1025 '',
1026 '## All Toolkits',
docs/components/toolkits/instant-badge.tsx new
+7
@@ -0,0 +1,7 @@
1 +export function InstantBadge() {
2 + return (
3 + <span className="shrink-0 rounded bg-fd-accent px-1.5 py-0.5 text-xs font-medium text-fd-foreground" title="Instant is supported on the latest version">
4 + Instant
5 + </span>
6 + );
7 +}
docs/components/toolkits/toolkit-detail.tsx
+18 -2
@@ -6,6 +6,8 @@ import { Search, Copy, Check, ChevronDown, ChevronRight, ArrowLeft } from 'lucid
6 import { TypeTable } from 'fumadocs-ui/components/type-table';
7 import type { Toolkit, Tool, Trigger, ParameterSchema } from '@/types/toolkit';
8 import { processSchema } from '@/lib/toolkit-schema';
9 +import { instantDiscount, instantPricingDescription } from '@/lib/instant';
10 +import { InstantBadge } from './instant-badge';
11 import { PageActions } from '@/components/page-actions';
12 import { EditOnGitHub } from '@/components/edit-on-github';
13 import { AuthDetailsSection } from '@/components/toolkits/auth-details-section';
@@ -146,7 +148,7 @@ function isTrigger(item: Tool | Trigger): item is Trigger {
148 return 'config' in item || 'payload' in item || 'type' in item;
149 }
150
149 -function ToolItem({ item, toolkitVersion }: { item: Tool | Trigger; toolkitVersion?: string | null }) {
151 +function ToolItem({ item, toolkitVersion, instant }: { item: Tool | Trigger; toolkitVersion?: string | null; instant?: Tool['instant'] }) {
152 const [expanded, setExpanded] = useState(false);
153 const [copied, setCopied] = useState(false);
154 const [detailedParams, setDetailedParams] = useState<{
@@ -164,6 +166,7 @@ function ToolItem({ item, toolkitVersion }: { item: Tool | Trigger; toolkitVersi
166
167 const tool = isTool(item) ? item : null;
168 const trigger = isTrigger(item) ? item : null;
169 + const discount = instantDiscount(instant);
170
171 // Fetch detailed schema once when a tool is first expanded
172 useEffect(() => {
@@ -205,6 +208,7 @@ function ToolItem({ item, toolkitVersion }: { item: Tool | Trigger; toolkitVersi
208 <span className="flex min-w-0 flex-1 flex-col gap-1 sm:flex-row sm:items-center sm:justify-between sm:gap-2">
209 <span className="flex items-center gap-2">
210 <span className="truncate text-sm font-medium text-fd-foreground">{item.name}</span>
211 + {instant?.supported === true && <InstantBadge />}
212 {trigger?.type && (
213 <span className={`shrink-0 rounded px-1.5 py-0.5 text-xs font-medium ${
214 trigger.type === 'webhook'
@@ -228,6 +232,12 @@ function ToolItem({ item, toolkitVersion }: { item: Tool | Trigger; toolkitVersi
232 {expanded && (
233 <div className="space-y-4 bg-fd-muted/20 px-3 py-3 sm:px-4 sm:pl-10">
234 <p className="text-sm text-fd-muted-foreground">{item.description}</p>
235 + {instant?.supported === true && (
236 + <p className="text-sm text-fd-muted-foreground">Instant pricing, latest version. {instantPricingDescription(instant)}</p>
237 + )}
238 + {discount !== undefined && (
239 + <p className="text-sm text-fd-muted-foreground">Discount: {discount}</p>
240 + )}
241
242 {/* Tool parameters */}
243 {hasInputParams && (
@@ -325,6 +335,7 @@ export function ToolkitDetail({ toolkit, tools, triggers, path, faq }: ToolkitDe
335 {/* Title row */}
336 <div className="flex flex-wrap items-center gap-x-2 gap-y-1">
337 <h1 className="text-xl font-bold tracking-tight text-fd-foreground">{(toolkit.name?.trim() || toolkit.slug)}</h1>
338 + {toolkit.instant?.supported === true && <InstantBadge />}
339 <button
340 onClick={copySlug}
341 className="inline-flex items-center gap-1 rounded bg-fd-muted px-1.5 py-0.5 font-mono text-xs text-fd-muted-foreground transition-colors hover:text-fd-foreground"
@@ -348,6 +359,11 @@ export function ToolkitDetail({ toolkit, tools, triggers, path, faq }: ToolkitDe
359
360 {/* Description */}
361 <p className="mt-1.5 text-sm text-fd-muted-foreground">{toolkit.description}</p>
362 + {toolkit.instant?.supported === true && (
363 + <p className="mt-1.5 text-sm text-fd-muted-foreground">
364 + <Link href="/docs/instant-tools" className="underline">Instant</Link> is available on the latest version. Check each tool for support and pricing.
365 + </p>
366 + )}
367 </div>
368 </div>
369
@@ -418,7 +434,7 @@ export function ToolkitDetail({ toolkit, tools, triggers, path, faq }: ToolkitDe
434 {activeTab === 'tools' && (
435 filteredTools.length > 0 ? (
436 filteredTools.map((tool) => (
421 - <ToolItem key={tool.slug} item={tool} toolkitVersion={toolkit.version} />
437 + <ToolItem key={tool.slug} item={tool} toolkitVersion="latest" instant={tool.instant} />
438 ))
439 ) : (
440 <p className="px-4 py-8 text-center text-sm text-fd-muted-foreground">
docs/components/toolkits/toolkits-landing.tsx
+4 -1
@@ -1,5 +1,7 @@
1 'use client';
2
3 +import { InstantBadge } from './instant-badge';
4 +
5 import { useState, useMemo, useDeferredValue } from 'react';
6 import Link from 'next/link';
7 import { Search, Sparkles, Wrench, Zap, Copy, Check, ExternalLink, Grip, ShieldCheck } from 'lucide-react';
@@ -78,6 +80,7 @@ function ToolkitRow({ toolkit, lazy = true }: { toolkit: ToolkitSummary; lazy?:
80 <ToolkitIcon toolkit={toolkit} lazy={lazy} />
81 <div className="flex min-w-0 flex-1 flex-col gap-1 sm:flex-row sm:items-center sm:gap-3">
82 <span className="truncate text-sm font-medium text-fd-foreground">{toolkit.name.trim()}</span>
83 + {toolkit.instant?.supported === true && <InstantBadge />}
84 <CopySlugButton slug={toolkit.slug} />
85 </div>
86 </div>
@@ -182,7 +185,7 @@ export function ToolkitsLanding() {
185 {/* Cards */}
186 <Cards>
187 <Card icon={<ShieldCheck />} title="Managed OAuth apps" href="/toolkits/managed-auth" description="Check which toolkits have managed OAuth" />
185 - <Card icon={<Sparkles />} title="Premium Tools" href="/toolkits/pro-tools" description="Learn about pricing and limits" />
188 + <Card icon={<Sparkles />} title="Instant Tools" href="/docs/instant-tools" description="Run supported tools on Composio accounts" />
189 <Card icon={<Wrench />} title="Meta Tools" href="/toolkits/meta-tools" description="The system tools every session gives your agent" />
190 </Cards>
191
docs/content/docs/instant-tools.mdx
+5 -3
@@ -13,6 +13,8 @@ Instant Tools were previously called Premium Tools.
13
14 In [project Settings](https://dashboard.composio.dev/~/project/settings/general?utm_source=docs&utm_medium=content&utm_campaign=instant-tools), turn on **Instant Toolkits**. Developer projects start with this setting off. A Session cannot override a project where Instant is off.
15
16 +<Figure src="/images/instant-project-setting.jpg" alt="Instant Toolkits toggle in developer project settings, with a note that calls charge the organization's balance" caption="Enable Instant Toolkits for the project before creating a Session." />
17 +
18 Once enabled, new Sessions can use eligible Instant tools by default, even if `instant` is omitted. Session restrictions can narrow this access. Set `instant=False` in Python or `instant: false` in TypeScript when creating a Session that must not incur Instant usage charges.
19
20 <Callout type="info" title="Experimental access">
@@ -61,11 +63,11 @@ Top-level `toolkits` controls which tools the Session can discover and run. Omit
63
64 Instant coverage is per tool, not per toolkit. A toolkit may support instant tools without every tool in it being eligible. Composio's provider account can be shared across customers, so only reviewed actions can run through it. Actions that could reveal shared account history or send arbitrary proxy requests are excluded. Use a connected account for actions Instant does not support.
65
64 -In the dashboard, open **Toolkits** and select the filter for instant tools. An **Instant** badge on a toolkit means at least one of its tools supports Instant access. Open the toolkit to find the **Instant** badge beside each eligible tool.
66 +In the dashboard, open **Toolkits** and select **Instant Toolkits**. A lightning icon marks toolkits with Instant support. Open a toolkit's **Instant tools** tab to see its eligible tools.
67
66 -<Figure src="/images/instant-toolkit-filter.png" alt="Toolkits dashboard with the instant tools filter selected and Instant badges on matching toolkits" caption="Filter the toolkit catalog to find Instant support." />
68 +<Figure src="/images/instant-toolkit-filter.jpg" alt="Developer toolkit catalog with the Instant Toolkits filter selected and lightning icons beside eligible toolkits" caption="Filter the toolkit catalog to find Instant support." />
69
68 -<Figure src="/images/instant-tool-eligibility.png" alt="Firecrawl toolkit page with Instant badges on Map multiple URLs, Scrape URL, and Search, but not on other tools" caption="Check individual tools before using an Instant account." />
70 +<Figure src="/images/instant-tool-eligibility.jpg" alt="Firecrawl's Instant tools tab lists Map multiple URLs, Scrape URL, and Search separately from its 29 total tools" caption="Open the Instant tools tab to see which tools support an Instant account." />
71
72 ### List supported toolkits
73
docs/content/kb/guide/toolkits-serpapi.mdx
+3 -3
@@ -2,7 +2,7 @@
2 title: "SerpApi"
3 description: "Public support knowledge for SerpApi."
4 keywords: ["for-you","platform","serpapi","authentication","errors-and-troubleshooting","sessions-and-execution","toolkits-and-providers","/kb/toolkits/serpapi-troubleshooting","avoid-serpapi-ebay-search-when-its-schema-causes-field-errors","disable-serpapi-by-listing-premium-toolkit-slugs-in-session-config","search-and-scraping-use-cases-can-use-serpapi-alongside-firecrawl-exa","serpapi-api-key-validation-was-not-available-in-the-connection-flow","serpapi-troubleshooting","use-toolkit-details-to-inspect-serpapi-required-auth-fields"]
5 -sources: [{"sourcePath":"toolkits/serpapi/public.md","sourceHeading":"Disable SerpAPI by listing premium toolkit slugs in session config"},{"sourcePath":"toolkits/serpapi/public.md","sourceHeading":"Use toolkit details to inspect SerpAPI required auth fields"},{"sourcePath":"toolkits/serpapi/public.md","sourceHeading":"Search and scraping use cases can use SerpAPI alongside Firecrawl, Exa, Tavily, or Composio Search"}]
5 +sources: [{"sourcePath":"toolkits/serpapi/public.md","sourceHeading":"Control SerpAPI availability in a Session"},{"sourcePath":"toolkits/serpapi/public.md","sourceHeading":"Use toolkit details to inspect SerpAPI required auth fields"},{"sourcePath":"toolkits/serpapi/public.md","sourceHeading":"Search and scraping use cases can use SerpAPI alongside Firecrawl, Exa, Tavily, or Composio Search"}]
6 lastVerifiedAt: "2026-08-12"
7 reviewAfter: "2026-11-10"
8 freshness: "evergreen"
@@ -10,9 +10,9 @@ topics: ["authentication","errors-and-troubleshooting","sessions-and-execution",
10 toolkitSlugs: ["serpapi"]
11 aliases: ["/kb/toolkits/serpapi-troubleshooting","avoid-serpapi-ebay-search-when-its-schema-causes-field-errors","disable-serpapi-by-listing-premium-toolkit-slugs-in-session-config","search-and-scraping-use-cases-can-use-serpapi-alongside-firecrawl-exa","serpapi-api-key-validation-was-not-available-in-the-connection-flow","serpapi-troubleshooting","use-toolkit-details-to-inspect-serpapi-required-auth-fields"]
12 ---
13 -## Disable SerpAPI by listing premium toolkit slugs in session config
13 +## Control SerpAPI availability in a Session
14
15 -There is no single global toggle for premium tools. To prevent SerpAPI from being available in a session, list `serpapi` in the disabled toolkit slugs for the session config. Other premium slugs commonly disabled together include `composio_search`, `perplexityai`, `exa`, and `codeinterpreter`.
15 +To exclude SerpAPI from a Session, disable `serpapi` in the top-level [toolkit configuration](/docs/configuring-sessions). To control only access through Composio accounts while keeping connected-account routes available, use the [Instant usage controls](/docs/instant-tools#control-instant-usage). Instant eligibility is per tool.
16
17 ## Use toolkit details to inspect SerpAPI required auth fields
18
docs/content/toolkits/pro-tools.mdx deleted
-35
@@ -1,35 +0,0 @@
1 ----
2 -title: Premium Tools
3 -description: Pricing and limits for premium tools in Composio
4 ----
5 -
6 -Some tool calls cost more to run — search APIs, code sandboxes, ML inference. We call those premium tools and price them separately.
7 -
8 -## What counts as a premium tool?
9 -
10 -<Cards>
11 - <Card icon={<Search />} title="Search APIs" href="/toolkits/composio_search" description="Composio Search, Perplexity, Exa, SerpAPI" />
12 - <Card icon={<Code />} title="Code execution" href="/toolkits/codeinterpreter" description="Sandboxed runtimes like E2B" />
13 - <Card icon={<Database />} title="Web scraping & data extraction" description="Crawlers and structured extraction" />
14 - <Card icon={<Zap />} title="AI/ML inference" description="Hosted model calls and embeddings" />
15 - <Card icon={<Wrench />} title="Document processing & OCR" description="PDF, image, and document parsing" />
16 - <Card icon={<Rocket />} title="Compute-intensive operations" description="Long-running or heavy transforms" />
17 -</Cards>
18 -
19 -## Pricing
20 -
21 -Premium tools run on paid third-party providers (web search, media generation, browser automation, and similar). Composio passes the provider's price through with a 5% platform fee — there is no markup on top of that. Approximate per-call prices for each provider are listed in the **Premium tools** section of the [pricing page](https://composio.dev/pricing).
22 -
23 -- **Hobby** includes up to $2/month of premium tool usage.
24 -- **Pro** includes everything in Hobby plus a $29 monthly usage credit, which also covers premium tool calls.
25 -- Prices depend on the provider and can change with advance notice — check the [pricing page](https://composio.dev/pricing) for current rates.
26 -
27 -## Rate limits
28 -
29 -Premium tools have their own, lower rate limits. These apply to premium tool executions only and are separate from your organization's overall API rate limit — see [Rate Limits](/reference/rate-limits) for that. If you need more, [contact us](https://composio.dev/contact?utm_source=docs&cta_placement=docs-pro-tools).
30 -
31 -| Plan | Premium Tool Calls Rate Limit |
32 -|------|-------------------------------|
33 -| Hobby | 1,000/hour |
34 -| Pro | 10,000/hour |
35 -| Enterprise | Custom |
docs/kb/articles/toolkits-serpapi.md
+2 -2
@@ -1,6 +1,6 @@
1 -## Disable SerpAPI by listing premium toolkit slugs in session config
1 +## Control SerpAPI availability in a Session
2
3 -There is no single global toggle for premium tools. To prevent SerpAPI from being available in a session, list `serpapi` in the disabled toolkit slugs for the session config. Other premium slugs commonly disabled together include `composio_search`, `perplexityai`, `exa`, and `codeinterpreter`.
3 +To exclude SerpAPI from a Session, disable `serpapi` in the top-level [toolkit configuration](/docs/configuring-sessions). To control only access through Composio accounts while keeping connected-account routes available, use the [Instant usage controls](/docs/instant-tools#control-instant-usage). Instant eligibility is per tool.
4
5 ## Use toolkit details to inspect SerpAPI required auth fields
6
docs/kb/manifest.json
+1 -1
@@ -5231,7 +5231,7 @@
5231 "sources": [
5232 {
5233 "sourcePath": "toolkits/serpapi/public.md",
5234 - "sourceHeading": "Disable SerpAPI by listing premium toolkit slugs in session config"
5234 + "sourceHeading": "Control SerpAPI availability in a Session"
5235 },
5236 {
5237 "sourcePath": "toolkits/serpapi/public.md",
docs/kb/source/toolkits/serpapi/public.md
+2 -2
@@ -11,9 +11,9 @@ tags:
11 # SerpApi
12
13
14 -## Disable SerpAPI by listing premium toolkit slugs in session config
14 +## Control SerpAPI availability in a Session
15
16 -There is no single global toggle for premium tools. To prevent SerpAPI from being available in a session, list `serpapi` in the disabled toolkit slugs for the session config. Other premium slugs commonly disabled together include `composio_search`, `perplexityai`, `exa`, and `codeinterpreter`.
16 +To exclude SerpAPI from a Session, disable `serpapi` in the top-level [toolkit configuration](/docs/configuring-sessions). To control only access through Composio accounts while keeping connected-account routes available, use the [Instant usage controls](/docs/instant-tools#control-instant-usage). Instant eligibility is per tool.
17
18 ## Use toolkit details to inspect SerpAPI required auth fields
19
docs/lib/instant.ts new
+22
@@ -0,0 +1,22 @@
1 +import { z } from 'zod';
2 +
3 +export const instantSchema = z.object({
4 + supported: z.boolean().optional().catch(undefined),
5 + price: z.object({
6 + description: z.string().optional().catch(undefined),
7 + discount: z.string().optional().catch(undefined),
8 + }).optional().catch(undefined),
9 +}).optional().catch(undefined);
10 +
11 +export type Instant = z.infer<typeof instantSchema>;
12 +
13 +export function instantPricingDescription(instant: Instant): string | undefined {
14 + if (instant?.supported !== true) return undefined;
15 + return instant.price?.description?.trim() || 'Pricing is not available.';
16 +}
17 +
18 +export function instantDiscount(instant: Instant): string | undefined {
19 + if (instant?.supported !== true) return undefined;
20 + const discount = instant.price?.discount;
21 + return discount?.trim() && discount.trim() !== '0' ? discount : undefined;
22 +}
docs/lib/toolkit-api.ts
+3
@@ -1,4 +1,5 @@
1 import { z } from 'zod';
2 +import { instantSchema } from './instant';
3 import { isPublicToolkitSlug, normalizeToolkitSlug } from '@/lib/public-toolkit-policy';
4 import { PRODUCTION_API_V3_URL } from '@/scripts/production-api.mjs';
5 import type { AuthConfigDetail, AuthConfigField, Toolkit } from '@/types/toolkit';
@@ -72,6 +73,7 @@ const categorySchema = z.union([
73
74 const rawToolkitSchema = z
75 .object({
76 + instant: instantSchema,
77 slug: z.string().catch(''),
78 name: optionalString,
79 type: z.enum(['native', 'custom']).optional().catch(undefined),
@@ -187,6 +189,7 @@ function toolkitFromRaw(raw: RawToolkit, slug: string): Toolkit {
189 return {
190 slug,
191 name: raw.name || raw.slug || slug,
192 + ...(raw.instant ? { instant: raw.instant } : {}),
193 logo: raw.meta.logo || null,
194 description: raw.meta.description,
195 category: category.success && category.data ? category.data : null,
docs/lib/toolkit-schema.ts
+3
@@ -1,4 +1,5 @@
1 import { z } from 'zod';
2 +import { instantSchema } from './instant';
3 import type { ParameterSchema, Tool, Trigger } from '@/types/toolkit';
4
5 // Zod schemas for the untyped tool/trigger payloads the Composio API returns.
@@ -122,6 +123,7 @@ export function processSchema(schema: unknown): Record<string, ParameterSchema>
123 // --- Tools ------------------------------------------------------------------
124
125 const rawApiToolSchema = z.object({
126 + instant: instantSchema,
127 slug: lenientString,
128 name: optionalString,
129 display_name: optionalString,
@@ -147,6 +149,7 @@ function toolFromRaw(raw: RawApiTool): Tool {
149 scopes: raw.scopes.length > 0 ? raw.scopes : undefined,
150 tags: raw.tags.length > 0 ? raw.tags : undefined,
151 is_deprecated: raw.is_deprecated,
152 + ...(raw.instant ? { instant: raw.instant } : {}),
153 };
154 }
155
docs/next.config.mjs
+7 -2
@@ -86,8 +86,13 @@ const config = {
86 permanent: true,
87 },
88 {
89 - source: '/toolkits/premium-tools',
90 - destination: '/toolkits/pro-tools',
89 + source: '/toolkits/:legacy(pro-tools|premium-tools)',
90 + destination: '/docs/instant-tools',
91 + permanent: true,
92 + },
93 + {
94 + source: '/toolkits/:legacy(pro-tools|premium-tools).:format(md|mdx)',
95 + destination: '/docs/instant-tools.md',
96 permanent: true,
97 },
98 // Deleted/merged pages -> closest surviving page (semantically resolved + verified)
docs/public/images/instant-project-setting.jpg
Binary files /dev/null and b/docs/public/images/instant-project-setting.jpg differ
docs/public/images/instant-tool-eligibility.jpg
Binary files /dev/null and b/docs/public/images/instant-tool-eligibility.jpg differ
docs/public/images/instant-toolkit-filter.jpg
Binary files /dev/null and b/docs/public/images/instant-toolkit-filter.jpg differ
docs/scripts/generate-toolkits.ts
+11 -4
@@ -15,12 +15,14 @@ import { requireProductionApiV3Url, stripStagingHosts } from './production-api.m
15 import { applyToolkitVersions, fetchProductionToolkitVersions } from './toolkit-versions';
16 import { isPublicToolkitSlug } from '../lib/public-toolkit-policy';
17 import { z } from 'zod';
18 +import { instantSchema, type Instant } from '../lib/instant';
19
20 const API_BASE = requireProductionApiV3Url(process.env.COMPOSIO_API_BASE);
21 const API_KEY = process.env.COMPOSIO_API_KEY;
22
23 const OUTPUT_DIR = join(process.cwd(), 'public/data');
24 interface Tool {
25 + instant?: Instant;
26 slug: string;
27 name: string;
28 description: string;
@@ -57,6 +59,7 @@ interface AuthConfigDetail {
59 }
60
61 interface Toolkit {
62 + instant?: Instant;
63 slug: string;
64 name: string;
65 logo: string | null;
@@ -90,6 +93,7 @@ const optionalStringArraySchema = z
93 );
94
95 const rawToolkitSchema = z.object({
96 + instant: instantSchema,
97 slug: z.string().catch(''),
98 name: z.string().optional().catch(undefined),
99 logo: z.string().optional().catch(undefined),
@@ -129,6 +133,7 @@ const slugItemSchema = z.object({ slug: z.string() });
133
134 // Tools/triggers list entries share the slug/name/description shape.
135 const rawNamedItemSchema = z.object({
136 + instant: instantSchema,
137 slug: z.string().catch(''),
138 name: z.string().optional().catch(undefined),
139 display_name: z.string().optional().catch(undefined),
@@ -145,8 +150,8 @@ const namedItemListSchema = z
150 items.flatMap(item => {
151 const parsed = rawNamedItemSchema.safeParse(item);
152 if (!parsed.success) return [];
148 - const { slug, name, display_name, description } = parsed.data;
149 - return [{ slug, name: name || display_name || slug, description }];
153 + const { slug, name, display_name, description, instant } = parsed.data;
154 + return [{ slug, name: name || display_name || slug, description, ...(instant ? { instant } : {}) }];
155 })
156 );
157
@@ -253,7 +258,7 @@ async function fetchToolkits(): Promise<unknown[]> {
258
259 async function fetchToolsForToolkit(slug: string): Promise<Tool[]> {
260 const response = await fetchWithRetry(
256 - `${API_BASE}/tools?toolkit_slug=${slug}&toolkit_versions=latest&limit=1000`,
261 + `${API_BASE}/tools?toolkit_slug=${slug}&toolkit_versions=latest&include_pricing=true&limit=1000`,
262 {
263 headers: {
264 'Content-Type': 'application/json',
@@ -360,6 +365,7 @@ export function transformToolkit(raw: unknown): Toolkit {
365 return {
366 slug,
367 name: toolkit.name || toolkit.slug,
368 + ...(toolkit.instant ? { instant: toolkit.instant } : {}),
369 logo: toolkit.meta.logo || toolkit.logo || null,
370 description: toolkit.meta.description || toolkit.description,
371 category: category || null,
@@ -440,13 +446,14 @@ async function main() {
446
447 // Write light file (for landing page - imported in client component)
448 // Excludes tools and triggers arrays to keep bundle size small
443 - const toolkitsLight = toolkits.map(({ slug, name, logo, category, toolCount, triggerCount }) => ({
449 + const toolkitsLight = toolkits.map(({ slug, name, logo, category, toolCount, triggerCount, instant }) => ({
450 slug,
451 name,
452 logo,
453 category,
454 toolCount,
455 triggerCount,
456 + ...(instant ? { instant } : {}),
457 }));
458 await writeFile(join(OUTPUT_DIR, 'toolkits-list.json'), JSON.stringify(toolkitsLight, null, 2));
459
docs/tests/static/instant-catalog.test.ts new
+48
@@ -0,0 +1,48 @@
1 +import { describe, expect, test } from 'bun:test';
2 +import { instantDiscount, instantPricingDescription, instantSchema } from '../../lib/instant';
3 +import { readFileSync } from 'node:fs';
4 +import { toolFromApi } from '../../lib/toolkit-schema';
5 +import { parseNamedItems, transformToolkit } from '../../scripts/generate-toolkits';
6 +
7 +describe('Instant catalog metadata', () => {
8 + test('missing, false, and partial support never imply eligibility', () => {
9 + for (const instant of [undefined, null, {}, { supported: false }, { supported: 'true' }, { price: { description: 'A price' } }]) {
10 + const parsed = instantSchema.parse(instant);
11 + expect(parsed?.supported === true).toBe(false);
12 + expect(instantPricingDescription(parsed)).toBeUndefined();
13 + }
14 + });
15 +
16 + test('missing or malformed pricing is not free', () => {
17 + for (const price of [undefined, null, {}, { description: '' }, { description: 0 }]) {
18 + expect(instantPricingDescription(instantSchema.parse({ supported: true, price }))).toBe('Pricing is not available.');
19 + }
20 + });
21 +
22 + test('generator and API parsers preserve the same metadata, including string discounts', () => {
23 + const instant = { supported: true, price: { description: '$1 per request', discount: '0' } };
24 + const raw = { slug: 'EXAMPLE', instant };
25 + expect(transformToolkit(raw).instant).toEqual(instant);
26 + expect(parseNamedItems({ items: [raw] })[0].instant).toEqual(instant);
27 + expect(toolFromApi(raw).instant).toEqual(instant);
28 + expect(instantPricingDescription(instant)).toBe('$1 per request');
29 + expect(toolFromApi({ slug: 'OTHER' }).instant).toBeUndefined();
30 + });
31 +
32 + test('shows meaningful discount strings without interpreting units', () => {
33 + for (const discount of ['15', '$0.20', '20% off']) {
34 + expect(instantDiscount(instantSchema.parse({ supported: true, price: { discount } }))).toBe(discount);
35 + }
36 + for (const discount of [undefined, null, '', ' ', '0', ' 0 ', 15]) {
37 + expect(instantDiscount(instantSchema.parse({ supported: true, price: { discount } }))).toBeUndefined();
38 + }
39 + expect(instantDiscount(instantSchema.parse({ supported: false, price: { discount: '15' } }))).toBeUndefined();
40 + expect(instantDiscount(undefined)).toBeUndefined();
41 + });
42 +
43 + test('tool expansions request latest schemas while triggers retain their toolkit version', () => {
44 + const source = readFileSync(new URL('../../components/toolkits/toolkit-detail.tsx', import.meta.url), 'utf8');
45 + expect(source).toContain('item={tool} toolkitVersion="latest"');
46 + expect(source).toContain('item={trigger} toolkitVersion={toolkit.version}');
47 + });
48 +});
docs/tests/static/instant-tool-route.test.ts new
+42
@@ -0,0 +1,42 @@
1 +import { afterEach, beforeAll, describe, expect, mock, test } from 'bun:test';
2 +import { NextRequest } from 'next/server';
3 +
4 +const originalFetch = globalThis.fetch;
5 +let getTool: typeof import('../../app/api/tools/[slug]/route').GET;
6 +
7 +beforeAll(async () => {
8 + const apiKey = process.env.COMPOSIO_API_KEY;
9 + process.env.COMPOSIO_API_KEY = 'test-key';
10 + try {
11 + getTool = (await import('../../app/api/tools/[slug]/route')).GET;
12 + } finally {
13 + if (apiKey === undefined) delete process.env.COMPOSIO_API_KEY;
14 + else process.env.COMPOSIO_API_KEY = apiKey;
15 + }
16 +});
17 +
18 +afterEach(() => {
19 + globalThis.fetch = originalFetch;
20 +});
21 +
22 +describe('tool detail Instant metadata', () => {
23 + for (const version of ['latest', '20260101_00']) {
24 + test(`only latest includes pricing metadata (${version})`, async () => {
25 + const instant = { supported: true, price: { description: 'API price', discount: '0' } };
26 + const fetchMock = mock(async () => Response.json({ instant, input_parameters: { type: 'object' } }));
27 + globalThis.fetch = Object.assign(fetchMock, { preconnect: originalFetch.preconnect });
28 + const response = await getTool(
29 + new NextRequest(`https://docs.composio.dev/api/tools/EXAMPLE?version=${version}`),
30 + { params: Promise.resolve({ slug: 'EXAMPLE' }) }
31 + );
32 + const body = await response.json();
33 + expect(response.status).toBe(200);
34 + expect(body.input_parameters).toEqual({ type: 'object' });
35 + expect(body.instant).toEqual(version === 'latest' ? instant : undefined);
36 + expect(fetchMock).toHaveBeenCalledTimes(1);
37 + const url = String(fetchMock.mock.calls[0]?.[0]);
38 + expect(url.includes('include_pricing=true')).toBe(version === 'latest');
39 + expect(url).toContain(`version=${version}`);
40 + });
41 + }
42 +});
docs/tests/static/toolkit-api.test.ts
+9
@@ -64,6 +64,15 @@ afterEach(() => {
64 });
65
66 describe('fetchToolkitFromProduction', () => {
67 + test('preserves Instant support from the production toolkit response', async () => {
68 + useApiKey();
69 + globalThis.fetch = Object.assign(
70 + mock(async () => Response.json({ ...productionPayload, instant: { supported: true } })),
71 + { preconnect: originalFetch.preconnect }
72 + );
73 + const toolkit = await fetchToolkitFromProduction('instant-example');
74 + expect(toolkit?.instant).toEqual({ supported: true });
75 + });
76 test('maps the single-toolkit response and normalizes auth modes', async () => {
77 useApiKey();
78 const fetcher = mock(async () => Response.json(productionPayload));
docs/types/toolkit.ts
+4
@@ -1,3 +1,5 @@
1 +import type { Instant } from '../lib/instant';
2 +
3 // Parameter schema for tool inputs/outputs
4 export interface ParameterSchema {
5 type: string;
@@ -17,6 +19,7 @@ export interface ParameterSchema {
19 }
20
21 export interface Tool {
22 + instant?: Instant;
23 slug: string;
24 name: string;
25 description: string;
@@ -67,6 +70,7 @@ export interface AuthConfigDetail {
70
71 // Light version for landing page (only fields needed for listing)
72 export interface ToolkitSummary {
73 + instant?: Instant;
74 slug: string;
75 name: string;
76 logo: string | null;
skills/composio/references/platform.md
+1
@@ -125,6 +125,7 @@ If the application has its own connect UI, use session authorization and connect
125
126 Do not force advanced requests through first-time setup. Route them to current documentation:
127
128 +- Instant Tools eligibility, usage controls, account selection, and charges: `instant-tools.md`. Consult this guide before assuming a tool can run without a user connection or quoting rates.
129 - Session scoping, account selection, callbacks, direct tools, and sandbox controls: `configuring-sessions.md`
130 - Custom connection UI: `manually-authenticating.md`
131 - Triggers and webhooks: `triggers.md` and the setting-up-triggers guides