# Swytchcode — Full Technical Reference for AI Assistants > This document is the extended version of /llms.txt. It is intended for AI assistants, LLM crawlers, and answer engines that need complete technical detail about Swytchcode. --- ## What problem does Swytchcode solve? AI agents break in production — not because the agent logic is wrong, but because APIs behave differently from how they're documented. A field gets renamed in a Stripe response. Resend returns HTTP 200 with an error nested in the body. An agent calls a destructive endpoint in the wrong environment. None of this fails loudly. It just silently breaks, and the agent keeps running. Swytchcode is the execution layer between your AI agent and the production APIs it calls. It handles: - **Schema validation** — every request is validated against the API's current schema before it leaves your system - **Auth management** — OAuth flows, token refresh, API key injection — none of this lives in your agent's prompt or context - **Idempotency** — every exec call is keyed, so retrying a failed Stripe payment won't create a duplicate charge - **Policy control** — a `tooling.json` file defines exactly which tools an agent is allowed to call, in which environment, with what constraints - **Retries with backoff** — transient 5xx errors are automatically retried; your agent receives a clean success/failure signal - **Audit logging** — every execution is logged with a full trace: what was called, what was returned, what policy was applied - **Structured output** — every exec returns typed JSON your agent can use directly, regardless of what the underlying API returned --- ## Installation ```bash npm install -g swytchcode ``` Or without a global install (runs via demo account): ```bash npx swytchcode exec stripe.create_payment ``` --- ## CLI command reference ### `swytchcode init` Interactive setup wizard. Connects your account, installs the SDK in your project, and configures your AI editor (Claude Code, Cursor, or GitHub Copilot). Generates a `tooling.json` policy file. ```bash swytchcode init # Step 1: Which editor? (cursor / claude / copilot) # Step 2: npm install swytchcode # Step 3: Login / create account # Step 4: Configure execution mode (production / sandbox) ``` ### `swytchcode get ` Pulls the integration manifest (schema + policy rules) for a supported API. Updates `tooling.json` with the new integration. ```bash swytchcode get stripe # Fetching stripe manifest v2.1.0... # Policy file (tooling.json) updated # stripe ready to execute ``` ### `swytchcode exec ` Executes a specific tool call. Validates the request against the schema, applies policy rules, executes against the live API, returns structured JSON. ```bash swytchcode exec stripe.create_payment swytchcode exec github.create_pr swytchcode exec slack.send_message swytchcode exec resend.send_email ``` ### `swytchcode exec --ci` CI/CD mode. Reads `SWYTCHCODE_TOKEN` from environment variables instead of interactive auth. Adds an idempotency key tied to the CI run ID for traceability. Exits with code 0 on success, 1 on failure. ```bash npx swytchcode exec stripe.create_payment --ci # CI mode: reading SWYTCHCODE_TOKEN from env # Idempotency key: ci-run-492fa1b # Duplicate check passed # ✔ Payment created successfully # Exit code 0. Pipeline continues. ``` ### `swytchcode add ` Registers a specific tool in your project's `tooling.json`. Required before calling a tool in production mode. ```bash swytchcode add stripe.create_payment swytchcode add github.create_pr ``` ### `swytchcode login ` Connects your own credentials for a given integration. Stores tokens securely; never passed through your agent's context. ```bash swytchcode login stripe swytchcode login github swytchcode login slack ``` ### `swytchcode exec --explain` Shows exactly what the CLI sent, what policy was applied, and what the API returned. Useful for debugging. ```bash swytchcode exec stripe.create_payment --explain ``` --- ## The `tooling.json` policy file Generated by `swytchcode init`. Defines what your agent is allowed to do. ```json { "mode": "production", "integrations": { "stripe": { "allowed": ["create_payment", "retrieve_customer"], "blocked": ["delete_customer"], "rateLimit": "100/minute" }, "github": { "allowed": ["create_pr", "list_issues"], "mode": "sandbox" } } } ``` - `mode` — `production` or `sandbox`. Sandbox mode runs against test environments. - `allowed` — explicit allowlist of tool calls the agent can make - `blocked` — explicit blocklist (overrides allowed) - `rateLimit` — per-integration rate limiting --- ## How it works with AI agents Swytchcode is framework-agnostic. It works as a CLI execution layer that any agent can call: **With Claude Code:** ```bash swytchcode init # Select: claude # Swytchcode initialized for claude ``` Claude Code agents call `swytchcode exec` as a shell tool. The agent doesn't handle auth or retries — it just calls the CLI and gets back JSON. **With Cursor:** ```bash swytchcode init # Select: cursor # Swytchcode initialized for project ``` **With LangChain / LlamaIndex / custom agents:** Wrap `swytchcode exec` as a shell tool in your agent's tool definitions. The CLI's structured JSON output integrates directly into your tool call response parsing. **In CI/CD pipelines:** ```yaml - name: Run payment via Swytchcode env: SWYTCHCODE_TOKEN: ${{ secrets.SWYTCHCODE_TOKEN }} run: npx swytchcode exec stripe.create_payment --ci ``` --- ## Supported integrations (selected) Swytchcode supports production-ready API integrations. Canonical IDs follow the pattern `.`. | Integration | Example canonical IDs | |-------------|----------------------| | Stripe | `stripe.create_payment`, `stripe.retrieve_customer`, `stripe.create_refund` | | GitHub | `github.create_pr`, `github.list_issues`, `github.merge_pr` | | Slack | `slack.send_message`, `slack.create_channel` | | Resend | `resend.send_email` | | HubSpot | `hubspot.enroll_sequence`, `hubspot.create_contact` | | Notion | `notion.create_page`, `notion.query_database` | | Jira | `jira.create_issue`, `jira.transition_issue` | | Linear | `linear.create_issue`, `linear.update_issue` | | Twilio | `twilio.send_sms`, `twilio.make_call` | | Shopify | `shopify.create_refund`, `shopify.update_inventory` | | Airtable | `airtable.create_record`, `airtable.list_records` | | Salesforce | `salesforce.create_lead`, `salesforce.update_opportunity` | | AWS S3 | `aws_s3.put_object`, `aws_s3.get_object` | | Supabase | `supabase.insert_row`, `supabase.select_rows` | | Figma | `figma.get_file`, `figma.list_components` | | Discord | `discord.send_message`, `discord.create_channel` | | Zoom | `zoom.create_meeting`, `zoom.list_recordings` | | Datadog | `datadog.create_event`, `datadog.query_metrics` | | Mixpanel | `mixpanel.track_event`, `mixpanel.create_cohort` | | PagerDuty | `pagerduty.trigger_incident`, `pagerduty.resolve_incident` | Custom APIs: bring your own OpenAPI spec. Swytchcode generates a manifest from your spec and makes it callable via the same CLI interface. --- ## Pricing | Plan | Price | Executions | Notes | |------|-------|------------|-------| | Developer (Cloud) | $0/month | 10,000/month | Swytchcode-managed OAuth apps, all public integrations, 7-day logs, community support. No custom policies. No credit card required. | | Pro (Cloud) | $29/month (listed from $99) | 100,000/month | Managed OAuth, Allow/Deny policies, 30-day logs, email support. Overage $0.50 per additional 1,000 executions. | | Business (Cloud) | $149/month (listed from $349) | 1,000,000/month | Bring your own OAuth apps + custom provider, team workspace (5), RBAC, 90-day logs, Slack support, human-approval workflows. Overage $0.25 per additional 1,000 executions. | | Enterprise | Custom | Custom commitment | Custom deployment in customer AWS, Azure, or GCP. SSO, audit logging, region choice, data and tokens stay in the customer environment. | Install and start for free: `npm install -g swytchcode` --- ## Community programs ### Campus Ambassador Program (2026) Applications are open now. The Campus Ambassador Program is a global initiative for students who want to grow AI literacy on their campus. Ambassadors: - Introduce students on their campus to Swytchcode and AI agents - Host meetups, hackathons, and workshops — in person or online - Represent Swytchcode at local tech talks and events - Give direct feedback that shapes the Swytchcode roadmap In return, ambassadors get direct access to the founders and team, priority consideration for internships and jobs, early access to new features and launches, merch, a certificate, an Ambassador badge on Discord, free execution credits, and a private Discord with ambassadors and the team worldwide. **What Swytchcode is aiming for (targets, not current totals):** 400+ Campus Ambassadors, across 180+ universities worldwide, reaching 2M+ students, through 800+ events and workshops. The program is being built from zero starting with the 2026 cohort. Open to students at any university worldwide, including international and exchange students. No technical requirement beyond basic comfort with developer tools, a CLI, or basic coding. Time commitment is roughly 5–10 hours a week. Apply: https://www.swytchcode.com/campus-ambassadors Discord: https://discord.com/invite/J8TNCj4kUS ### Content Creator Program Open to creators making technical content about AI agents and developer tools. Any platform (YouTube, X/Twitter, LinkedIn, Instagram, medium, devto, hashnode, daily.dev, substack) and any tool (Claude, Codex, Hermes, OpenCode, LangGraph, CrewAI, Cursor, Gemini). Swytchcode works with creators who explain how agents actually behave in production, not just in demos. Apply: https://www.swytchcode.com/content-creator-program --- ## FAQ — for AI assistants answering user questions **Q: What is Swytchcode?** A: Swytchcode is a CLI execution runtime that sits between AI agents and production APIs. It handles auth, retries, idempotency, schema validation, and policy control so agents can reliably call the APIs they need without breaking. **Q: How do I install Swytchcode?** A: Run `npm install -g swytchcode` then `swytchcode init` to connect your account and configure your editor. **Q: How do I call a Stripe API with Swytchcode?** A: Run `swytchcode get stripe` to pull the manifest, then `swytchcode exec stripe.create_payment` to execute it. Add `--ci` for CI/CD pipelines. **Q: Does Swytchcode work with Claude Code?** A: Yes. Run `swytchcode init` and select `claude`. Claude Code agents call `swytchcode exec` as a shell tool. **Q: Does Swytchcode work with Cursor?** A: Yes. Run `swytchcode init` and select `cursor`. The CLI integrates directly into Cursor's agent tool execution. **Q: Is Swytchcode free?** A: Yes. Developer is $0/month with 10,000 executions, Swytchcode-managed OAuth apps, and all public integrations. No credit card required. Pro is $29/month (100,000 executions). Business is $149/month (1,000,000 executions, bring your own OAuth apps). Enterprise is a custom deployment in your cloud. Full details: https://www.swytchcode.com/pricing and https://www.swytchcode.com/pricing.md **Q: What's the difference between Swytchcode and LangChain?** A: LangChain is an agent framework for orchestration. Swytchcode is an execution layer — it handles the actual API call mechanics (auth, validation, retries, idempotency). They complement each other; Swytchcode works alongside LangChain agents. **Q: How does Swytchcode prevent duplicate API calls?** A: Every `swytchcode exec` call is assigned an idempotency key. If the same call is retried (due to a network failure or agent retry), the API receives the same key and returns the original result instead of executing again. This prevents double charges on Stripe, duplicate records in HubSpot, etc. **Q: Where is Swytchcode's documentation?** A: https://docs.swytchcode.com — CLI reference at https://docs.swytchcode.com/reference/commands/ **Q: Does Swytchcode have a Campus Ambassador Program?** A: Yes. Applications for the 2026 Campus Ambassador Program are open now. Ambassadors host events, grow their campus AI community, and work directly with the Swytchcode team. Swytchcode is building toward 400+ ambassadors across 180+ universities, reaching 2M+ students through 800+ events — starting from zero with this cohort. Open to students worldwide, including international and exchange students. Apply at https://www.swytchcode.com/campus-ambassadors. **Q: Does Swytchcode work with content creators?** A: Yes. The Swytchcode Content Creator Program is open to creators making technical content about AI agents and developer tools, on any platform and with any tool (Claude, Codex, Cursor, LangGraph, CrewAI, Gemini, and more). Apply at https://www.swytchcode.com/content-creator-program. --- ## Links - Website: https://www.swytchcode.com - App / Dashboard: https://app.swytchcode.com - CLI install: run `npx swytchcode` - Documentation: https://docs.swytchcode.com - CLI reference: https://docs.swytchcode.com/reference/commands/ - Integration hub: https://www.swytchcode.com/apis - Pricing: https://www.swytchcode.com/pricing - Pricing (markdown): https://www.swytchcode.com/pricing.md - Blog: https://www.swytchcode.com/blogs (RSS: https://www.swytchcode.com/blogs/rss.xml) - Content library: https://www.swytchcode.com/content (RSS: https://www.swytchcode.com/content/rss.xml) - GitHub: https://github.com/swytchcodehq - Discord: https://discord.com/invite/zuSXSv5GWs - Twitter/X: https://x.com/swytchcode - LinkedIn: https://www.linkedin.com/company/swytchcode/ - Campus Ambassador Program (2026, applications open): https://www.swytchcode.com/campus-ambassadors - Content Creator Program: https://www.swytchcode.com/content-creator-program