Skip to content
awesome-applied-ai
← all layers

Orchestration & Protocols

Assemble context, coordinate tools

What runs the loop, and how does it survive a crash?

28 entries · 4 categories · 3 equations

The arithmetic

Reliability compounds multiplicatively
Psuccess  =  i=1npi  =  pnP_{\text{success}} \;=\; \prod_{i=1}^{n} p_i \;=\; p^{\,n}

A 20-step agent whose every step is 99% reliable succeeds 81.8% of the time. At 95% per step it succeeds 35.8%. This single line is the entire argument for durable execution — you cannot reach acceptable end-to-end reliability by improving prompts.

Expected steps executed, with and without checkpoints
E[S]retry-all=npnE[S]checkpoint=npE[S]_{\text{retry-all}} = \frac{n}{p^{\,n}} \qquad E[S]_{\text{checkpoint}} = \frac{n}{p}

At n = 20 and p = 0.95, restarting the whole run costs ~56 step-executions; resuming from the last checkpoint costs ~21. The gap widens exponentially in n, which is why the durability substrate is the decision and the agent library is the replaceable part.

Grammar-constrained decoding
p(t)  =  p(t)1 ⁣[tVvalid]tVvalidp(t)p'(t) \;=\; \frac{p(t)\,\mathbb{1}\!\left[t \in V_{\text{valid}}\right]}{\displaystyle\sum_{t' \in V_{\text{valid}}} p(t')}

Mask invalid tokens, renormalise. Schema conformance becomes 100% by construction — which is why JSON validity is a solved non-issue. The mask says nothing about whether the model picked the right tool or plausible-but-wrong arguments.

Agent frameworks

Runtimes that hold state across steps and failures.

14
01

LangGraph

Graph runtime with checkpointed state machines, durable execution and human-in-the-loop

durabledefault-choice
MITopen sourcewidely deployedboth
02

Temporal

General durable execution treating agents as replayable workflows

Infrastructure rather than an agent library. Often the right substrate underneath one.

durableinfrastructure
MITopen corewidely deployedboth
03

Claude Agent SDK

The harness behind Claude Code: subagents, hooks, compaction, MCP-native

vendor-sdkanthropicmcp
Anthropiccommercialproduction viableboth
04

Google ADK

Agent SDK with evaluation and a deployment path into Vertex Agent Engine

vendor-sdkgoogle
Apache-2.0open sourceproduction viableboth
05

LangChain 1.x

Integration layer, now a thin facade over the LangGraph runtime

Third significant rewrite. Adopt LangGraph directly and treat integrations as optional glue.

churn-risk
MITopen sourceproduction viableself-host
06

LlamaIndex

Ingestion, parsing, indexing and retrieval, with agent features added later

A retrieval library with agent features, not an orchestration spine.

rag
MITopen sourceproduction viableself-host
07

Mastra

TypeScript-native agents, workflows, RAG and evals

typescript
Apache-2.0open sourceproduction viableboth
08

Microsoft Agent Framework

AutoGen and Semantic Kernel merged; .NET and Python agents plus workflow graphs

microsoftdotnet
MITopen sourceproduction viableboth
09

OpenAI Agents SDK

Minimal agent loop with handoffs, guardrails, tracing and sessions

vendor-sdkopenai
MITopen sourceproduction viableboth
10

Pydantic AI

Type-safe agent layer with schema validation and dependency injection first-class

typedpython
MITopen sourceproduction viableself-host
11

DBOS

Durable execution using Postgres as the workflow source of truth

durablepostgres
MITopen coreearlyboth
12

AutoGen

Research multi-agent conversation framework, superseded by Agent Framework

Maintenance mode. Greenfield work here is building on a dead branch.

deprecatedmicrosoft
deprecatedMITopen sourceresearchself-host
13

Semantic Kernel

.NET-first agent and plugin SDK, folded into Agent Framework

Maintenance mode since Agent Framework GA in April 2026.

deprecatedmicrosoft
deprecatedMITopen sourceresearchself-host
14

CrewAI

Role-based multi-agent crews with LLM-driven task routing

LLM-driven routing makes cost and latency non-deterministic and failures hard to reproduce. Widely downloaded, widely abandoned at the pilot boundary.

multi-agentpilot-risk
MITopen corefragileboth

Prompt optimization

Compiling prompts against a metric instead of hand-tuning.

4
01

Ax

TypeScript equivalent of DSPy's signature-driven programs

typescript
Apache-2.0open sourceearlyself-host
02

GEPA

Reflective evolutionary prompt optimization, shipping inside DSPy

research-derived
MITopen sourceearlyself-host
03

DSPy

Declarative signatures and modules that compile prompts against a metric

Offline optimizers, Python-only, no gateway or observability story.

compilationoffline
MITopen sourceresearchself-host
04

TextGrad

Backpropagates natural-language gradients through LLM pipelines

A paper you can import.

research-only
MITopen sourceresearchself-host

Protocols & conventions

How tools, agents and repos describe themselves.

6
01

AGENTS.md

Tells coding agents how to build, test and style a repository

Read by Codex, Cursor, Copilot, Gemini CLI, Zed, Aider and goose. No ratified versioned spec yet.

conventionde-facto-standard
AAIFopen sourcewidely deployed
02

CLAUDE.md

Hierarchical project context with imports and per-directory scoping

conventionanthropic
Anthropiccommercialwidely deployed
03

MCP

Client/server protocol for exposing tools, resources and prompts to models

Donated by Anthropic to the Linux Foundation in December 2025, removing single-vendor risk. Tool poisoning remains an OWASP-catalogued attack class.

protocolwon-the-layersecurity-caveat
Linux Foundation AAIFopen sourcewidely deployed
04

A2A

Peer agent discovery via Agent Cards, plus task delegation

protocolagent-to-agent
Linux Foundationopen sourceproduction viable
05

AGNTCY

Directory, identity, messaging and observability for agent meshes

protocolmesh
Linux Foundationopen sourceearly
06

llms.txt

Site-level markdown index intended for LLM consumers

No major AI platform has confirmed reading it. Optional SEO hygiene, not context engineering.

conventionunproven
Proposalopen sourceearly

Structured output

Constrained decoding and schema enforcement.

4
01

Instructor

Pydantic validation plus a retry loop around any provider

validationretries
MITopen sourcewidely deployedself-host
02

XGrammar

Pushdown-automaton constrained decoding, the default in vLLM, SGLang and TRT-LLM

constrained-decodingdefault-choice
Apache-2.0open sourcewidely deployedself-host
03

llguidance

Low-latency grammar engine with the strongest measured JSON validity

constrained-decoding
MITopen sourceproduction viableself-host
04

Outlines

FSM-based structured generation, largely displaced by XGrammar

constrained-decoding
Apache-2.0open sourceproduction viableself-host