Skip to content

Louis830903/AI-Bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

64 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI-Bridge Banner



πŸŒ‰ AI-Bridge

From Chat to Action β€” Let AI Control Any Desktop App


Release Stars Python Protocol

Tests Coverage CI License PRs


πŸ‡¨πŸ‡³ δΈ­ζ–‡ β€’ πŸ”₯ Why β€’ ⚑ Demo β€’ πŸš€ Quick Start β€’ πŸ—οΈ Architecture β€’ πŸ” Enterprise


πŸ”₯ Why AI-Bridge?

❌ Without AI-Bridge

User: "Generate monthly sales PPT"
AI:   "I can't interact with Office.
       Here's some Python code you
       could try manually..."

AI is a glorified search engine 😞

βœ… With AI-Bridge

User: "Generate monthly sales PPT"
AI:   *Opens Excel β†’ reads data*
      *Creates charts in PowerPoint*
      *Formats slides professionally*
      "Done! PPT saved to monthly-report.pptx"

AI becomes your digital workforce πŸš€


⚑ The Bridge

graph LR
    A[πŸ€– Your AI<br/>Claude / GPT / Gemini] -->|MCP Protocol| B[πŸŒ‰ AI-Bridge<br/>v1.0.0 Gateway]
    B -->|Native Adapters| C[🌐 Chrome / Edge]
    B -->|Native Adapters| D[πŸ“Š Word / Excel / PPT]
    B -->|Native Adapters| E[🎬 FFmpeg / Blender]
    B -->|Native Adapters| F[🐳 Docker / Git]
    B -->|MCP Ecosystem| G[πŸ”— Firecrawl / Slack]
    B -->|A2A Protocol| H[πŸ€– Other AI Agents]
Loading

⚑ 30-Second Demo

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

async def main():
    adapter = ChromeAdapter({"headless": False})
    await adapter.connect()
    
    await adapter.execute("goto", value="https://github.com")
    await adapter.execute("screenshot", options={"path": "github.png"})
    
    await adapter.disconnect()

asyncio.run(main())
# ☝️ AI opens Chrome β†’ navigates β†’ takes screenshot β€” all in 3 lines!

πŸ› οΈ Supported Tools

Category Tools Adapters
🌐 Browser Chrome, Edge Playwright-powered, full automation
πŸ“Š Office Word, Excel, PowerPoint, WPS OpenXML / Win32 / LibreOffice
🎬 Media FFmpeg, ImageMagick, Blender, Shotcut, SoX, GIMP CLI-native, 40+ codecs
πŸ“„ Docs Pandoc 40+ format conversions
🎡 Download yt-dlp 1000+ sites supported
🐳 DevOps Docker, Git, Prettier Infrastructure as code
πŸ”— MCP Ecosystem Browser Use, Firecrawl, Notion, Slack, GitHub Seamless interop
🧠 AI Aider (code assistant) AI-assisted development

πŸš€ Quick Start

# 1. Install
pip install ai-bridge

# 2. Add to Claude Desktop (claude_desktop_config.json)
# {
#   "mcpServers": {
#     "ai-bridge": {
#       "command": "python",
#       "args": ["-m", "aibridge"]
#     }
#   }
# }

# 3. Ask Claude:
# "Open Chrome, search 'AI trends 2025', take screenshots"
# "Convert report.docx to PDF and send via email"
# "Pull latest data from DB, generate Excel charts"

πŸ›‘οΈ Iron Curtain Test Pyramid

           β”Œβ”€β”€β”€ L3 E2E (8) ───┐      ← --e2e flag, nightly CI
         β”Œβ”€β”€ L2 Integration (7) ──┐    ← --integration, Docker-in-Docker
       β”Œβ”€β”€β”€ L1 Component (22) ───┐     ← default, key interfaces
     β”Œβ”€β”€β”€β”€β”€β”€ L0 Unit (907) ──────┐    ← default, core logic
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        929 tests | 42% coverage
Layer Count Type Trigger
L3 8 End-to-End --e2e / nightly cron
L2 7 Git + Office Integration --integration / Docker
L1 22 Intent / DAG / Bridge / PBAC Always
L0 907 Unit + Core + Enterprise Always

πŸ—οΈ Architecture

graph TB
    subgraph AI["πŸ€– AI Assistant Layer"]
        Claude["Claude / GPT / Gemini"]
    end

    subgraph Gateway["πŸŒ‰ AI-Bridge v1.0.0 Gateway"]
        direction TB
        subgraph Proto["Protocol Layer"]
            MCP_Reg["MCP Registry"]
            A2A_GW["A2A Gateway"]
            Bridge["Protocol Bridge<br/>MCP ↔ A2A"]
        end
        subgraph Enterprise["Enterprise Layer"]
            Policy["PBAC<br/>Policy Engine"]
            Meter["Metering<br/>Quota + Billing"]
            Trace["Tracing<br/>OpenTelemetry"]
            Audit["Audit<br/>Compliance Log"]
        end
        subgraph Core["Core Engine"]
            Intent["IntentEngine<br/>3-tier Resolution"]
            DAG["Orchestrator<br/>DAG Scheduler"]
            Session["Session<br/>Manager"]
        end
    end

    subgraph Adapters["πŸ”Œ Adapter Layer"]
        Browser["🌐 Browser<br/>Chrome·Edge"]
        Office["πŸ“Š Office<br/>WordΒ·ExcelΒ·PPT"]
        CLI["πŸ’» CLI<br/>FFmpegΒ·DockerΒ·Git"]
        MCP_Eco["πŸ”— MCP Ecosystem<br/>FirecrawlΒ·Slack"]
    end

    AI -->|MCP / A2A| Gateway
    Gateway --> Adapters
Loading

πŸ” Enterprise Features

πŸ›‘οΈ PBAC β€” Policy-Based Access Control
from aibridge.enterprise import PolicyEngine, ToolPolicy

engine = PolicyEngine()
engine.register_policy(ToolPolicy(
    policy_id="data-team",
    statements=[{
        "effect": "allow",
        "actions": ["tool:call"],
        "resources": ["browser/*", "office/excel:*"],
    }]
))
result = engine.evaluate("alice", "tool:call", "browser/navigate")
# βœ… ALLOW
πŸ“Š Metering β€” Usage Tracking & Quota
from aibridge.enterprise import MeteringCollector, QuotaManager

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

quota = QuotaManager(metering)
quota.set_user_quota("user1", QuotaConfig(max_calls_per_day=1000))
πŸ” OpenTelemetry β€” Distributed Tracing
from aibridge.enterprise import Tracer, TracerConfig

tracer = Tracer(TracerConfig(service_name="gateway"))
with tracer.start_as_current_span("tool_call") as span:
    span.set_attribute("user.id", "user1")
πŸ€– Multi-Agent DAG Orchestration
from aibridge.core import TaskGraph, Orchestrator

graph = TaskGraph(name="research")
t1 = graph.add_task("search", "web-agent", "search")
t2 = graph.add_task("analyze", "nlp-agent", "analyze", depends_on={t1})
t3 = graph.add_task("report", "write-agent", "report", depends_on={t2})

result = await orchestrator.execute(graph)
# βœ… 3 agents collaborate in DAG, results flow automatically

πŸ“Š Performance

Benchmark Target Actual Status
L1 Intent Match (60 patterns) < 100ms ~0.3ms βœ…
L1 No-Match Traversal < 200ms ~0.4ms βœ…
Adapter Cold Start < 2000ms ~1.0ms βœ…
Batch Registration (60 patterns) β‰₯ 50 60 βœ…

πŸ“– Docs & Links

Resource Link
πŸ“š Quick Start examples/basic_usage.py
πŸ—οΈ Gateway Demo examples/gateway_demo.py
πŸ“‹ Changelog CHANGELOG.md
🀝 Contributing CONTRIBUTING.md
πŸ›‘οΈ Security SECURITY_TOOLS.md

🌟 Star History

Star History Chart



πŸ™ Acknowledgements

Playwright β€’ MCP β€’ A2A β€’ OpenTelemetry β€’ All Contributors ❀️




If AI-Bridge empowers your workflow, give us a ⭐!


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

         From Chat to Action πŸš€

Made with ❀️ for the AI Automation Community

Packages

 
 
 

Contributors

Languages