Agents

Memory + Consequence Agents

An ordinary agent answers from the current request. A Neutron-powered agent can also retrieve authorized history, apply installed industry knowledge, compare bounded future scenarios, record the selected decision, observe what actually happened, and use reviewed lessons during the next similar task.

This creates continuity without replaying whole conversations or storing private reasoning.

What each capability contributes

CapabilityQuestion it answersExample
Scoped memoryWhat relevant facts, preferences, actions, and lessons are already known?A previous staged rollout failed when a database migration exceeded the lock budget.
Industry knowledgeWhich domain rules, terminology, workflows, and source anchors apply?A construction agent retrieves the installed jobsite operations pack.
Consequence planningWhat may happen under each bounded option?Compare pause, pilot, staged rollout, and immediate rollout scenarios.
Decision recordWhat was selected, by whom, using which evidence and constraints?Record the approved staged rollout and rejected alternatives.
ObservationWhat happened after the decision?The pilot completed with no errors but took 18 minutes longer than predicted.
ReflectionHow should a future decision change?Increase duration estimates and require a smaller first cohort for similar migrations.

Memory provides evidence. Consequence provides a reviewable decision lifecycle. Neither replaces current source data, deterministic tools, a specialist solver, or an accountable human.

The agent loop

flowchart LR
  A["Current task"] --> B["Recall scoped memory"]
  B --> C["Add installed industry knowledge"]
  C --> D["Build bounded consequence scenarios"]
  D --> E["Record a decision"]
  E --> F{"Approval required?"}
  F -->|Yes| G["Authorized human approval"]
  F -->|No| H["Approved decision"]
  G --> H
  H --> I["Application performs its authorized action"]
  I --> J["Record observed outcomes"]
  J --> K["Create reviewable reflection lesson"]
  K --> L["Use approved lesson in a future task"]

The default Neutron runtime does not execute an external action. It can return execution_ready only after the policy and approval gates pass; an application-owned, authorized, idempotent adapter remains responsible for execution.

Context that learns from history

Consequence planning can explicitly include five context sources:

The compact typed example below is followed by complete equivalent implementations for TypeScript/JavaScript, Python, PHP, Go, and Rust.

const run = await client.consequencePlan({
  scopeIds: [
    "industry:ai-engineering-delivery",
    "service:checkout-api",
    "history:checkout-releases",
    "policy:production-change"
  ],
  agentId: "agent:release-manager",
  task: "Compare safe rollout options for checkout API version 3.8.",
  domain: "engineering_ops",
  contextPolicy: {
    includeMemory: true,
    includeKnowledge: true,
    includeContextCapsules: true,
    includePastDecisions: true,
    includeReflections: true
  },
  policy: {
    depth: 10,
    allowExecution: false,
    storeSafeArtifactsOnly: true
  }
});

The run trace identifies the bounded memory, prior decision, context capsule, and reflection references used. Historical actions are evidence, not commands: a later run must still evaluate current constraints, source freshness, uncertainty, and changed conditions.

When to use memory only

Use scoped memory or agentContext without Consequence when the agent is:

  • recalling a preference, procedure, prior fact, or verified resolution
  • drafting a response grounded in an installed knowledge base
  • continuing routine work with no meaningful choice or downstream risk
  • retrieving a known runbook before a deterministic operation

When to add Consequence

Add a consequence run when the agent must compare alternatives, expose trade-offs, preserve a decision trail, learn from observed results, or stop at an approval boundary. Examples include:

  • staged versus immediate software rollout
  • repair, isolate, or replace an industrial asset
  • route a support escalation under contractual response targets
  • choose a reversible learner intervention
  • compare fulfillment or inventory responses to a supply disruption
  • evaluate an application-provided route, schedule, or allocation plan

Use an application-owned deterministic solver for domains where correctness depends on specialized calculations. Send its bounded candidate options and evidence into Neutron for validation, scoring, decision history, observation, and reflection.

Safety boundary

  • Never store or return hidden chain-of-thought, model scratchpads, private prompts, or unrestricted conversation transcripts.
  • Derive nucleusId, scopeIds, user ownership, and permissions from trusted server context.
  • Do not include secrets, raw credentials, unnecessary personal data, or unrestricted customer payloads.
  • Treat predictions as uncertain decision support, never guarantees.
  • Require recorded human approval for high-risk or irreversible decisions.
  • Require policy permission, recovery plans, and an authorized idempotent adapter before external execution.
  • Review sensitive-domain reflection lessons before writing them into reusable memory.
  • Tombstone deleted decisions and lessons so delayed work cannot resurrect them.

Continue