Core Concepts
The mental model behind Syntropic137: events, workspaces, workflows, and observability.
You don't need to understand event sourcing to use Syntropic137. This page gives you the mental model, the "why" behind what you see in the dashboard and CLI.
Two Kinds of Events
Syntropic137 separates all data into two lanes, each optimized for its purpose:
| Domain Events | Observability Events | |
|---|---|---|
| Purpose | Source of truth for business logic and state transitions | High-throughput telemetry for dashboards and debugging |
| Storage | TimescaleDB (append-only, replay-safe) | TimescaleDB (hypertable, time-series optimized) |
| Pipeline | Command → Aggregate → Event → Projection | Agent stdout → API stream processor → AgentEventStore → TimescaleDB |
| Examples | WorkflowTemplateCreated, WorkflowCompleted, github.TriggerFired | tool_execution_started, tool_execution_completed, token_usage |
Domain events are the source of truth for what happened. The current state of any workflow or execution is derived by replaying its events: there's no mutable database row to corrupt.
Observability events are append-only telemetry. They power the dashboard metrics, cost tracking, and session timelines. They never affect business logic.
Workspaces
Every agent execution runs inside an isolated Docker container, a workspace. Workspaces use a two-phase security model:
- Setup Phase: Setup-phase secrets are briefly available to configure credential helpers, then cleared before the agent starts.
- Agent Phase: A claude phase runs with its Anthropic credential,
ANTHROPIC_API_KEYorCLAUDE_CODE_OAUTH_TOKEN, as its only runtime secret. Other non-secret variables such as session and endpoint configuration are also present. A codex phase gets no Anthropic credential: its environment holds only non-secret run variables (repository identity, phase deadline, attempt identifiers), and its credential is staged to~/.codex/auth.jsonat mode 0600 during provisioning and the staged copy is deleted, soCODEX_AUTH_JSONitself never reaches the agent. Two opt-ins widen this. A phase withallow_delegation: truegets both providers' credentials, a claude fallback agent gets the Claude credential for its own run, and a codex fallback agent on a claude phase has~/.codex/auth.jsonstaged for the whole phase. Git andghauthenticate with a GitHub installation token written by the setup phase. Network egress goes through an Envoy sidecar proxy.
The agent never sees the GitHub App private key or the setup-phase secrets. It does hold a short-lived GitHub installation token, scoped to the workspace's repositories, in ~/.git-credentials and gh's hosts.yml, renewed by the platform (#725 tracks removing it), and its own model credential.
Workflows
A workflow is a YAML definition of work to be done. It consists of one or more phases, where each phase is a task for an AI agent:
id: research-v1
name: Research Workflow
repos:
- https://github.com/acme/api-service
- https://github.com/acme/web-app
phases:
- id: discovery
name: Discovery
order: 1
prompt_file: phases/discovery.md
agent:
provider: claude
model: sonnet
- id: synthesis
name: Synthesis
order: 2
prompt_file: phases/synthesis.md
agent:
provider: codex
model: gpt-solPhases execute sequentially. Each phase can reference the output of previous phases using {{phase-id}} substitution. The $ARGUMENTS variable passes user input into the prompt.
The repos list tells Syntropic137 which repositories to pre-clone into the workspace before the agent starts. See Workspace Hydration.
Workflows can be packaged and distributed. See Workflow Packages.
Agent Harnesses
Syntropic137 is not tied to a single agent vendor. Each phase declares which harness runs it, in the phase's agent block:
provider: clauderuns the phase on Claude Code (claude -p). This is the default when noagentblock is present.provider: codexruns the phase on OpenAI Codex (codex exec).
Both harnesses use the same workspace image, the same isolation model, the same token accounting, and the same tool-call timeline. They differ in what they can enforce and what telemetry they emit. Claude phases produce hook events, subagent tracking, and todo data. Codex phases produce none of those.
See Choosing an Agent Harness for the full field reference and the caveats.
Executions
An execution is a running instance of a workflow. It progresses through a state machine:
You can cancel a running execution via the REST API or the CLI. The platform checks for a cancel every few lines of agent output and interrupts the agent. Injecting a message into a running agent is not supported: the API refuses it (HTTP 501) and queues nothing, so cancel and start again with a corrected task.
A failed or interrupted run can be resumed: that creates a new execution which inherits the phases that completed and restarts at the first one that did not. See Resuming Failed Executions.
Sessions
A session is an agent's working period within an execution. It captures:
- Conversation: the full message history
- Tool timeline: every tool call with input, output, and duration
- Token metrics: input/output tokens per model
- Cost: calculated from token usage and model pricing
Sessions are the primary unit of observability. When you debug a failed execution or analyze costs, you're looking at session data.
A run can hold more sessions than its phases: delegates an agent starts inside its workspace, and the native transcripts each harness records. Finding every session in a workflow run explains how to list all of them, with lineage, coverage and gaps.
Codex sessions are thinner than claude sessions. Tokens and the tool timeline are captured for both, but codex does not report its model on the wire, so the platform prices a codex phase from the model it asked codex to run: the phase's model, or the gpt-sol default (priced as gpt-6.1-sol). Vendor cost is always null for codex.
Artifacts
Artifacts are outputs produced by agents: code files, reports, design documents, test results. They're stored in MinIO (S3-compatible object storage) and linked to their source execution.
Triggers
A trigger connects a GitHub event to a workflow. When a matching event arrives (PR opened, push to main, issue labeled), the trigger automatically starts a workflow execution.
Triggers have built-in safety limits:
| Guard | Purpose |
|---|---|
max_attempts | Maximum fires per pull request for this trigger |
daily_limit | Maximum fires per day for this trigger |
cooldown_seconds | Minimum seconds between fires for the same pull request |
See GitHub Integration for setup details.
Getting Started
Install Syntropic137 and run your first AI agent workflow.
Concepts for Agents
Short, exact definitions of the words an agent or operator meets when running and reading executions - execution, phase, repair round, review verdict, skipped, resume, refusal vs failure, eval - with the API field each one maps to