Inspiration
Most communication tools are good at delivering messages, but they do not understand when the right people are missing from the conversation.
We wanted to build an AI agent that could go beyond answering a message and actually take responsibility for moving a situation forward. For example, if someone reports that a payment is stuck and the required Finance or Security stakeholders have not reviewed it, the agent should understand the situation, determine who needs to be involved, and reach them through another communication channel.
That idea became Bridge AI: an autonomous communication orchestration agent built around Caspian.
What it does
Bridge AI turns unstructured communication into an autonomous workflow.
A message arriving through Telegram is processed by the agent to:
- Understand the user's intent and extract relevant entities.
- Classify the topic.
- Load the applicable organizational policy.
- Determine which stakeholder roles are required.
- Identify missing stakeholders.
- Calculate communication health and priority.
- Decide whether the case should be resolved, followed up, or escalated.
- Resolve missing roles to actual stakeholders.
- Draft and dispatch the appropriate communication through another channel.
- Maintain a persistent case and decision timeline.
For example:
"Payment of ₹25,000 is stuck and Finance and Security haven't reviewed it yet. Please escalate this."
Bridge AI can identify the payment-system context, detect the missing stakeholders, determine that the situation requires escalation, select an appropriate stakeholder, and send an email through Caspian.
The resulting workflow is:
Telegram → Caspian → Bridge AI → AI reasoning → Stakeholder analysis → Escalation → Caspian → Email
The system also provides a React dashboard where the resulting case, priority, communication health, stakeholders, decisions, and timeline can be inspected.
How we built it
The backend is built with Python and FastAPI, with LangGraph orchestrating the reasoning workflow and PostgreSQL providing persistent case and decision state.
Caspian provides the communication layer. We integrated both Telegram and Email, allowing Bridge AI to receive communication through one channel and autonomously reach stakeholders through another.
The reasoning pipeline is broken into explicit stages rather than relying on a single opaque LLM response:
receive_message → extract_intent → extract_entities → classify_topic → load_policy → detect_missing_stakeholders → calculate_communication_health → calculate_priority → resolution_evaluator → select_channel → generate_message → create_decision → dispatch
The frontend is built with React, TypeScript, Vite, and Tailwind CSS, providing a case-management interface and visual timeline for the agent's decisions.
We also built automated tests around the core application and integration layers, and verified the communication workflow against real Caspian channels and real backend state.
Challenges we ran into
One of the biggest challenges was making the agent's communication state reliable across asynchronous inbound messages.
A real human reply can arrive long after an agent has paused its reasoning workflow. We had to ensure that an incoming message could be associated with the correct conversation and resume the appropriate case instead of accidentally creating a duplicate case.
We also encountered a database transaction issue in the real inbound event path. The inbound poller originally reused a long-lived database session, meaning successful processing could remain inside an uncommitted transaction. We changed the inbound path to use a session-per-event unit of work with explicit commit/rollback behavior.
Another challenge was timezone consistency between PostgreSQL and application-generated timestamps. We normalized the application's database connections to UTC and added regression coverage for pooled connections and rollback behavior.
Finally, we had to make the system useful without turning the frontend into a collection of fabricated dashboard data. The frontend consumes the real backend APIs and displays the actual cases, decisions, stakeholders, and timelines produced by the agent.
Accomplishments that we're proud of
We are most proud that Bridge AI is not just a simulated chatbot or a static dashboard.
The core workflow has been exercised with real communication through Caspian:
Telegram message → AI reasoning → stakeholder identification → escalation → Email dispatch → persistent case timeline.
We also built the system so that the agent's reasoning is inspectable. Instead of hiding the decision inside one LLM response, each major reasoning step becomes part of the case timeline.
The project also includes a real React frontend, PostgreSQL persistence, LangGraph orchestration, policy-driven stakeholder detection, automated tests, and real Caspian channel integration.
What we learned
We learned that building an autonomous agent is much more than connecting an LLM to an API.
The difficult part is creating reliable state, deterministic boundaries around probabilistic reasoning, handling asynchronous communication, maintaining continuity between messages, and making every important decision observable.
We also learned that communication agents need strong safeguards around persistence and delivery. A system that makes the right decision but loses its state, duplicates a case, or cannot reliably deliver the resulting message is not truly autonomous.
What's next for Bridge AI
We want Bridge AI to become a general communication orchestration layer for teams.
Future directions include supporting more communication channels, richer stakeholder directories, stronger observability, more sophisticated escalation policies, persistent inbound message history, and production-grade deployment with dedicated workers and secure secret management.
The long-term goal is simple:
Don't just give an AI agent the ability to answer people. Give it the ability to understand who needs to be involved, make the decision, and actually reach them.
Built With
- agentic
- ai
- alembic
- artificial
- caspian
- css
- docker
- fastapi
- intelligence
- langgraph
- llm
- postgresql
- python
- react
- sqlalchemy
- tailwind
- typescript
- vite
Log in or sign up for Devpost to join the conversation.