Durable Enterprise Agentic Middleware
Theme: AI/ML and Software Engineering (APIs and Cloud Infrastructure) Connected to thousands of integrations, verifiable compute and data sources
Problem Statement
Agentic Middleware is the next evolution of integration layers, a system that doesn’t just handle API calls, but understands them. This is crucial in the context of creating Agents that boost productivity while scaling horizontally. An agentic system acts with intent, it observes the current state, reasons about possible next steps, and executes actions based on that reasoning
More than 4 in 5 IT leaders believe that AI agents will create more complexity than value due to integration challenges and silos
Inspiration
Openclaw/clawdbot has been a powerful community project changing how we interact with infrastructure and integrations. But there’s one problem, it requires a server/virtual machine/dedicated machine. I rewrote and re architected my own open api based middleware with the same capabilities as clawdbot; effectively an agentic middleware to be 100% stateless and serverless with integrated oauth and multi tenant.
Modern infrastructure and middleware is powerful --- but controlling it still feels fragmented. Dashboards, CLIs, cloud consoles, SSH sessions, and scattered API tokens.
We asked a simple question:
What if middleware on serverless infrastructure behaved like an operating system you could talk to?
Not a chatbot.\ A Reactive decision making layer for AI.
Something closer to:
$$ S_{t+1} = f(S_t, E_t) $$
Where:
- $S_t$ = system state\
- $E_t$ = inbound event (Telegram message, webhook, cron tick)\
- $f$ = deterministic transition function
Instead of clicking dashboards, you message your control plane.\ Instead of wiring integrations manually, the agent reasons across them, one click and you are integrated with your favorite openAPI
What it does
Agentic Middleware is a conversational operating layer for infrastructure and Open APIs.
From Telegram, Whatsapp or SMS, you can:
- Provision resources
- Connect to any cloud database
- Trigger workflows
- Execute SSH commands against any server or cloud
- Query SQL and metrics
- Connect and automate across 900+ APIs via Composio
- Orchestrate multi-step workflows with memory
- Create memories and workflows by chatting
It is:
- Serverless
- Secure and enterprise ready
- Connected to 1000 Consumer and Enterprise Integrations
- Stateful
- Event-driven
- Agent-powered
Traditional LLM usage:
$$ Response = f(Prompt) $$
Our system evolves over time:
$$ S_{t+1} = f(S_t, E_t) $$
No persistent servers.\ No background VMs.\ Just workflows, state machines, and AI. I’m
How we built it
Core Stack
- Next.js (TypeScript) -- API routes + edge handlers\
- OpenAI API -- streaming reasoning and tool selection\
- Telegram Bot API -- conversational control surface\
- Vercel Edge Compute -- low-latency global execution\
- Vercel Durable Workflows -- long-running state machines\
- Composio API -- 100+ integrations\
- SSH bridge -- execute commands on arbitrary infrastructure
Architecture
- Telegram message arrives\
- Edge function validates webhook\
- Workflow resumes with current state\
- OpenAI selects tools + next actions\
- Composio or SSH executes external operations\
- State persists\
- Streamed response is sent back to Telegram
Instead of:
$$ Response = f(Prompt) $$
We built:
$$ S_{t+1} = f(S_t, E_t) $$
Workflows + events simulate a continuously running daemon process --- entirely serverlessly.
Challenges we ran into
Stateless Infrastructure, Stateful Behavior
Serverless functions are ephemeral. Control planes are not.
We solved this with:
- Durable workflows as deterministic state machines\
- Persisted session memory\
- Event-driven resumption\
- Streaming updates to Telegram
Streaming AI + UX
Telegram requires progressive message updates.
We implemented:
- Typing indicators\
- Streaming token updates\
- Incremental message edits\
- Tool call status feedback
Security
Allowing AI to execute SSH commands required:
- Target allowlists\
- Structured command validation\
- Scoped credentials\
- Controlled execution boundaries
Accomplishments that we're proud of
- Built a stateful control plane using purely serverless primitives\
- Turned Telegram into a secure multi-cloud command interface\
- Integrated 100+ APIs via Composio\
- Enabled AI-driven SSH infrastructure control\
- Achieved global edge deployment via Vercel
We proved you can build an agentic operating layer without running a single VM.
What we learned
- Durable workflows can simulate long-lived processes\
- AI becomes powerful when paired with state machines\
- Event-driven systems align naturally with LLM reasoning\
- Streaming UX matters as much as model quality\
- Security boundaries must be explicit when AI can act
What's next for Serverless Agentic Enterprise Middleware
- Privacy Preserving Inference + Non-Quantization ZK Proofs + Attestations
- Infrastructure graph memory\ + relational querying states
- Drift detection + improved autonomous remediation\
- Policy-as-code enforcement + GitOps\
- Audit logging + compliance exports\
- Fine-grained SSH sandboxing\
- Multi-region awareness + BGP Anycast\
- Self-healing workflows improvement
Long term vision:
Confidential Compute via Tinfoil.sh Private Inference and even Chainlink CRE Runtime for TDX and SGX Style Enclave compute for arbitrary actions, https requests, streams etc A conversational operating system for infrastructure ---\ not a chatbot, not a dashboard,\ but a programmable, serverless, agentic control plane.
What's next for Durable Enterprise Agentic Middleware Platform
Built With
- composio
- durableworkflows
- nextjs
- openai
- openapi
- serverless
- typescript
- vercel
- workflowautomation

Log in or sign up for Devpost to join the conversation.