Amplifier Application Integration
One line that makes Amplifier apps clean
Tools, hooks, the prepare/session lifecycle: you have all of that. But FastAPI, WebSockets, Slack, and voice are exactly where projects stall — the gap between “I understand bundles” and “I’ve built a production app with Amplifier.”
That gap has a shipped answer.
One 903-line Application Integration Guide, generated with Amplifier itself, added in a single commit by Brian Krabach on 2026-02-21.
So why do so many apps still get it wrong?
Calling the provider directly in a while-loop — Anti-Pattern #3 — produces apps that look like Amplifier but get none of its benefits.
The fix is one architectural idea.
The Protocol Boundary is the one concept the guide calls the single most important. Your app owns HTTP, WebSockets, audio, and Slack; Amplifier owns session lifecycle, tool dispatch, and provider/hook/context management.
They meet at a thin bridge — and that bridge is countable.
HTTP / WebSocket / audio / Slack
Session lifecycle, tool dispatch, providers, hooks, context
ApprovalSystem, DisplaySystem, StreamingHook, and Spawn Capability. ApprovalSystem and DisplaySystem are real Protocol classes in amplifier-core: the kernel provides mechanism, the app layer provides policy.
One boundary; now how does every app type plug in?
Protocol at approval.py:18
Protocol at display.py:12
Realized via hooks.register('*', ...)
App-layer policy via register_capability('spawn', ...)
LOAD → COMPOSE → PREPARE → CREATE → MOUNT → HOOK → EXECUTE. That single universal shape maps to five patterns: per-request, per-conversation, singleton, voice/realtime bridge, and multi-session manager.
Follow it and the payoff is concrete.
Respect the boundary and you get four wins for free, straight from the guide (lines 51–54).
One rule carries all of it.
Mock either side independently.
Same session behind web, voice, CLI, Slack.
Know which side to debug.
Swap the web framework without touching Amplifier — and vice versa.
Your app owns HTTP, WebSockets, audio, and Slack. Amplifier owns the session. Keep each on its side and the integration stays clean as providers, tools, and hooks evolve.
One principle plus a small pattern set — that’s the whole guide.
Data as of: 2026-04-09 (amplifier-foundation HEAD 0965a343) SHIPPED
Primary source: microsoft/amplifier-foundation — docs/APPLICATION_INTEGRATION_GUIDE.md. Contract types in amplifier-core (approval.py, display.py, coordinator.py, hooks.py).
Commands run:
wc -l amplifier-foundation/docs/APPLICATION_INTEGRATION_GUIDE.md → 903 linesgit log --diff-filter=A --date=short -- docs/APPLICATION_INTEGRATION_GUIDE.md → commit 862a814c, Brian Krabach, 2026-02-21git show 862a814c | head -12 → “Generated with Amplifier ... Co-Authored-By: Amplifier”sed -n '32,44p' / '62,72p' docs/APPLICATION_INTEGRATION_GUIDE.md → four protocol points; seven lifecycle stepsgrep -n '^### Pattern [A-E]:' docs/APPLICATION_INTEGRATION_GUIDE.md → five session patterns (A–E)grep -n '^### [0-9]\. ' docs/APPLICATION_INTEGRATION_GUIDE.md → six anti-patternsgrep -rn 'class ApprovalSystem\|class DisplaySystem' amplifier-core/amplifier_core/ → approval.py:18, display.py:12grep -rl -i 'pythonnet|colombod' /home/ramparte/dev/ANext → zero Amplifier hits (source hint refuted)Gaps: End-user adoption/readership numbers are not measurable from the repo and are omitted. Illustrative example classes (WebSocketStreamingHook, VoiceBridge, LifelineApp, SessionManager) live inside the doc and are not shipped importable modules. The guide’s two “Suggested New Examples” (Web/FastAPI, Voice) are proposed, not yet shipped.
Primary contributor: Brian Krabach (sole author across all commits touching the guide and related docs), co-authored by the Amplifier bot.