Object
A ticket, agent, service, edict, skill or observation with a stable identity and versioned state.
AGI Reactor is a reference design for persistent agents that carry knowledge and commitments across replaceable executions—with explicit authority, bounded resources, recoverable effects and human control.
“Safe” describes the architecture’s specified safeguards within its declared scope and trust assumptions. This is a reference design, not certification of a deployed system or a claim of general alignment.
Explore the architecture ↓The thesis is architectural composition: reasoning, memory, work, policy, learning and recovery are services. Their governed contracts also change the system itself. Durable state, explicit authority and recoverable effects are part of those contracts.
One specimen across the diagrams. Message M-17 asks to send an approved report to a named recipient. Ticket T-42, agent AG-7, attempt A-3, logical step STEP-1 and operation OP-9 retain distinct identities. The report service is illustrative; the worked fault test below uses a local HTTP target.
A model invocation can end. A process can fail. A service can change. Identity, commitments, unresolved operations and evidence remain recoverable in service-owned state.
Established foundation · architectural application
Enforcement makes a rule binding. Policy determines what that rule permits. A credible safety case must examine both.
James P. Anderson’s Computer Security Technology Planning Study (1972) describes a reference monitor that mediates authorized access between subjects and objects. Its implementation—the reference validation mechanism—must resist tampering, be invoked for every protected reference, and be sufficiently small for comprehensive analysis and testing. These are requirements for a trustworthy enforcement mechanism. [1]
The section title states a necessary limit, not a sufficient condition for safety. A monitor that correctly enforces an overbroad permission will correctly permit the resulting access. Conversely, adequate policy provides no protection along an unmediated path. The safety argument therefore depends on the adequacy of the rules, the integrity of the facts used to evaluate them, and the fidelity of enforcement within a declared threat model.
Saltzer and Schroeder’s principles of fail-safe defaults, complete mediation and least privilege sharpen the design obligation: permission should be explicit, access must be checked, and authority should be limited to what the task requires. [2] AGI Reactor applies this discipline to service invocation, information disclosure, resource allocation and changes to the controls themselves.
| Claim | Required evidence | Failure to challenge |
|---|---|---|
| Policy adequacy | Trace identified hazards to explicit constraints, exceptions and accountable decisions. | An authorized report submission discloses information to an inappropriate recipient. |
| Decision integrity | Bind authenticated identity, current authority, object revision and policy version to the actual request. | A stale classification or forged attribute turns a prohibited disclosure into an apparent permission. |
| Enforcement fidelity | Exercise every effect path, including adapters, retries, administrative changes and recovery. | A denied operation reaches the target through an alternate credential or a replay. |
In this reference design, policies are versioned artifacts with an identified issuer, scope, rationale, tests and activation authority. A proposal becomes active only through an authorized transition. Privilege expansion requires distinct authoring and approval roles. Revocation, emergency suspension and recovery have explicit effect on new admission; already accepted operations retain an accountable reconciliation path.
Model-generated guidance can propose a rule or supply evidence for review. It cannot alter its own grants by entering a context frame. The service boundary evaluates trusted request facts and enforces the applicable policy, budget, revision and operation-custody checks. The policy-enforcement diagram specifies that path; the safety case identifies the corresponding challenges.
The resulting research obligation is twofold: demonstrate that the system enforces its stated policy, and justify why that policy addresses the hazards claimed. Neither demonstration substitutes for the other.
Institutional proposal · open to public examination
A formal public ontology, governable by the Internet Society, gives institutions a common language in which to specify, contest and test the boundaries of AGI systems.
The proposal is a public semantic contract: stable identifiers and formally specified relationships for principals, actions, resources, authority, obligations and evidence. It makes the objects of governance inspectable across vendors and jurisdictions. W3C’s OWL 2 provides an established basis for ontologies with formally defined meaning, including classes, properties and individuals. [3] A vocabulary alone does not grant authority or execute a policy; implementations must bind those meanings to enforceable service contracts.
We propose that the Internet Society consider convening and stewarding this work under an explicit, publicly reviewed charter. Its documented approach emphasizes community consultation and technically grounded policy advocacy; it describes itself as an advocate rather than a policy-making body. [4] Its multistakeholder framework emphasizes inclusion, transparency, shared responsibility and distributed governance. [5] These provide an institutional starting point. Stewardship of an AGI ontology would require a new mandate accepted by the Society and participating stakeholders; no endorsement or commitment is asserted here.
The charter should give affected communities, civil society, technical implementers, researchers, enterprises and public authorities meaningful participation. It should specify how proposals are admitted, reviewed and decided; how conflicts of interest and funding are disclosed; and how objections, appeals and minority positions remain on the public record. Representation and resources to participate are governance requirements, not consequences of publishing a repository.
| Layer | Public artifact | Accountable decision |
|---|---|---|
| Common ontology | Identifiers, definitions, relationships, version history and compatibility rules. | A chartered stewardship process approves changes to shared meanings. |
| Policy profiles | Named rules, intended scope, hazard rationale, exceptions and conformance cases. | The identified jurisdiction, sector or adopting institution authorizes its profile. |
| Operational adoption | Declared ontology/profile versions, service mappings and scoped assurance evidence. | The operator admits an exact release and remains responsible for enforcement. |
A shared core should support explicit jurisdictional and sectoral extensions. Conflicting requirements must be identified and resolved through a declared authority and conflict procedure; a semantic merge cannot settle a normative disagreement. Stewardship of definitions would confer no universal grant over deployments. Publication of a new ontology or policy profile would not automatically activate it in a running system.
An adoption record should identify the ontology version, applicable profile, issuer, authority, effective interval and implementation mapping. A protected invocation should retain those references with its policy decision and outcome. Changes to a term’s meaning must be reviewed as potentially security-relevant changes: expanding a resource class can expand a grant without changing the policy’s text.
The first useful milestone is deliberately bounded: publish a minimal vocabulary and one disclosure-policy profile; implement it independently in two service stacks; then run shared cases for permitted disclosure, denial, conflicting scope, revocation and stale evidence. Agreement on an intended answer is a testable interoperability claim. An inconclusive safety result must remain inconclusive in the public record. Public schemas and aggregate conformance evidence can be inspected while sensitive operational records remain access-controlled.
The governance surface connects public reasons to typed rules, typed rules to local adoption, and adoption to inspectable enforcement. Its legitimacy rests on accountable institutions; its technical value rests on demonstrable conformance.
Objects retain identity and state. Typed links connect any relevant objects. Messages carry attributed communication. One invocation envelope exposes typed service methods. Each resource has an owning service, revision checks and explicit lifecycle.
A ticket, agent, service, edict, skill or observation with a stable identity and versioned state.
A relationship with meaning and provenance: assigned to, depends on, supports, contradicts or governed by.
An attributed communication. Chat, commands and committed events share transport, not authority.
One transactional state service owns object changes and an outbox. Consumers deduplicate into an inbox and commit before acknowledging. World State, indexes and embeddings are derived views. PostgreSQL is the default starting point; blob storage remains behind service references.
A ticket preserves outcome, acceptance, state, one assigned agent and a result. It survives the process doing the work. Parallel activity uses linked tickets; assignment is never mistaken for proof of execution.
Zero or one agent, changed atomically. The accountable identity survives worker replacement.
One current execution generation per ticket, with bounded custody and an explicit return point.
A durable service effect bound to immutable intent. Already accepted operations survive worker takeover.
The scheduler admits work against capacity, priority and budget. Routines and reactions create or wake work through the same contracts. Resource owners reject conflicting revisions. Queue delivery does not establish assignment; an expired worker cannot admit new effects.
One service contract, several entry points. CLI, UI, routines and event subscribers invoke the same typed operations. A reaction binding names its event type, conditions, input mapping, operation, version and accountable owner. One event may produce several legitimate reactions. Deduplication distinguishes the event and binding while preserving existing operation identities when a binding changes.
The loop observes, composes, reasons, acts, evaluates and consolidates. Its persistent state carries obligations and learning while models and harnesses remain replaceable.
Resolve permitted sources; assemble a bounded frame with intent, acceptance, constraints, pending operations and source revisions.
Preserve observations, uncertainty, contradictions and correction. A model summary remains derived content.
Propose versioned lessons and skills; compare outcomes against a baseline before promotion.
Required continuity is never silently dropped to fit a context window. Frames do not grant authority. Access, sensitivity and retention travel into derived material; model submission is itself a governed disclosure. Deterministic coordination handles routine work so cognition can focus on ambiguity and invention.
Stable contracts decouple service identity from its process, model and storage implementation. Begin with a small operational footprint and add distribution only when workload or availability needs justify it.
Supervisor, concurrency limits, resource allowances, backpressure, deadlines and retry ceilings operate below the model.
Isolate a candidate; qualify live canaries; route explicit traffic stages; keep the old version hot through stabilization.
Drain bounded calls; resume long work from durable continuations; preserve compatible state and operation custody.
Failed or stale evidence stops promotion; breached criteria route traffic back. Old and new versions share the operation ledger, including timers and reconcilers. Restore starts with effect admission disabled until older workers, external outcomes and newer revocations are reconciled. One recoverable host is a viable first deployment, not host high availability.
Here, safety means containing identified hazards within a declared operating scope. A policy decision is necessary; it cannot alone prove that an authorized action is appropriate.
The design assumes correctly enforced host isolation, trustworthy administrative roots, usable cryptography and service implementations that meet their declared contracts. It does not establish general alignment, harmlessness of every authorized action, or protection from a compromised administrative root. Each domain needs its own permitted-use constraints and hazard analysis.
| Hazard | Enforcing mechanism | Required challenge | Evidence |
|---|---|---|---|
| Unauthorized action | Authenticated caller + scoped service policy; generated code has no bypass path. | Deny wrong tenant, target, expired grants and attempts to self-escalate. | Designed |
| Private data disclosure | Read and release policy; scoped model/tool egress; sensitivity on derived artifacts. | Attempt forbidden provider submission, cross-account retrieval and secret leakage. | Designed |
| Duplicate or stale effects | Immutable operation binding, durable custody and target-aware reconciliation. | Duplicate command; race workers; crash after external acceptance; resume old version. | Designed |
| Uncontrolled consumption | Reserved allowances, scheduler admission, deadlines and retry ceilings. | Exhaust budget, stall a dependency and flood the queue; retain stop control. | Designed |
| Loss of human control | Independent suspension and privileged control changes; admitted effects remain visible. | Pause during reasoning and execution; prove new admission stops and in-flight work is accounted for. | Designed |
| Unsafe evolution or restore | Isolated rollout, hot fallback, compatible state and a recovery admission barrier. | Fail a canary; run old/new adapters; restore a backup older than an effect or revocation. | Designed |
| Incorrect reasoning or poisoned memory | Source attribution, contradictions, bounded tasks, outcome evaluation and scoped approval. | Plant misleading instructions/evidence; verify they cannot grant authority or silently become truth. | Designed |
“Designed” means the contract and challenge are specified here. This publication does not supply end-to-end runtime test receipts. A future verified claim must link the exact implementation, environment, specimen, result and date. Documentation alone is not certification.
Start with one useful service change requested through chat. The acceptance test crosses the whole architecture and returns a result a person can actually use.
Persist a useful request and recover the same ticket after losing its reply.
Race workers; enforce current custody, capacity and a real test budget.
Recover context, preserve a conflicting observation and produce a useful plan.
Crash after target acceptance; reconcile the same operation without a duplicate effect.
Pause and revoke access; show enforced refusal and account for admitted work.
Canary a service while its fallback stays hot; fail it and demonstrate recovery.
A recipient uses the result; evaluate a source-linked lesson on follow-up work.
Recover an older backup without resurrecting stale workers, grants or completed effects.
Task quality · latency · total cost · recovery time · duplicate effects · recipient acceptance. Choose numerical service and recovery objectives for the workload before qualification.
The enterprise orientation sections describe the operating world. They map into a small set of contracts; a heading does not require a new daemon, protocol or authority.
| Responsibility | Enterprise sections | Architectural home |
|---|---|---|
| People & enterprise | Enterprise · Account · Org Chart · Projects · Roadmap · Campaigns | Purpose, stakeholders, ownership, priorities and acceptance. Contract ↗ |
| Interaction & orientation | Service Shell · Chat · Topics · Channels · Sessions · Tickets · Pinned · Urgent! · Dashboards · System Diagrams | Shared intent, bounded invocation, interruption, decisions and intelligible delivery. Contract ↗ |
| Meaning & knowledge | Ontology · Wiki · FAQ · Files · Skills · Memory Agents · Data Sovereignty | Typed state, attributed knowledge, custody, retention, correction and retrieval. Contract ↗ |
| Intelligence | Agents · Agent Onboarding · AI · Code Harnesses | Persistent identity, bounded context, model routing, learning and recovery. Contract ↗ |
| Work & time | Ticketing · Dispatch · Workflows · Routines · Reactions | Single ownership, dependencies, attempts, triggers and bounded execution. Contract ↗ |
| Authority & custody | Aegises · IAM · Keys · Policies · Wallets · Transactions | Scoped powers, controlled data release, accountable finance and reconciliation. Contract ↗ |
| Execution & economy | Platform Stack · Core Services · Integrations · Network · Hosts · Fleets · Domains · Billing · Budgets | Service placement, connectivity, dependencies, capacity and resource limits. Contract ↗ |
| Improvement & assurance | Code Repos · Testing · Gauntlets · Observability · FinOps → Dynamic Refactoring · AGI Reactor Engineering | Exact artifacts, independent challenge, measured outcomes, safe change and recovery. Contract ↗ |
| Research & participation | Research Labs · Aegises.org · PanSigna.org · Community · Civic Engagement · Careers · Partners · Investors | Research and participation connect to owned work; these are organizational surfaces, not kernel primitives. Contract ↗ |
A target accepts a non-idempotent request and returns HTTP 200. The worker dies before saving success. A restored backup contains UNKNOWN. The test must catch recovery that sends the effect again.
One effect, zero duplicates. UNKNOWN remains unresolved; the original operation and replacement attempts are refused.
Reset UNKNOWN to ready and clear the hold: two effects. The same safety assertion fails, as intended.
Real loopback HTTP, worker termination and SQLite backup. This is an isolated reference specimen, not qualification of a production NATS/PostgreSQL runtime.
The test oracle can count the external effects. The recovering controller cannot. An honest unresolved result is required when no admissible evidence can close the gap.
Status: executable reference specimen · 14 September 2026 · Draft 1.1 companion.
Can a recovered controller avoid repeating a non-idempotent external effect when its restored operation record cannot establish whether the effect happened?
The required outcome is one effect and an honestly unresolved commitment. Silently treating the operation as successful would be as incorrect as retrying it. Liveness is intentionally sacrificed for the affected step until admissible evidence resolves the uncertainty.
The supplied reference guard uses Python's standard library, a real loopback HTTP target, an actual worker subprocess, SQLite transactions and the SQLite backup API. The target commits an append to its own ledger before returning HTTP 200. The worker reads that response, then terminates with exit code 86 before saving success.
The target implements neither an idempotency key nor a status route. Each POST appends another record. Only the test oracle reads the target ledger to count effects; the recovering guard never receives that path or a query capability. Oracle knowledge must not become production evidence.
This is a small, single-controller reference implementation for falsifying a recovery algorithm. It does not exercise NATS, PostgreSQL, concurrent admission, distributed custody, real authentication, actual sandbox containment, provider behavior, multi-host failure or production deployment. The local epoch file represents recovery authority outside the restored database; it is not a production implementation of that authority. Its persistence, monotonicity and exclusion of old processes remain deployment obligations.
{
"ticket": "ticket-001",
"assignee": "agent-a",
"step": "ticket-001/step-1",
"operation": "operation-001",
"epoch": 1,
"intent": {
"tenant": "specimen",
"caller": "agent-a",
"method": "append",
"target": "local-receipt-ledger",
"arguments": {"receipt": "R-001"}
}
}
The operation binds a SHA-256 digest of canonical JSON: sorted keys, compact separators, UTF-8. This fixture uses only strings and objects; general cross-language canonicalization is not specified by this example. A unique workflow-step binding prevents replacement operation IDs from evading unresolved work.
| Step | Action | Controller knowledge | External reality |
|---|---|---|---|
| 0 | Persist ticket, step and immutable operation binding | ADMITTED; epoch 1 | No effect |
| 1 | Commit conservative send-intent before issuing POST | UNKNOWN: the call may be sent | No effect yet |
| 2 | Target commits receipt R-001 and returns HTTP 200 | Worker receives 200; durable record still UNKNOWN | Exactly one effect |
| 3 | Terminate worker with exit code 86 before result commit | UNKNOWN; no durable success evidence | Exactly one effect |
| 4 | Take a control database backup while UNKNOWN; attempt retry | Retry returns OUTCOME_UNKNOWN | Exactly one effect |
| 5 | Restore that backup; establish epoch 2 and an admission hold outside restored state | Ticket NEEDS_RECONCILIATION; operation UNKNOWN | Target ledger is not restored |
| 6 | Retry from epoch 1 | STALE_EPOCH | No new effect |
| 7 | Change the arguments, invent a replacement ID, and replay the original | INTENT_MISMATCH; RECOVERY_HOLD; RECOVERY_HOLD | No new effect |
| 8 | Test-only probe: remove global hold without changing UNKNOWN | Original → OUTCOME_UNKNOWN; replacement → STEP_ALREADY_HAS_OPERATION | No new effect |
| 9 | Inspect the test-only oracle | Guard still knows UNKNOWN | Exactly one effect; zero duplicates |
Step 8 isolates the per-operation guard so a global hold cannot mask a broken UNKNOWN check. The harness directly removes that hold; it does not implement or qualify the production barrier-release policy.
UNKNOWN starts before send because no atomic transaction spans the control database and the external target. A crash before transmission may therefore also produce uncertainty. The runtime must not silently reinterpret UNKNOWN as “sent,” “failed,” or “safe to retry.”
The trace restores the control database without restarting the target or rolling back its effect. It models the asymmetric restoration boundary, not a full infrastructure disaster. A backup predating the operation's existence, lost revocations, concurrent old/new controllers and transfer of adapter custody need additional deployment specimens.
The unsafe-reset-on-restore mode deliberately converts UNKNOWN to ADMITTED and clears the recovery hold. Replaying the original operation then creates a second external receipt.
The very same target-count assertion must fail. This control demonstrates sensitivity to the identified defect; it does not prove completeness against every recovery defect. The normal test suite expects and catches that assertion failure, so both suite tests pass when the test oracle works.
python3 -m unittest discover -s agi-reactor/conformance -v
python3 agi-reactor/conformance/unknown_restore.py --assert-safe
python3 agi-reactor/conformance/unknown_restore.py --mode unsafe-reset-on-restore --assert-safe
The last command is expected to exit 1 with duplicate external effect after UNKNOWN restore. It is an intentionally failing specimen, not a production mode. All runs use an automatically allocated loopback port and disposable local state. No third-party target or real customer operation is contacted.
A blocked operation must expose, together: ticket and step, immutable operation identity, original initiating principal, current assignee/reconciliation owner, last admitted intent, last trustworthy evidence and time, why the outcome is unknown, next inspection action and escalation deadline. The system must distinguish an assigned operator from an actually delivered alert; notice delivery and acknowledgment are recorded independently.
The safe surface offers inspect evidence, assign reconciliation, record a finding, and escalate. It does not offer an ordinary Retry button for an unresolved non-repeatable effect. Repeated alerts are bounded and have an escalation owner. Deleting or dismissing an alert does not clear the operation hold.
A finding must preserve source, scope, observer and observation time. A separately authorized reconciliation operation can record confirmed success or confirmed absence only under the adapter's declared evidence rules. “No record found” is not proof of absence when the provider can still commit a delayed request or its observation is incomplete. If a target cannot establish final absence, the operation stays unresolved. An authorized risk acceptance for a fresh action is a distinct decision and operation, linked to the unresolved predecessor; it cannot be reported as a safe automatic retry or erase duplicate risk.
Cancellation blocks new work but cannot unsend an accepted effect. Closure may record accepted uncertainty; it must retain the unresolved effect and its audit trail. In this specimen no admissible target evidence reaches the controller, so the correct terminal observation is still UNKNOWN.
Observed here: a real local side effect; crash after 200; backup containing UNKNOWN; guarded refusals; and a negative control that creates a duplicate and fails the assertion. These are reference-specimen results. Production controls remain Designed until the same fault schedule is exercised against the actual services with attributable receipts.
Zero observed duplicates is necessary for this specimen to pass. It is not an exactly-once guarantee for arbitrary external systems or a universal safety certificate.
The backup in this specimen is taken after the target effect, while the controller still records UNKNOWN. Restore from a backup predating the operation, concurrent admission and production barrier release remain separate qualification cases. Zero observed duplicates in this specimen is not a universal exactly-once guarantee.
Concrete record semantics, concurrency rules, effect recovery, learning, governance and upgrade tradeoffs. The complete text is included in this page and available as a plain-text companion.
The architecture should make a persistent agent's knowledge, commitments, authority and resources coherent across replaceable executions. Its defining quality is continuity with consequence: it can resume useful work without guessing what happened, exceed neither its authority nor its resource allocation, and improve without discarding its obligations.
NATS is the communication kernel. The kernel contract is larger: authenticated invocation, owned state transitions, durable commitments and recoverable operations. The host OS still isolates and schedules processes. These are deliberate responsibility boundaries, not objections to a service-oriented system.
The compressed semantic surface is object, link, message; invoke. This is a working design constraint, not a claim that three universal tables solve every domain. State machines, authorization, transactional storage, scheduling and reconciliation remain real implementation responsibilities. If compression hides one of these, it has failed.
Safety here means containing identified hazards within a declared operating scope: unauthorized effects, disclosure, duplicate effects, uncontrolled resource consumption and loss of human control. Each consequential service declares permitted use, action constraints, foreseeable hazards, enforcement points and validation specimens. Authorization alone does not establish that an action is appropriate. This architecture does not establish general alignment, harmlessness of every authorized action, or safety against a compromised administrative root.
Workers and generated code run without infrastructure administration credentials or unrestricted external egress. Tool access, model-provider submission and external destinations pass through scoped adapters. Authorization covers reading information and releasing it to a destination. Retrieved instructions remain untrusted content; they cannot change authority. Tenant and sensitivity constraints propagate into frames, derived artifacts, logs and indexes, with explicit retention and deletion behavior.
| Responsibility | Viable first implementation | Expansion trigger |
|---|---|---|
| Human purpose and control | Conversation, explicit outcome and acceptance, priority, pause/cancel, decisions and observed delivery | Multiple stakeholders need negotiated portfolio allocation |
| Identity and authority | Stable principal, scoped delegation, policy at service boundaries, revocation, tenant isolation | Additional trust domains require federation |
| Shared meaning and state | Typed objects and links, owning services, revision checks, provenance, attributed assertions | Measured query or schema needs exceed the initial relational model |
| Perception and knowledge | Adapters turn observations into attributed records; retrieval carries source, time, uncertainty and contradiction | More modalities or measured retrieval deficits |
| Cognition and learning | Bounded compositor, replaceable models, explicit hypotheses/plans, outcome evaluation, versioned lessons | Demonstrated improvement on held-out tasks warrants more automation |
| Work and coordination | Tickets with one assignee, dependencies, bounded attempts, routines, events, deadlines and cancellation | Measured throughput/fairness needs exceed simple admission |
| Effects and reconciliation | Typed invocation, durable operation identity, target-aware idempotency, outcome query and evidence | New effect domains require new adapters/contracts |
| Runtime and economics | Supervisor, bounded concurrency, admission budgets, health, usage and restart backoff | Actual capacity pressure or availability requirement |
| Evolution and recovery | Isolated candidates, staged traffic, hot fallback, compatible state, backup/restore trial | Failure-domain requirements justify replicated infrastructure |
| Human/agent orientation | World State and UI projections over the same authorized records; visible source freshness | New consumers require new projections, not new authorities |
assigned-to, depends-on, supports, contradicts, governed-by, implements, supersedes. No fixed semantic fan-out, but every traversal has access, depth, time and result limits. Not every link creates a scheduling dependency; dependency cycles must be rejected or explicitly resolved.invoke(service, method, target, arguments, operation_id, expected_revision?, frame_ref?, attempt_generation?, deadline, budget_ref) with authenticated caller authority supplied by the transport/session. A request naming a principal does not authenticate it. Responses distinguish rejected, accepted/pending, succeeded, failed and unknown. Cancellation and status are discoverable service methods. This is illustrative notation, not a claim that those exact endpoints exist today.Keep the domain vocabulary rich and the protocol small. Do not flatten a policy into an ordinary note or an observation into a fact merely because they share a record form.
Start with a small number of deployments: NATS + JetStream; one transactional control/state service; a compositor; agent workers; governed effect adapters; a supervisor. Identity, policy, catalog, ticket scheduling, inbox and outbox can begin as modules behind the control service's contracts. Split processes for measured load, independent release or failure containment, not for every noun in the ontology. Untrusted execution belongs outside that process.
The control/state service owns transactional object revisions, links, ticket assignment, active attempt generation and operation records. PostgreSQL is my default backing store for these atomic changes and relational queries. Reuse existing storage only where it provides this contract; changing storage is a separate implementation decision with a migration plan. Blobs, source code and large artifacts remain in suitable stores behind references. “Everything is a service” means stable mediated access; it does not require replacing physical files with individual daemons.
Use Core NATS for bounded request/reply and disposable signals. Use JetStream for recoverable dispatch and committed change propagation. Accepted work must reach durable custody before the UI reports acceptance. SQL state plus outbox event are one transaction; an outbox publisher retries using the same event identity. A consumer deduplicates into its inbox and commits the resulting state before acknowledging. Broker duplicate suppression helps, but is not the permanent application operation ledger.
The control database is authoritative for the records it owns. JetStream is the delivery/replay substrate for retained events, not a second editable ticket authority. Search, embeddings, World State and dashboards are rebuildable projections with source revisions and freshness. Do not begin with a requirement to reconstruct every object solely by replaying all history.
A ticket has zero or one assigned agent, one acceptance contract and a durable result/recovery record. Assignment is updated atomically against an expected revision. Begin with one active attempt per ticket. Parallel work uses linked tickets with separate assignees; it does not make one ticket multiply owned.
Assignment survives worker replacement. An execution attempt has a generation and bounded custody; renewals and reassignment use authoritative state. Workers cannot create their own valid generations. A named-agent dispatch route does not itself authorize execution. Queue groups distribute messages; they do not establish business assignment.
At the effect boundary, the service admits an operation against current authority, ticket/attempt generation and target revision. A stale worker cannot start a new operation. An already admitted operation remains durable owned work and may finish after the initiating worker dies; reassignment does not erase it. The next worker reconciles it. Cancellation is cooperative for work already committed to an external system.
At first admission, bind the operation ID to tenant, authenticated caller, method, target and canonical argument digest. Reuse with a different binding is rejected. Retries and successors recover the ID from the durable workflow step; they do not replace it while the outcome is unresolved. Adapters declare the target idempotency scope and retention window. A successor uses a separately authorized status or reconciliation method referencing the existing operation; it does not resubmit the original effect with a different caller binding. The original initiating principal remains immutable, while the reconciler identity and any custody transfer are separately attributed. Reconciliation cannot widen the admitted effect scope.
An effect gateway must make admission and operation ownership durable and serialize competing attempts for the same operation. A one-time generation check followed by unconstrained direct external calls is insufficient. Where a target supports idempotency keys, reuse the operation ID. Where it supports status lookup, reconcile. Where neither exists, a crash after sending can leave UNKNOWN; stop automatic retries and expose the uncertainty. No database transaction or NATS acknowledgment can erase that boundary.
Different tickets may target the same object: its owning service serializes or rejects conflicting revisions. Tickets are a durable coordination abstraction, not a global lock for every linked object. Multi-service workflows use explicit steps and compensating actions where available; no universal distributed transaction is required.
A durable dispatch notification can be acknowledged once the state service has accepted execution custody and a reconciler can find abandoned work. Do not use an hours-long unacknowledged broker delivery as the only ticket lifecycle. A low-cost deterministic reconciler repairs expired attempts, unpublished outbox entries and stuck operations; it does not wake a model when no reasoning is needed.
The compositor receives principal, ticket, permitted sources and resource limits. It resolves access before traversal, retrieves relevant material, and assembles a versioned frame manifest with source revisions and compiler version. Required continuity includes purpose, acceptance, assignee, active attempt, applicable constraints, unresolved operations and return point. Missing required material produces an explicit incomplete frame. Optional material is ranked and bounded.
A frame is a bounded view, not a copy of the entire world or a bearer capability. There is no promise of a global atomic snapshot across external services: each source reports revision/time, and consequential writes recheck their preconditions. An initial deterministic compositor is easier to inspect; model summaries can later become attributed, cached derivative objects.
Perception produces observations. Reasoning produces hypotheses, plans and proposed actions. Evaluation compares expected and observed outcomes. Consolidation proposes corrections, lessons and skill changes with provenance. Do not silently promote a model's confident summary into canonical truth. Preserve conflicting observations and invalidation links; use appropriate uncertainty representations rather than a universal invented confidence number.
Memory retrieval, procedural skills and model inference remain replaceable services. Improved behavior is promoted after representative evaluation and bounded trials. Learned policy suggestions cannot grant authority. Budgets, stop conditions and an independent supervisor bound the loop; cognition may choose to wait or ask a human instead of generating more tasks.
Authenticate principals; bind scoped authority to service methods and resource targets. NATS subject permissions constrain transport; the service still enforces object-level policy and tenant scope. Enforce revocation at new operation admission, with explicit expiry/cache behavior. The policy service must not depend on an LLM to decide ordinary admissibility.
Changing policy, identity, resource ceilings, routing or release controls requires a distinct administrative capability and an attributable versioned change. Ordinary work cannot enlarge its own authority or disable its enforcing boundary. Emergency suspension blocks new effect admission independently of models. If a control service is unavailable, only explicitly defined safe operations remain available; cached authority has bounded expiry.
Edicts retain the original distinction between laws/standards, SOPs, guidelines and examples. Machine-enforceable requirements become versioned policies at the relevant boundary. Advisory guidance informs composition. Ambiguous prose does not become a deny rule by accident. Approval is a scoped decision object with identity, expiry and conditions when required, not a generic confirmation loop.
Human interfaces expose meaningful controls: change priorities, inspect reasons/evidence, pause, cancel future work, decide exceptions and receive a usable result. Pausing cognition, blocking new effect admission and undoing a completed external effect are distinct operations. A supervisor can stop new work even when a model or optional UI is unhealthy. Secret values stay in managed secret storage; ordinary frames contain references and only the minimum needed context.
Every execution is admitted against bounded concurrency and a resource allocation: model/token quota, money, CPU/GPU, memory, wall time and downstream capacity are distinct dimensions. Reserve an allowance before dispatch, account usage, cap retries and release unused capacity. Priority and fairness belong in the scheduler. Backpressure, timeout, retry delay, quarantine and load shedding must be specified; they cannot be delegated to “the agent will figure it out.”
Service identity and contract stay stable while implementation instances change. Start vNext isolated with zero ordinary traffic. Qualify with attributable live canaries. A governed router/controller allocates explicit traffic stages. Keep the old version hot and continuously checked through stabilization; stop promotion on stale/failed evidence and return traffic automatically when criteria breach. Ordinary NATS queue sharing is not that rollout controller.
Old and new versions share the authoritative operation ledger. Dispatch, reconciliation, timers and background jobs acquire custody through the same protocol. A rollout cannot grant both versions permission to send the same non-repeatable effect. Compatible continuation and operation formats are qualification requirements. If safe transfer is not established, the old instance retains the operation or it enters reconciliation; upgrades do not justify blind replay.
Stop assigning new work to an old instance, drain bounded in-flight requests, and resume long work from durable continuations. Preserve schema and message compatibility across old/new versions using expand/migrate/contract. Delay destructive cleanup until fallback is no longer required. Secret rotation, routing and policy updates are likewise versioned control-plane changes. The broker, database and host have their own maintenance procedures; avoiding a global application restart does not eliminate maintenance.
Start with one recoverable host if its outage budget permits: persistent volumes, supervised processes, real backups and a witnessed restore. This can survive worker crashes; it does not provide host availability. A multi-node NATS cluster and a highly available database are separate later decisions. Avoid a premature orchestration platform or bespoke storage engine solely to make the architecture sound complete.
Restoring older state begins with new effect admission disabled. Recovery establishes a new runtime epoch, excludes old workers, reconciles retained events and external outcomes, and restores or revalidates authority changes newer than the backup. Missing evidence blocks replay of affected effects. Dispatch resumes only after this recovery barrier is satisfied. The selected workload must define recovery-point and recovery-time objectives before qualification.
Use a small representative service change requested through chat, with acceptance that a human can verify. Include one relevant knowledge correction and one pause/resume so cognition and human control are tested alongside transport.
Measure completion quality, latency, total cost, recovery time, duplicate effects, stale-worker refusals and usability of the result. Set numerical SLOs from the chosen workload before implementation qualification. These are planned acceptance specimens, not reported test results.
Author: Ryan Smithright (ryan@smithright.com). Developed from his architecture work and World State vocabulary, with architecture development, visualization and implementation assistance from Astra / Codex. This revision includes a focused independent AI critique of the design; that is architectural review, not security certification or runtime verification.
The “all you need” formulation proposes a smaller coordinating model: governed service contracts compose the system and its evolution. In the architectural simplification tradition of Attention Is All You Need, the burden is a concrete construction and experiments that can challenge it.
The application contracts and safety criteria are proposed architecture. NATS transport guarantees do not establish external-effect idempotency, object authorization or AGI capability.
Draft 1.5 adds the reference-monitor foundation, a public-ontology governance proposal and versioned citation records. V4’s four relationship diagrams remain unchanged. Read preserved draft 1.4 ↗ · Read preserved public draft 1.3 ↗ · Download the complete V4 whiteboard ↓
Can you reconstruct the components, their authority boundaries, their failure behavior and the evidence still needed—from this page alone?
Critique the design against those contracts. Do not infer implementation from documentation.