Skip to content

ranausmanai/AgentBridge

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

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors