# 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. The agent decides what to do. Swytchcode executes how. The CLI binary is `swytchcode`. `swy` is the same command. Every call — CLI, MCP, or SDK — runs the same pipeline: resolve the tool, validate input, evaluate policies, authenticate, execute the API, normalize the response, and audit. It handles: - **Schema validation** — every request is validated against the API's current schema before it leaves your system. A 200 with an error body is a failure. - **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 - **Allow list** — `tooling.json` says what can execute (mode, enabled tools). `policies.json` says whether this request should, and is evaluated before every exec. - **Retries with backoff** — transient 5xx errors are automatically retried; your agent receives a clean success/failure signal - **Audit history** — every command is recorded on your machine: what ran, what it called, and whether it worked. Sensitive values are redacted. Read it with `swy audit` without signing in. Optional daily backup to your account is off by default (`swy config cloud enable`) - **Structured output** — every exec returns typed JSON your agent can use directly, regardless of what the underlying API returned --- ## Installation Pick one. Do not install twice. `swy` and `swytchcode` are the same command. ```bash npx swytchcode ``` ```bash # macOS / Linux curl -fsSL https://cli.swytchcode.com/install.sh | sh # Windows (PowerShell) irm https://cli.swytchcode.com/install.ps1 | iex # npm npm install -g swytchcode ``` Your first 2 live commands don't need an account. Dry runs, `--explain`, and demos don't count toward those 2: ```bash swy demo list swy demo stripe ``` --- ## CLI command reference ### `swytchcode init` Initializes the project from the repo root. Writes `.swytchcode/` and `tooling.json`, installs editor rules, and registers MCP as `swy mcp serve`. Use `--mode=sandbox` until production is requested. Editors: `cursor`, `claude`, `codex`, `copilot`, `gemini`, `hermes`, `openclaw`, `windsurf`. ```bash swy init --editor=cursor --mode=sandbox ``` ### `swytchcode get ` Downloads the integration bundle. This does **not** enable tools and does not by itself make them executable. ```bash swy get stripe swy add stripe.create_payment ``` ### `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 ` Writes a method into `tooling.json`. Only IDs in that file can execute. `get` does not do this. ```bash swytchcode add stripe.create_payment swytchcode add github.create_pr ``` ### `swytchcode login` Signs in to your Swytchcode account. The first 2 live commands don't need a sign-in. Dry runs, `--explain`, and demos don't count toward those 2. ```bash swytchcode login ``` ### `swytchcode auth connect [provider]` Connects provider credentials (OAuth or an API key). Tokens are stored securely and are never passed through your agent's context. ```bash swytchcode auth connect stripe swytchcode auth connect github ``` ### `swytchcode audit` Local history of commands run on this machine. No sign-in required. Sensitive values are redacted. ```bash swytchcode audit # choose what to view swytchcode audit network # recent outbound network calls swytchcode audit policy # commands blocked or held by your policies swytchcode audit stats # run history and success rate swytchcode audit clear # delete the local history ``` Optional cloud backup is off by default. Once enabled, history uploads once a day in the background: ```bash swytchcode config cloud enable swytchcode config cloud status swytchcode config cloud disable ``` ### `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 ``` --- ## Project files Created under `.swytchcode/`. Do not invent a schema for these files. Read them on disk, or run `swy list tooling` and `swy policy list`. | File | Role | | --- | --- | | `tooling.json` | What can execute: mode (`sandbox` or `production`) and the enabled tools. Only listed tools execute. | | `integrations/policies.json` | Whether this request should execute. Evaluated before every exec. | | `integrations/manifest.json` | How it should execute. | ```bash swy policy add # add a policy rule swy policy list # list policy rules swy policy remove # remove a policy rule swy policy validate # check policies.json ``` Do not disable or rewrite `policies.json` to make a call succeed. Docs: https://docs.swytchcode.com/policies/overview/ --- ## How it works with AI agents Swytchcode is framework-agnostic. It works as a CLI execution layer that any agent can call: **With an editor.** `swy init --editor= --mode=sandbox`. Names: `cursor`, `claude`, `codex`, `copilot`, `gemini`, `hermes`, `openclaw`, `windsurf`. The agent calls `swy exec` and gets JSON back. It does not handle auth or retries. **With LangChain / LlamaIndex / custom agents:** Wrap `swy exec` as a shell tool, or use the runtime SDK after the CLI is installed and the methods are added. The SDK does not `get` or `add` for you. JavaScript: `npm install @swytchcode/runtime`. Python: `pip install swytchcode-runtime`. **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. Confirm any canonical ID with `swy search` and `swy info` before exec. Prefer the live catalog at https://www.swytchcode.com/apis over the examples in this table. --- ## Pricing Allow and deny rules are on every plan, including Free. Approval workflows and team seats start on Business. The crossed-out amounts ($99, $349) are list prices, not the price charged. Full feature lists: https://www.swytchcode.com/pricing and https://www.swytchcode.com/pricing.md | Plan | Price | Live commands | Notes | |------|-------|----------------|-------| | Free | $0 forever | 1,000/month | 10 connected end users. Swytchcode-managed OAuth apps, all public integrations, 7-day logs, community support, allow/deny rules. No approval workflows or team seats. No credit card. First 2 live commands don't need a sign-in. | | Pro | $29/month (list $99) or $290/year (save $58) | 10,000/month | 1,000 connected end users. Swytchcode-managed or your own OAuth apps, all public integrations, 30-day logs, email support, allow/deny rules. | | Business | $149/month (list $349) or $1,490/year (save $298) | 1,000,000/month | 10,000 connected end users. Bring your own providers, all public integrations, 5 team seats (Owner, Admin, Viewer, Billing), 90-day logs, Slack support, allow/deny rules and approval workflows. | | Enterprise | Custom | Custom | Deployed in the customer's AWS, Azure, or GCP account. Application data and API keys stay there. OAuth sign-ins go through Swytchcode. Company SSO, RBAC, audit logging and export, region choice, priority support and SLA, unlimited providers (including bring your own), unlimited integration accounts, custom seats, connected end users, log retention, and policies. | Yearly billing saves two months. Only live commands count. Dry runs, `--explain`, and demos are free. Commands run with an API key (`swy_key_...`) count like any other, including agents, CI, and calls made for your app's end users. A connected end user connects their own account through the app, counts once per workspace, and is not a team seat. Providers that charge per API call (for example X) are on Pro and above, through your own developer app. When the limit is reached, upgrade or wait for the monthly reset. Log storage is off until turned on per workspace. Approval workflows (Business and above) send a request to the workspace's Slack or Telegram channel. The command runs once if approved, and does not run if denied or if nobody responds within 48 hours. A failed card payment is retried by Stripe, and access continues through a short grace period. Install and start for free: `npx swytchcode` (or `npm install -g swytchcode`). The shorter command is `swy`. --- ## 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 the execution layer for agent API calls. The agent decides what to do. Swytchcode discovers the method, validates the payload, injects auth, enforces policy, retries safely, and returns structured JSON. It is not an agent framework. **Q: How do I install Swytchcode?** A: Run `npx swytchcode`, the install script at https://cli.swytchcode.com/install.sh, or `npm install -g swytchcode`. Then `swy init --editor= --mode=sandbox`. `swy` is the same command as `swytchcode`. **Q: How do I call a Stripe API with Swytchcode?** A: `swy search stripe`, then `swy get stripe`, then `swy add ` from `swy info`. `get` alone does not enable the method. Add `--ci` for CI, with `SWYTCHCODE_TOKEN` in the process environment. **Q: Does Swytchcode work with Claude Code?** A: Yes. Run `swy init --editor=claude --mode=sandbox`. Claude Code calls `swy exec` as a shell tool. **Q: Does Swytchcode work with Cursor?** A: Yes. Run `swy init --editor=cursor --mode=sandbox`. The same init flag exists for Codex, Copilot, Gemini, Hermes, OpenClaw, and Windsurf. **Q: Is Swytchcode free?** A: Yes. The Free plan includes 1,000 live commands a month, Swytchcode-managed OAuth apps, all public integrations, 7-day log retention, community support, and allow/deny rules. It does not include approval workflows or team seats. The first 2 live commands don't need a sign-in. No credit card. Pro is $29/month or $290/year (list price $99, save $58 on yearly) with 10,000 live commands, 1,000 connected end users, your own OAuth apps, and email support. Business is $149/month or $1,490/year (list price $349, save $298 on yearly) with 1,000,000 live commands, bring-your-own providers, 5 team seats, and approval workflows. Enterprise is a custom deployment in the customer's 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) - Comparisons: https://www.swytchcode.com/compare (RSS: https://www.swytchcode.com/compare/rss.xml) - Swytchcode vs. Composio: https://www.swytchcode.com/compare/swytchcode-vs-composio - Swytchcode vs. Nango: https://www.swytchcode.com/compare/swytchcode-vs-nango - Swytchcode vs. Workato: https://www.swytchcode.com/compare/swytchcode-vs-workato — Workato is an enterprise iPaaS (17,000+ apps, quote-based pricing). Swytchcode executes one API call. - Swytchcode vs. MuleSoft: https://www.swytchcode.com/compare/swytchcode-vs-mulesoft — MuleSoft Anypoint is API-led connectivity (1,500+ connectors, 30-day trial). Swytchcode executes one API call. - Swytchcode vs. Informatica: https://www.swytchcode.com/compare/swytchcode-vs-informatica — Informatica IDMC is data and application integration. Public list prices were not published as of October 2026. - Swytchcode vs. Arcade: https://www.swytchcode.com/compare/swytchcode-vs-arcade — Arcade is an agent actions runtime (7,500+ tools on the 9 Sep 2026 docs page; llms.txt says 7,000+). Free tier is 2,000 tool calls/month. No public skills.md; use https://arcade.dev/llms.txt. - Swytchcode vs. Pipedream: https://www.swytchcode.com/compare/swytchcode-vs-pipedream — Pipedream is an agent integration layer: 10,000+ tools, 3,000+ APIs, per-user auth, and MCP. Free while building. Startup is $99/month billed annually or $150/month billed monthly as of October 2026. No usable skills.md. - Swytchcode vs. Boomi: https://www.swytchcode.com/compare/swytchcode-vs-boomi — Boomi is an enterprise iPaaS with API management, data, and an Agent Control Plane. 30-day trial. Pay-as-you-go is $99/month plus usage as of October 2026. No public skills.md. - 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