Skip to content
language.blue
repo.blue ↗ Open Playground
Blue/Examples

Architecture patterns

Build applications from documents agents can operate.

Blue is a language, not a fixed product model. These patterns show what becomes possible when state, operations, authority, evidence, and process composition are represented as connected documents.

01 · Agent-operable applications

Give agents named operations instead of broad database access.

An agent reads a typed document, discovers the operations exposed to its role, and writes an Operation Request to a provider-backed Timeline. Direct actions use the agent’s own channel. Delegated actions carry Mandate authority while remaining attributed to the agent.

The practical question is narrow: can this exact agent perform this exact operation against this exact document under authority valid at this time?

Typical capabilities

Routine operationsSchedule, confirm, reserve, quote, reorder, or request evidence inside explicit limits.
Human gatesKeep final acceptance, exceptions, exclusivity, high-value funds, or termination principal-only.
Agent-created modulesPropose a cancellation, refund, or monitoring process for identity, validation, testing, and approval before attachment.
Explainable refusalShow whether an action was outside authority, mismatched the state, arrived from the wrong actor, or lacked complete history.

02 · Living agreements and Orders

A standing relationship can create many independent commercial occurrences.

An Agreement can preserve human-readable terms while selected clauses are operationalized by typed embedded processes. Each resulting Order can retain separate state, participants, evidence, payment process, and lifecycle.

AgreementParties, exact content, standing terms, operations, process modules, and rules for creating Orders.
OrderOne call-off, booking, delivery, project, redemption, or transaction under the relationship.
Process moduleAcceptance, activation, cancellation, renewal, stage gate, dispute, or another typed behavior.
Terms preserve meaning. Processes operationalize selected meaning. Text that cannot safely become deterministic logic remains in the document rather than disappearing.

03 · Conditional payment processes

Keep payment conditions connected to the documents that justify them.

A PayNote can represent one payment process: payer, payee, guarantor, amount resolution, capture conditions, refunds, and provider evidence. Blue does not pretend to be the bank ledger; financial truth enters through the provider that controls or observes the rail.

A payment request is not payment truth. The document may request authorization or capture, but a bank, processor, or guarantor supplies the authoritative outcome.

Examples

Multi-merchant confirmationCapture only after every required supplier confirms availability or fulfillment.
Milestone workAdvance a project stage after acceptance evidence and confirmed settlement.
Commission and split logicKeep who earns what connected to attributed orders and verified outcomes.
Refund and exception pathsCancellation, no-show, partial fulfillment, or dispute can produce explicit payment instructions.

04 · Provider-backed policies

Make institutional changes part of the documents that depend on them.

A policy process already active inside an Agreement can bind a public regulator Timeline. As the Agreement advances through complete history, policy changes take effect at their canonical positions before later governed actions.

Logical consistency, not synchronous rewriting: the regulator publishes once. Every Root that claims readiness beyond that position must include the change. Physical materialization can happen at different times.
Current versus planned: ordinary frontier advancement of an already-active embedded policy is part of the model. Historical import of a newly attached, already-running process is a planned next-iteration catch-up profile and is labelled as such.

What the document can preserve

Exact initial policyThe starting content and process definition have BlueIds.
Authoritative sourceThe regulator’s Timeline and actor are explicit channel bindings.
Verified frontierThe system distinguishes current, catching up, and blocked states.
Historical decision contextA decision can be explained against the policy state that governed it.