Foundation

L1. Generic infrastructure with no business logic in it. The test is that another product could run on it unchanged.

1 min read Updated Aug 12, 2026

Foundation

L1. The base every layer stands on.

The foundation is generic. It holds no agent logic, no workflow logic and no company rule. The test is simple: another product could run on it unchanged.

L1 FOUNDATION — generic infrastructure, and the line that keeps business logic out
L1 FOUNDATION — generic infrastructure, and the line that keeps business logic out
SERVING
SERVING
Application API
the control API and internal routes
Application APIthe control API and internal routes
Durable execution engine
one engine, for every run
Durable execution engineone engine, for every run
DATA
DATA
PostgreSQL
definitions · execution · company state · knowledge
PostgreSQLdefinitions · execution · company state · knowledge
Vector index · object storage
Vector index · object storage
COORDINATION
COORDINATION
Queue · event bus
Queue · event bus
Scheduler · cache
Scheduler · cache
IDENTITY AND SECRETS
IDENTITY AND SECRETS
Authentication
identify a person, issue a session
Authenticationidentify a person, issue a session
Secrets vault
a row holds a reference, never a value
Secrets vaulta row holds a reference, never a value
OBSERVABILITY — logs · traces · metrics · errors, correlated by run id
a run that fails must be explainable from Mission Control alone
OBSERVABILITY — logs · traces · metrics · errors, correlated by run ida run that fails must be explainable from Mission Control alone
NO BUSINESS LOGIC HERE — another product could run on this layer unchanged
if a change to a business rule needs a change here, the boundary is wrong
NO BUSINESS LOGIC HERE — another product could run on this layer unchangedif a change to a business rule needs a change here, the boundary is wrong
LEGEND
LEGEND
deterministic plumbing
deterministic plumbing
a queue, a bus, or a rule that binds all of it
a queue, a bus, or a rule that binds all of it
ordinary component
ordinary component
a grouping, not a component
a grouping, not a component
Text is not SVG - cannot display
L1 FOUNDATION — generic infrastructure, and the line that keeps business logic out
L1 FOUNDATION — generic infrastructure, and the line that keeps business logic out
SERVING
SERVING
Application API
the control API and internal routes
Application APIthe control API and internal routes
Durable execution engine
one engine, for every run
Durable execution engineone engine, for every run
DATA
DATA
PostgreSQL
definitions · execution · company state · knowledge
PostgreSQLdefinitions · execution · company state · knowledge
Vector index · object storage
Vector index · object storage
COORDINATION
COORDINATION
Queue · event bus
Queue · event bus
Scheduler · cache
Scheduler · cache
IDENTITY AND SECRETS
IDENTITY AND SECRETS
Authentication
identify a person, issue a session
Authenticationidentify a person, issue a session
Secrets vault
a row holds a reference, never a value
Secrets vaulta row holds a reference, never a value
OBSERVABILITY — logs · traces · metrics · errors, correlated by run id
a run that fails must be explainable from Mission Control alone
OBSERVABILITY — logs · traces · metrics · errors, correlated by run ida run that fails must be explainable from Mission Control alone
NO BUSINESS LOGIC HERE — another product could run on this layer unchanged
if a change to a business rule needs a change here, the boundary is wrong
NO BUSINESS LOGIC HERE — another product could run on this layer unchangedif a change to a business rule needs a change here, the boundary is wrong
LEGEND
LEGEND
deterministic plumbing
deterministic plumbing
a queue, a bus, or a rule that binds all of it
a queue, a bus, or a rule that binds all of it
ordinary component
ordinary component
a grouping, not a component
a grouping, not a component
Text is not SVG - cannot display
Infrastructure in four groups, with observability across all of it, and the line that keeps business logic out of this layer.

Components

ComponentJobConsumed by
Application APIServe the control API and the internal service routes.L6, L2
PostgreSQLHold every definition, every run and all company state.Every layer
Vector indexServe similarity search over knowledge. An extension of the same database.L3
RedisCache, lock and hold short-lived state.L4, L2
QueueHand work to a worker.L4
Event busCarry a fact from a producer to any number of consumers.L4
SchedulerStart work at a time, or on a repeat.L4
Durable execution engineKeep a run alive across a crash, a retry and a wait.L4
Object storageHold a file an agent read or produced.L4, L2
AuthenticationIdentify a person, and issue a session.L6, plane
Secrets vaultHold every credential value.L2
ObservabilityLogs, traces, metrics and errors, correlated by run id.Every layer

Rules

  • No business logic here. No agent rule, no workflow rule, no company rule. If a change to a business rule requires a change in this layer, the boundary is wrong.
  • The database is the tenancy boundary. Row-level security is enforced in PostgreSQL, not in a handler. A handler can forget. The database cannot.
  • One durable execution engine. Not one for agents and a second for workflows.
  • A secret value never leaves the vault as data. A row holds a reference. A log holds neither.
  • Every log line and every trace carries the run id. A run is the unit of work, so it is the unit of debugging.
  • The foundation does not know a run's meaning. It knows a run has an id, a state and a deadline. What the run does is L4's business.
  • Storage is boring on purpose. One database, one cache, one bus. A new store needs a reason that the existing ones cannot meet.

What the database holds

One database, and four groups of tables.

TEXT
Definitions    agents · skills · workflows · triggers · tools · policies · limits
Execution      runs · run_events · artifacts · approvals · policy_decisions
Company state  companies · people · opportunities · projects · tasks ·
               goals · metrics · activities · decisions
Knowledge      documents · document_chunks · memories

Definitions are read constantly and written rarely. Execution is written constantly and read by one screen. Company state is the product. Knowledge is the index. The four have different access patterns and one connection pool, and that is fine at this scale.

Observability

Three signals, one correlation key.

SignalAnswersKey
LogsWhat happened in this step?run id, step id
TracesWhere did the time go?run id
MetricsIs the fleet healthy?agent, workflow, domain

A run that fails must be explainable from Mission Control alone. A person should not need a log search to answer "why did it stop". That is why the run row carries the error, and the event log carries the sequence.

Data model

TableHolds
usersOne employee, and the roles that set what they may do.
secretsOne credential reference, its owner and its rotation date. The value is in the vault.

Every other table belongs to a layer above, and is listed on that layer's page.

Risks

RiskMitigation
Business logic leaks into the foundation, one convenience at a timeThe test is stated above, and it is applied in review
A second store is added for one feature, and it becomes a source of truthA new store needs a written reason. The default answer is the database we run
A secret reaches a log or an event payloadRedaction at the logger, and a rule that a tool result carries no secret
Run volume outgrows one databaseRetention and rollup first, partitioning second. Both are cheaper than a second store
The vector index competes with the transactional loadIt is a separate index in the same database, and it can move to a replica

Open questions

  1. Is the durable execution engine self-hosted, or a managed service? The answer sets the failure mode, not the feature set.
  2. What is the retention for run_events, and what is rolled up?
  3. Does Mission Control share an identity provider with the customer product, or keep its own? A shared provider is convenient, and it is a coupling.
  4. Does the vector index stay in PostgreSQL at the volume knowledge will reach?

Diagram source. ac-docs/diagrams/mission-control-layers.drawio, page mission-control-foundation. Edit that page, then run ./scripts/export-diagrams.sh mission-control-layers. Update this page and the diagram together.