EG.

System / 02 · Agentic application

Teaching a backend to talk to agents.

My role

Principal author of the communication contract. Led the application-backend foundation. Built the first agent on it.

Others

Colleagues built the Python SDK, ten more agents, telemetry, CI/CD and security, and the UX layer.

Stack

Protobuf, Go, Python, AMQP, HTTPS with signed requests, S3, MCP.

01 The problem

A campaign-agent prototype worked. Turning it into a product meant connecting two worlds that do not fit.

A backend is fast, strict and durable. An agent is slow, talkative and can vanish mid-thought. Without a shared contract, five teams would renegotiate the same things for every integration: identity, run state, cancellation, questions to the user, results and errors.

02 The core decision

The app owns the process. The agent owns one step.

APPLICATION BACKEND

  • Workflow and its steps, in ordinary code
  • Permissions and approvals
  • Durable run state

VERSIONED CONTRACT

16 message types cover the whole conversation

Every message says which application, entity, step, thread, run, user and organization it belongs to.

AGENT

  • Reasons inside a single business step
  • Asks the user when it needs input
  • Hands back a result the app can act on

03 How they talk

Commands out, events back.

BACKEND · GO

Owns the process

COMMANDS

Signed HTTPS call that must answer at once: accepted or rejected.

EVENTS

Progress, questions and results return through the message queue. No stream is held open.

AGENT · PYTHON

Owns one step

TWO CHANNELS

Commands out, events back

A command gets an immediate yes or no over HTTPS. Progress, questions and results return through the message queue.

NO NEW STACK

An agent is just another service

Events land on an endpoint the service platform generates. Same queue, same permissions, same tools.

SLEEP

Runs that pause themselves

The agent books its own wake-up and stops. The scheduler resumes the same run hours later.

SAFE TO REPEAT

Built for lost messages

Every message has an identity and a cause. Applying it twice changes nothing; silence triggers a status check.

04 What we didn't build

The best part is what we didn't build.

  • No second event system
  • No new permission model
  • No duplicate business logic for tools

11

agents built on it in about six weeks

16

message types

108

specification documents

33

agent tools on existing services

5

repositories on one contract

A test console built on the same contract lets QA and product check any agent before its UI exists.

05 Where it goes next

The backend pins a contract, not a model or a vendor.

Agents become replaceable, and the next agentic product starts from the same foundation. As more services move onto the platform, more of the business becomes callable by agents, with the permissions it already has.

Next: from a creator's link to a paid commission.

System / 03