Architecture & Philosophy · Amplifier IPC

Every Component,
Its Own Container

Decomposing the AI agent monolith into composable microservices — JSON-RPC today, Dapr-native containers tomorrow.

Active · Rapid Development
May 2026 · payneio/amplifier-ipc
The Problem

The monolith
trap

🔗

Dependency Hell

Every tool, hook, and provider shares a single process. One package conflict breaks everything. Anthropic SDK pins clash with OpenAI pins.

🔒

Python-Only Lock-In

Dynamic import_and_create() machinery ties every component to Python. No path to Rust tools, Go providers, or TypeScript hooks.

💥

Blast Radius

A crashing tool takes down the entire agent session. No process isolation means no fault boundaries.

The in-process architecture that got Amplifier to v1 becomes the ceiling that prevents v2. Every component shares memory, shares dependencies, shares fate.

The Solution

IPC service
architecture

Every component runs as its own subprocess. A central Host routes messages over JSON-RPC 2.0 via stdio. Fresh processes per turn — no stale state, no concurrency bugs.

1

Spawn

Host spawns all service subprocesses from isolated uv virtualenvs. Each service gets its own dependency tree. ~200ms startup cost, paid once per turn.

2

Discover

Host sends describe to every service — builds a routing table of tools, hooks, providers, and content manifests. No static config needed.

3

Route

Orchestrator drives the agent loop. All tool calls, provider requests, and hook events flow through the Host as a dumb message bus. Fan-out, chaining, parallel dispatch.

4

Tear Down

Turn completes. SIGTERM all services, SIGKILL after timeout. Next turn starts fresh — clean processes, clean state, zero stale memory.

Architecture

Host as dumb router, orchestrator drives all logic

🎯

CLI / REPL

User-facing entry point — Click + Rich + prompt-toolkit

📡

Host

Dumb message bus — spawns services, routes requests, persists transcripts

🧠

Orchestrator

Agent loop driver — calls providers, tools, hooks via JSON-RPC

Provider Services

LLM adapters — Anthropic, OpenAI, Azure, Gemini, Ollama, and more. Each in its own subprocess with its own SDK version.

Tool Services

File I/O, search, bash, web, delegation, tasks, todos. Parallel dispatch via asyncio.gather across service boundaries.

Hook Services

Logging, redaction, modes, routing, progress monitoring. Priority-ordered fan-out with DENY/MODIFY/INJECT semantics.

The Host does NOT interpret hook results, drive the agent loop, hold conversation state, or call LLMs. It's a router. The orchestrator owns all logic.

Service Catalog

13 services, one mono-repo

amplifier-foundation

Orchestrator, context manager, core tools, hooks — the kitchen sink behavior

amplifier-providers

8 LLM provider adapters with streaming support

amplifier-modes

Runtime mode overlays — tool + hook for mode switching

amplifier-skills

Domain knowledge discovery and loading

amplifier-routing-matrix

Model routing via curated matrices

amplifier-recipes

Content-only — recipe definitions

amplifier-core

Content-only — core context docs

+ 6 more

amplifier-amplifier, filesystem, browser-tester, design-intelligence, superpowers, system-design-intelligence

A service is a Python package that exposes components via decorators. The host discovers components automatically — no YAML registration of individual tools. Just decorate your classes and describe finds them.

The Dapr Future

From stdio
to service mesh

The next evolution: replace the entire IPC layer with Dapr-native microservices. Every behavior becomes its own container.

Why Dapr

  • Service invocation with mTLS, retries, circuit breakers
  • Pub/sub for streaming tokens and hook fan-out
  • State store for session persistence (Redis)
  • Built-in observability and tracing
  • Language-agnostic — any HTTP server works

The Decomposition

  • ~28 application containers from today's 13 services
  • Foundation alone splits into 14 behavior containers
  • Shared base image + thin SDK keeps overhead minimal
  • Content-only services: zero custom code needed
  • Standard HTTP endpoints — no custom protocol
# Three communication patterns cover all interactions: Pattern 1: Request/Response # tools, providers, /describe Pattern 2: Pub/Sub Streaming # LLM tokens -> orchestrator -> CLI Pattern 3: Pub/Sub Hooks # lifecycle events, parallel fan-out
By the Numbers

10 days of focused building

407
Commits
13
Services
26K
Lines of Source
28K
Lines of Tests

Test Ratio: >1:1

28,262 lines of tests covering 26,300 lines of source across 147 test files. The protocol library has zero external dependencies — pure Python.

Solo Sprint

394 of 407 commits by Paul Payne (payneio) between March 20–30, 2026 — a complete IPC rewrite in 10 days, with AI-assisted development.

Design Principles

What the architecture enforces

🔌

Process Isolation

A crashing tool can't take down the orchestrator. Each service has its own memory space, its own dependencies, its own fault boundary.

🔄

Spawn-Per-Turn

Services are born fresh and die clean every turn. No stale state, no memory leaks, no concurrency bugs. Process startup (~200ms) is the only cost.

🌐

Language Agnostic

JSON-RPC 2.0 over stdio today, standard HTTP tomorrow. Write tools in Rust, hooks in Go, providers in TypeScript. The wire format doesn't care.

🏗️

Composable Agents

Agent definitions compose behaviors by URL. Each behavior activates components from services. Mix and match orchestrators, tools, and hooks freely.

📦

Dependency Freedom

Each service gets its own uv virtualenv. Anthropic SDK v0.40 and OpenAI SDK v1.60 coexist without conflict. No diamond dependency problem.

🛣️

Migration Path

The IPC boundary is the future network boundary. Today's subprocess becomes tomorrow's container. Business logic doesn't change — only the transport.

Quick Start

Install, discover, run

# Install uv tool install git+https://github.com/payneio/amplifier-ipc # Discover and register services from a path amplifier-ipc discover ./services/amplifier-foundation \ --register --install # Or register a single agent definition amplifier-ipc register ./definitions/foundation-agent.yaml \ --install # Run interactively amplifier-ipc run --agent foundation # Or single-shot amplifier-ipc run --agent foundation "What files are here?"

Session Persistence

Sessions survive across turns. Resume with amplifier-ipc session resume <id>. Full transcript history in ~/.amplifier/sessions.

3-Tier Config

Settings merge from global (~/.amplifier/settings.yaml), project (.amplifier/settings.yaml), and local (.amplifier/settings.local.yaml).

Sources & Methodology

How this deck was built

Repository: payneio/amplifier-ipc (GitHub)

Code analysis:

Git history: git log --all — 407 commits, March 20–30, 2026. 394 by Paul Payne, 13 by Amplifier Implementer.

Team knowledge: Amplifier team knowledge base — capability entries for all 13 IPC services plus the amplifier-ipc-protocol package, and the architecture overview DOT diagram.

Category: Architecture & Philosophy · Primary contributor: payneio · Accent: #42A5F5 (infrastructure blue)

More Amplifier Stories