Skip to content

Louis830903/AI-Bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-Bridge Banner



🌉 AI-Bridge

From Chat to Action

让 AI 从聊天走向行动


🚀 One line of code. AI controls any desktop app.
🚀 一行代码,AI 操控任意桌面软件


Stars Release Python MCP

Tests License PRs


🇨🇳 中文⚡ 30s Demo🎯 Use Cases🚀 Quick Start🏗️ Architecture



⚡ 30-Second Demo

import asyncio
from aibridge.adapters.browser.chrome import ChromeAdapter

async def main():
    # 1. 初始化浏览器
    adapter = ChromeAdapter({"headless": False})
    await adapter.connect()
    
    # 2. 打开网页
    await adapter.execute("goto", value="https://github.com")
    
    # 3. 截图保存
    await adapter.execute("screenshot", options={"path": "github.png"})
    
    await adapter.disconnect()

asyncio.run(main())

☝️ AI automatically: Opens Chrome → Navigates to GitHub → Takes Screenshot



🎯 Use Cases

🎬 Auto Video Edit

"Cut this video to 30s,
add background music,
export as 1080p"
     ↓
AI-Bridge + FFmpeg
     ↓
✅ Done in seconds

📊 Auto Report

"Get sales data from Excel,
generate charts,
create PPT report"
     ↓
AI-Bridge + Office
     ↓
✅ Professional report

🌐 Web Automation

"Login to website,
scrape product info,
save to database"
     ↓
AI-Bridge + Chrome
     ↓
✅ Data collected

🤖 Multi-Agent

"Research AI news,
analyze trends,
send summary to Slack"
     ↓
AI-Bridge + A2A
     ↓
✅ Agents collaborate

🔥 Why AI-Bridge?

❌ Before: AI Can Only Chat

User: "Edit this video"
AI:   "I can't do that, but here's
       how you could do it manually..."

AI is limited to text responses 😞

✅ After: AI Takes Action

User: "Edit this video"
AI:   *Opens FFmpeg*
      *Processes video*
      *Exports result*
      "Done! Here's your video."

AI actually does the work 🚀


⚡ The Magic Behind

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   Your AI       │     │   AI-Bridge     │     │   Any App       │
│ (Claude, GPT)   │ ──▶ │   Gateway       │ ──▶ │ Chrome, Office  │
│                 │ MCP │                 │     │ FFmpeg, Docker  │
└─────────────────┘     └─────────────────┘     └─────────────────┘

🚀 Quick Start

1️⃣ Install

pip install ai-bridge

2️⃣ Add to Claude Desktop

{
  "mcpServers": {
    "ai-bridge": {
      "command": "python",
      "args": ["-m", "aibridge"]
    }
  }
}

3️⃣ Done! Ask Claude to:

"Open Chrome and take a screenshot of github.com"
"Convert this video to MP3"
"Create an Excel report from this data"

🛠️ Supported Tools

Category Tools
🌐 Browser Chrome, Edge (Playwright-powered)
📊 Office Word, Excel, PowerPoint, WPS
🎬 Media FFmpeg, ImageMagick, Blender, SoX
📄 Docs Pandoc (40+ formats)
🎵 Download yt-dlp (1000+ sites)
🐳 DevOps Docker, Prettier
🔗 MCP Ecosystem Browser Use, Firecrawl, Notion, Slack, GitHub

🏗️ Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        AI Assistant                              │
│              (Claude, GPT, Qwen, Gemini, etc.)                  │
└───────────────────────────┬─────────────────────────────────────┘
                            │ MCP / A2A Protocol
                            ▼
┌─────────────────────────────────────────────────────────────────┐
│                  AI-Bridge v5.0 Gateway                          │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │  v5.0 Protocol Extension                                   │  │
│  │  ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌─────────┐ │  │
│  │  │Agent Card  │ │ Prometheus │ │A2A Streaming│ │MCP Disco│ │  │
│  │  └────────────┘ └────────────┘ └────────────┘ └─────────┘ │  │
│  └───────────────────────────────────────────────────────────┘  │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │  v4.0 Enterprise Layer                                     │  │
│  │  ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌─────────┐ │  │
│  │  │  Policy    │ │  Metering  │ │  Tracing   │ │Orchestr │ │  │
│  │  │  Engine    │ │  Collector │ │   (OTel)   │ │  (DAG)  │ │  │
│  │  └────────────┘ └────────────┘ └────────────┘ └─────────┘ │  │
│  └───────────────────────────────────────────────────────────┘  │
│  ┌──────────────┐  ┌──────────────┐  ┌────────────────────┐    │
│  │MCP Registry  │  │ A2A Gateway  │  │  Protocol Bridge   │    │
│  └──────────────┘  └──────────────┘  └────────────────────┘    │
└───────────────────────────┬─────────────────────────────────────┘
                            │
        ┌───────────────────┼───────────────────┬──────────────────┐
        ▼                   ▼                   ▼                  ▼
   ┌─────────┐         ┌─────────┐         ┌─────────┐       ┌─────────┐
   │ Browser │         │  Office │         │   CLI   │       │   MCP   │
   │ Adapter │         │ Adapter │         │ Adapter │       │Ecosystem│
   └─────────┘         └─────────┘         └─────────┘       └─────────┘
        │                   │                   │                  │
   Chrome/Edge          Word/Excel         FFmpeg/Docker      Firecrawl
                        PowerPoint         yt-dlp/Pandoc      Notion/Slack

📊 Enterprise Features

🔐 Policy-Based Access Control
from aibridge.enterprise import PolicyEngine, ToolPolicy

policy_engine = PolicyEngine()
policy = ToolPolicy(
    policy_id="dev-policy",
    statements=[{
        "effect": "allow",
        "actions": ["tool:call"],
        "resources": ["browser/*", "ffmpeg/*"],
    }]
)
policy_engine.register_policy(policy)
📈 Usage Metering & Quota
from aibridge.enterprise import MeteringCollector, QuotaManager

metering = MeteringCollector()
await metering.record(user_id="user1", tool_name="browser/navigate")

quota = QuotaManager(metering)
quota.set_user_quota("user1", QuotaConfig(max_calls_per_day=1000))
🔍 Distributed Tracing (OpenTelemetry)
from aibridge.enterprise import Tracer, TracerConfig

tracer = Tracer(TracerConfig(service_name="my-service"))
with tracer.start_as_current_span("tool_call") as span:
    span.set_attribute("user.id", "user1")
    # ... execute tool
🤖 Multi-Agent Orchestration
from aibridge.core import TaskGraph, Orchestrator

graph = TaskGraph(name="research-workflow")
t1 = graph.add_task("search", "search-agent", "web_search")
t2 = graph.add_task("analyze", "analyzer-agent", depends_on={t1.task_id})
result = await orchestrator.execute(graph)

📖 Documentation

Resource Link
📚 Quick Start examples/basic_usage.py
🏗️ Gateway Demo examples/gateway_demo.py
📋 Changelog CHANGELOG.md
🤝 Contributing CONTRIBUTING.md

🌟 Star History

Star History Chart


🤝 Contributing

We welcome contributions! See CONTRIBUTING.md.

git clone https://github.com/Louis830903/AI-Bridge.git
cd AI-Bridge/ai-bridge
pip install -e ".[dev]"
pytest tests/ -v

📄 License

Apache 2.0 — see LICENSE


🙏 Acknowledgements

PlaywrightMCPA2AAll Contributors ❤️




If AI-Bridge helps you, please give us a ⭐!


     _    ___      ____       _     _            
    / \  |_ _|    | __ ) _ __(_) __| | __ _  ___ 
   / _ \  | |_____|  _ \| '__| |/ _` |/ _` |/ _ \
  / ___ \ | |_____| |_) | |  | | (_| | (_| |  __/
 /_/   \_\___|    |____/|_|  |_|\__,_|\__, |\___|
                                      |___/      

         From Chat to Action 🚀

Made with ❤️ for the AI Automation Community

Releases

No releases published

Packages

 
 
 

Contributors

Languages