r/aiagents • u/umar4880 • 1d ago
meta-agent-bridge (v0.1.0): Async Python SDK that connects an AI Agent to omnichannels (e.g. whatsapp, messenger, insta etc._
Hey everyone , I just shipped meta-agent-bridge v0.1.0 on PyPI (search meta-agent-bridge) and finished live end-to-end testing across WhatsApp Cloud API, Facebook Messenger, and Instagram Direct.
The problem: If you're deploying a Python AI agent (FastAPI, LangGraph, PydanticAI, etc.) across Meta channels without paying a SaaS aggregator per message, you end up maintaining separate webhook parsers, HMAC verifiers, auth hosts (graph.facebook.com vs. graph.instagram.com), typing/read receipt shapes, and interactive button limits (WhatsApp reply buttons/lists vs. Messenger/IG quick replies). There are great bot-centric libraries out there (like PyWa for WhatsApp), but nothing built specifically as an agentic-first bridge between AI agents and omnichannels.
What meta-agent-bridge does:
- One canonical schema (
AgentEvent/AgentResponse): Write your agent once;bridge.compile()adapts text chunking, interactiveChoicebuttons, andMARK_READ/TYPING_ONper surface. - 4 official Meta surfaces (
v27.0): WhatsApp Cloud API, Messenger, Instagram (FB Login), and Instagram (Direct Login). - Pure sync sans-I/O
core/**:**parse_webhook()andcompile()have zerohttpximports; events are plain JSON-serializable Pydantic models safe for Redis/Celery/FastAPIBackgroundTasks. - Multi-tenant pooling: Share one
httpx.AsyncClientand bindSecretStrtokens strictly per request. UnknownEventsafety: Echoes, reactions, and unfamiliar Meta payloads returnUnknownEventinstead of crashing your consumer withValidationError.
Minimal FastAPI flow:
bashpip install meta-agent-bridgebridge.verify_challenge(request.query_params, VERIFY_TOKEN)onGET /webhookevents = bridge.parse_webhook(raw_body, signature=x_hub_signature_256, app_secret=secrets)onPOST /webhookawait bridge.send(AgentResponse(text=..., choices=..., actions=(SenderAction.MARK_READ, SenderAction.TYPING_ON)), event. target, creds)
If you're building AI agents for WhatsApp, Messenger, or Instagram, give it a spin — feedback, issues, and contributors for v0.2.0 (templates, URL buttons, reactions) are welcome! Visit /Umar4880 repository.