Skip to content

Repository files navigation

AgentBridge Logo

AgentBridge

Make any API agent-ready in 30 seconds.
The open-source bridge between APIs and AI agents.

MIT License npm Directory Stars Packages

Website · Discord · Install · Quick Start · API Owners · Agent Builders · Packages · Self-Hosting


"If you have any kind of product or service, think: can agents access and use them?" — Andrej Karpathy

Most APIs are built for humans writing code. But AI agents need to discover, understand, and call APIs autonomously. AgentBridge makes any API agent-ready — paste your OpenAPI spec, get an instant bridge to every AI agent in the world.

flowchart LR
  OA["OpenAPI Spec"] --> MF[".agentbridge.json"]
  MF --> RT["AgentBridge Auto-call Runtime"]
  RT <--> API["REST API"]
  RT --> C["Claude"]
  RT --> G["GPT"]
  RT --> GR["Groq"]
  RT --> O["Ollama"]
Loading

📥 Install

Requirements: Node.js 20+

# Run directly (no install)
npx agentbridge --version

# Optional: install globally
npm i -g @agentbridgeai/cli
agentbridge --version

If you want the standalone MCP server package:

npx @agentbridgeai/mcp --help

✨ Quick Start

One command to chat with any API

npx agentbridge chat spotify
# → Searches the directory, installs, starts chatting
# → "play some jazz music"

# Built-in RevenueCat preset (token required)
npx agentbridge chat revenuecat
# → "list my projects"

One command to make your API agent-ready

npx agentbridge init
# → Paste your OpenAPI spec
# → Get .agentbridge.json manifest
# → Any AI agent can now use your API

🔌 For API Owners

Make your API discoverable and usable by every AI agent in the world.

Step 1: Generate your manifest

npx agentbridge init
# Paste your OpenAPI spec (JSON or YAML)
# → Generates .agentbridge.json

Step 2: Publish to the directory

npx agentbridge publish
# → Registers on agentbridge.cc
# → Instantly available to all agents

Or register via the web at agentbridge.cc/register.

Step 3: Auto-discovery (optional)

Host your manifest at a well-known URL — like robots.txt for agents:

https://yourapi.com/.well-known/agentbridge.json

Any agent can now auto-discover your API:

agentbridge discover yourapi.com
# → Found: your-api (15 actions)

🤖 For Agent Builders

Use any agent-ready API in seconds. Bring your own LLM key.

CLI — Talk to any API

# One command does it all: search → install → chat
npx agentbridge chat pet-store
> find me available pets
# → Found 3 available pets: Buddy (dog), Whiskers (cat)...

# Or search the directory first
agentbridge search weather
# → weather-api (12 actions) — Real-time weather data
# → Install: agentbridge chat weather-api

MCP — Claude Desktop, Cursor, Windsurf

Recommended onboarding (installs API, handles auth, configures clients, health-checks MCP):

# Works for OAuth + token APIs
agentbridge mcp setup spotify
agentbridge mcp setup gmail
agentbridge mcp setup revenuecat --token sk_...
agentbridge mcp setup extractly-api

Direct MCP server usage:

npx @agentbridgeai/mcp --openapi ./openapi.json

Add to Claude Desktop (~/.claude/claude_desktop_config.json):

{
  "mcpServers": {
    "my-api": {
      "command": "npx",
      "args": ["@agentbridgeai/mcp", "--openapi", "./openapi.json"]
    }
  }
}

SDK — Embed in your app

import { AgentBridgeEngine } from '@agentbridgeai/core';
import { OpenAIProvider } from '@agentbridgeai/llm';
import { convertOpenAPIToManifest, manifestToPlugin } from '@agentbridgeai/openapi';

// Any OpenAPI spec → agent-ready plugin
const manifest = convertOpenAPIToManifest(openApiSpec);
const plugin = manifestToPlugin(manifest);

// Create engine with any LLM
const engine = new AgentBridgeEngine({
  llmProvider: new OpenAIProvider({ apiKey: 'sk-...' }),
  plugins: [plugin],
});

// Chat naturally
const session = engine.createSession();
const response = await engine.chat(session, 'find available pets');
console.log(response.message);

Web — Chat in the browser

Visit agentbridge.cc/chat, pick your APIs, enter your LLM key, and start chatting. No installation needed.

📦 Packages

Package Description
@agentbridgeai/core Engine, plugin registry, conversation manager npm
@agentbridgeai/llm LLM providers — Claude, GPT, Groq, Ollama, any OpenAI-compatible npm
@agentbridgeai/openapi OpenAPI spec → agent-ready manifest converter npm
@agentbridgeai/mcp MCP server — expose APIs to Claude, Cursor, Windsurf npm
@agentbridgeai/sdk SDK for building custom agent plugins npm
@agentbridgeai/cli CLI — chat with APIs from your terminal npm
@agentbridgeai/web Web dashboard — browse, register, chat agentbridge.cc

📋 The Manifest Format

The .agentbridge.json manifest is the open standard at the heart of AgentBridge. It describes your API in a way any agent can understand:

{
  "schema_version": "1.0",
  "name": "pet-store",
  "description": "A pet store API",
  "version": "1.0.0",
  "base_url": "https://petstore.example.com/api",
  "auth": { "type": "bearer" },
  "actions": [
    {
      "id": "findPetsByStatus",
      "description": "Find pets by their availability status",
      "method": "GET",
      "path": "/pet/findByStatus",
      "parameters": [
        {
          "name": "status",
          "description": "Pet status to filter by",
          "in": "query",
          "required": true,
          "type": "string",
          "enum": ["available", "pending", "sold"]
        }
      ]
    }
  ]
}

🌐 The Ecosystem

flowchart TB
  subgraph OWNERS["API Owners"]
    O1["Spotify · Stripe · Your Startup"]
    O2["1. npx agentbridge init"]
    O3["2. npx agentbridge publish"]
    O4["3. Optional: host /.well-known/agentbridge.json"]
  end

  DIR["AgentBridge Directory<br/>agentbridge.cc<br/><br/>Indexes APIs<br/>Open standard<br/>No vendor lock-in"]

  subgraph USERS["Consumers"]
    U1["CLI<br/>npx agentbridge chat"]
    U2["MCP Server<br/>Claude / Cursor / VS Code / Windsurf"]
    U3["SDK / Web<br/>Your app agents"]
  end

  OWNERS --> DIR
  DIR --> U1
  DIR --> U2
  DIR --> U3
Loading

🔍 Discovery API

Agents can programmatically discover APIs:

# Search by keyword
curl https://agentbridge.cc/api/discover?q=music

# Get a manifest directly
curl https://agentbridge.cc/api/pet-store/manifest

# Submit your API
curl -X POST https://agentbridge.cc/api/submit \
  -d '{"url": "https://yourapi.com/.well-known/agentbridge.json"}'

🏠 Self-Hosting

Environment Variables

Variable Required Description
DATABASE_PATH No Path to SQLite database file. Defaults to ./agentbridge.db
NEXT_PUBLIC_SUPABASE_URL No Supabase project URL. Omit to disable auth entirely
NEXT_PUBLIC_SUPABASE_ANON_KEY No Supabase anon key. Required if SUPABASE_URL is set
PORT No Server port. Defaults to 3000
NODE_ENV No Set to production for optimized builds

Auth is optional. If Supabase env vars are not set, the app runs without login — all features (browse, register, chat, dashboard) work for everyone. Set Supabase vars to enable user accounts, API ownership, and per-user dashboards.

Copy .env.example to apps/web/.env.local to get started.

Docker

docker compose up -d
# → Dashboard at http://localhost:3000

To enable auth, uncomment the Supabase lines in docker-compose.yml.

Docker (manual)

docker build -t agentbridge .
docker run -p 3000:3000 -v agentbridge-data:/app/apps/web/data agentbridge

# With auth:
docker run -p 3000:3000 \
  -v agentbridge-data:/app/apps/web/data \
  -e NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co \
  -e NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ... \
  agentbridge

Vercel

Deploy with Vercel

🛠️ Building from Source

git clone https://github.com/ranausmanai/AgentBridge.git
cd AgentBridge
pnpm install
pnpm build

Development

# Run the web dashboard
cd apps/web && pnpm dev

# Run the CLI in dev mode
cd packages/cli && pnpm dev

💡 Philosophy

  • Open standard.agentbridge.json is the spec. No vendor lock-in. Ever.
  • Decentralized — API owners host their own manifests. We index, not host.
  • Open source — MIT licensed. Fork it, self-host it, make it yours.
  • BYOK — Bring your own LLM key. We never touch your credentials.
  • Agent-first — Built for the agentic era.

🤝 Contributing

We welcome contributions! Whether it's fixing bugs, adding LLM providers, improving docs, or building new integrations.

git clone https://github.com/ranausmanai/AgentBridge.git
cd AgentBridge
pnpm install
pnpm build

See CONTRIBUTING.md for guidelines.

📄 License

MIT — do whatever you want with it.


Build for agents.
agentbridge.cc

About

Make any API agent-ready in 30 seconds. The open-source bridge between APIs and AI agents.

Topics

Resources

Contributing

Stars

19 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages