---
title: "state"
description: "Create representation of current world state"
canonical: "https://acs.synapti.ai/capabilities/state/"
last_updated: "2026-11-16T01:14:10Z"
---

# state

Create representation of current world state

Generated from [schemas/capability_ontology.yaml](https://github.com/synaptiai/agent-capability-standard/blob/main/schemas/capability_ontology.yaml), [skills/state/SKILL.md](https://github.com/synaptiai/agent-capability-standard/blob/main/skills/state/SKILL.md) at commit 18c38b74ac21. Ontology version 2.2.0.

Layer: [MODEL](https://acs.synapti.ai/layers/model/index.md)

## Safety

| Property | Value |
| --- | --- |
| Risk | Low |
| Changes state | No |
| Needs checkpoint | No |
| Needs approval | No |
| Overridable | No |
| Blocked from autonomy | No |

In a workflow, where the workflow has simulate, state must come before it (V102).

## Relationships

**Figure: Relationships of state: 4 relationships with 4 capabilities.** state has 4 relationships with 4 capabilities: 2 with edges into it and 2 with edges out of it.

| Capability | Row | Relationships |
| --- | --- | --- |
| [`observe`](https://acs.synapti.ai/capabilities/observe/index.md) | Edges into state | `enables` (into) |
| [`transition`](https://acs.synapti.ai/capabilities/transition/index.md) | Edges out of state | `enables` (out of) |
| [`simulate`](https://acs.synapti.ai/capabilities/simulate/index.md) | Edges out of state | `precedes` (out of) |
| [`integrate`](https://acs.synapti.ai/capabilities/integrate/index.md) | Edges into state | `enables` (into) |

- `enables`: Unlocks [`transition`](https://acs.synapti.ai/capabilities/transition/index.md)
- `enables`: Unlocked by [`observe`](https://acs.synapti.ai/capabilities/observe/index.md), [`integrate`](https://acs.synapti.ai/capabilities/integrate/index.md)
- `precedes`: Comes before, when both are present [`simulate`](https://acs.synapti.ai/capabilities/simulate/index.md)

## Contract

**Figure: Contract of state: 4 inputs (1 required), 7 outputs.** state takes 4 inputs, 1 required (filled pin) and 3 optional (hollow pin), and returns 7 outputs. The tables below list every field.

### Inputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `scope` | string | Yes | What to model |
| `schema` | object | No | State schema |
| `timestamp` | string | No | Format: date-time |
| `observations` | object\|array | No | The observation, or list of observations, to build the state from |

### Outputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `state` | object | Yes | World state representation |
| `entities` | array | No | Identified entities |
| `relationships` | array | No | Entity relationships |
| `evidence_anchors` | array of Anchor (or deprecated string or object) | Yes | What the output is based on, as evidence anchors (Standard v1.2 §6.5). An empty list grounds nothing, and the output is then marked inferred (§3.1). |
| `confidence` | number | Yes | The producer's probability that the output's claim is correct, self-reported unless the host documents a calibration (Standard v1.2 §4.1.1) From 0 to 1 |
| `inference_method` | string | No | How the output was reached when it is not grounded in evidence; with confidence it marks the output inferred (Standard v1.2 §3.1, §4.1.1). A producer should use model_knowledge, deduction, induction, abduction, analogy, statistical, simulation, assumption or an x- vendor value; a grounding policy (§5.20) requires one of them. |
| `uncertainty` | Uncertainty | No | The uncertainty of the output's principal value; its confidence equals the output's confidence (Standard v1.2 §4.1.1) |

The skill returns 6 fields: 5 are in state's output contract (3 required) and 1 is the skill's own, outside the contract; it leaves out 2 contract fields (inference_method, uncertainty).

| Field of the skill's output | In the output contract |
| --- | --- |
| `state` | Yes, required |
| `entities` | Yes, optional |
| `relationships` | Yes, optional |
| `confidence` | Yes, required |
| `evidence_anchors` | Yes, required |
| `assumptions` | No, the skill's own |
| `inference_method` | Yes, but the skill leaves it out |
| `uncertainty` | Yes, but the skill leaves it out |

## Used in workflows

**Figure: state in workflows.** 6 workflows use state, in 6 steps in all; its steps are the squares in an ink ring, and the key under the strips names the other squares.

- [`monitor_and_replan`](https://acs.synapti.ai/workflows/monitor-and-replan/index.md): step 2
- [`world_model_build`](https://acs.synapti.ai/workflows/world-model-build/index.md): step 6
- [`digital_twin_sync_loop`](https://acs.synapti.ai/workflows/digital-twin-sync-loop/index.md): step 7
- [`patient_monitoring`](https://acs.synapti.ai/workflows/patient-monitoring/index.md): step 4
- [`production_line_monitoring`](https://acs.synapti.ai/workflows/production-line-monitoring/index.md): step 3
- [`supply_chain_sync`](https://acs.synapti.ai/workflows/supply-chain-sync/index.md): step 4

## Claude Code skill

**Figure: What the state skill's tools can do, against the ontology.** The skill may use 2 tools: 2 only read; the ontology marks state as read-only, and every tool only reads.

| What they can do | Tools |
| --- | --- |
| Only read | `Read`, `Grep` |
| Run commands, which can change state | none |
| Change files | none |

**Figure: The field names each step of the state procedure uses.** 6 of the procedure's 6 steps use the name of an input or output field of the state skill as a word; 2 output fields of 6 are used by no step (evidence_anchors, assumptions).

| Step | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. Define scope boundaries | `scope` | `state` |
| 2. Identify entities | `scope` | `entities` |
| 3. Map relationships |  | `entities`, `relationships` |
| 4. Capture current values | `timestamp` | `state` |
| 5. Apply schema | `schema` | `state` |
| 6. Ground state claims | `observations` | `state`, `confidence` |

Both examples of the skill write out every one of its 6 output fields.

**Figure: The field names each verification check of the state skill uses.** 4 of the 5 checks use the name of an input or output field as a word; 3 output fields of 6 are named by no check (relationships, confidence and assumptions).

| Check | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. State includes world_id and timestamp | `timestamp` |  |
| 2. All entities have unique IDs and types |  | `entities` |
| 3. Relationships reference valid entity IDs |  |  |
| 4. Confidence scores present for entities |  | `entities` |
| 5. Evidence anchors support state assertions |  | `state`, `evidence_anchors` |

**Figure: The neighbours the skill lists for state, checked against the ontology and the catalogs.** The skill lists 6 capabilities as common neighbours of state; 4 of them have an edge with it in the ontology, and 4 run next to it, in that order, in a catalog workflow (compare most often, 4 times). Under each tile, an edge reads from its source to its target, with state's symbol in its place: "requires St" is a requires edge from the tile's capability to state, so the tile's capability must run before state; "St precedes" is a precedes edge from state to the tile's capability.

| Listed as | Capability | Ontology edge | Next to it in a workflow |
| --- | --- | --- | --- |
| commonly follows | [`observe`](https://acs.synapti.ai/capabilities/observe/index.md) | `enables` | 1 times |
| commonly follows | [`retrieve`](https://acs.synapti.ai/capabilities/retrieve/index.md) | none | never |
| commonly follows | [`integrate`](https://acs.synapti.ai/capabilities/integrate/index.md) | `enables` | 2 times |
| commonly precedes | [`transition`](https://acs.synapti.ai/capabilities/transition/index.md) | `enables` (into it) | 1 times |
| commonly precedes | [`compare`](https://acs.synapti.ai/capabilities/compare/index.md) | none | 4 times |
| commonly precedes | [`simulate`](https://acs.synapti.ai/capabilities/simulate/index.md) | `precedes` (into it) | never |

### Intent

Create a structured representation of the current state of a domain, system, or entity. This is the foundation for world modeling, enabling tracking of entities, relationships, and properties over time.

**Success criteria:**
- State captured in structured, queryable format
- Entities and relationships clearly identified
- Uncertainty and confidence explicitly represented
- Evidence anchors for all state assertions

**Compatible schemas:**
- `schemas/output_schema.yaml`
- `reference/world_state_schema.yaml`

### Inputs

| Parameter | Required | Type | Description |
|-----------|----------|------|-------------|
| `scope` | Yes | string | What domain/system to model (e.g., "user authentication", "payment processing") |
| `schema` | No | object | State schema defining expected structure |
| `timestamp` | No | string | Point in time for state (default: now) |
| `observations` | No | object\|array | The observation, or list of observations, to build the state from |

Inputs not listed here are outside the capability's contract: a workflow step that binds them gets W604 (STANDARD v1.1 §5.5).

### Procedure

1) **Define scope boundaries**: Clarify what is included in the state model
   - Identify system or domain boundaries
   - Determine entity types to include
   - Establish relationship types to capture

2) **Identify entities**: Enumerate entities within scope
   - Extract entity references from sources
   - Assign unique identifiers
   - Capture entity properties/attributes

3) **Map relationships**: Document connections between entities
   - Identify relationship types (contains, depends_on, references)
   - Note relationship directionality
   - Capture relationship properties

4) **Capture current values**: Record current state of each entity
   - Document property values with evidence
   - Note uncertainty where values are unclear
   - Record observation timestamp

5) **Apply schema**: Structure state according to schema if provided
   - Validate against schema constraints
   - Note schema violations or extensions needed
   - Ensure required fields are populated

6) **Ground state claims**: Attach evidence to all assertions
   - Reference source files, commands, or observations
   - Note confidence level for each assertion

### Output Contract

Return a structured object:

```yaml
state:
  world_id: string  # Unique identifier for this state snapshot
  scope: string  # Domain being modeled
  timestamp: string  # When state was captured
  entities: &entities
    - id: string  # Unique entity identifier
      type: string  # Entity classification
      properties: object  # Entity attributes
      confidence: number  # Confidence in entity state
  relationships: &relationships
    - from: string  # Source entity ID
      to: string  # Target entity ID
      type: string  # Relationship type
      properties: object  # Relationship attributes
  meta:
    version: string  # State schema version
    completeness: number  # 0-1 estimate of coverage
entities: *entities  # Same items as state.entities, for bindings like ${<step>.entities}
relationships: *relationships  # Same items as state.relationships
confidence: number  # probability that the state is accurate (§4.1.1)
evidence_anchors: [{ref: "file:line", kind: file}, {ref: "observation:id", kind: record}]
assumptions: []
```

#### Field Definitions

| Field | Type | Description |
|-------|------|-------------|
| `state.world_id` | string | Unique identifier for state snapshot |
| `state.scope` | string | Domain or system being modeled |
| `state.entities` | array | Identified entities with properties |
| `state.relationships` | array | Connections between entities |
| `state.meta.completeness` | number | Estimated model completeness |
| `entities` | array | Identified entities (the same items as `state.entities`) |
| `relationships` | array | Entity relationships (the same items as `state.relationships`) |
| `confidence` | number | Probability, 0.0-1.0, that the state is accurate (§4.1.1) |
| `evidence_anchors` | array of evidence anchors (§6.5) | References to the observations the state was built from |
| `assumptions` | array | Assumptions about the modeled system |

### Examples

#### Example 1: Model Authentication System State

**Input:**
```yaml
scope: "user authentication system"
```

**Output:**
```yaml
state:
  world_id: "auth-state-20240115-001"
  scope: "user authentication system"
  timestamp: "2024-01-15T10:30:00Z"
  entities: &entities
    - id: "auth-service"
      type: "service"
      properties:
        status: "running"
        version: "2.3.1"
        port: 8080
      confidence: 0.95
    - id: "user-db"
      type: "database"
      properties:
        type: "PostgreSQL"
        connection_pool: 20
        active_connections: 12
      confidence: 0.90
    - id: "session-cache"
      type: "cache"
      properties:
        type: "Redis"
        memory_used: "256MB"
        keys: 15420
      confidence: 0.90
  relationships: &relationships
    - from: "auth-service"
      to: "user-db"
      type: "depends_on"
      properties:
        connection_type: "direct"
        required: true
    - from: "auth-service"
      to: "session-cache"
      type: "depends_on"
      properties:
        connection_type: "direct"
        required: true
  meta:
    version: "1.0"
    completeness: 0.85
entities: *entities  # Same items as state.entities, for bindings like ${<step>.entities}
relationships: *relationships  # Same items as state.relationships
confidence: 0.88
evidence_anchors:
  - {ref: "file:config/services.yml:15-45", kind: file}
  - {ref: "command:docker ps", kind: tool}
  - {ref: "command:redis-cli info", kind: tool}
assumptions:
  - "Service discovery reflects actual running state"
  - "Configuration matches deployed state"
```

#### Example 2: Model Code Module State

**Input:**
```yaml
scope: "payment processing module"
schema:
  required_entities: ["class", "method", "dependency"]
```

**Output:**
```yaml
state:
  world_id: "payments-code-20240115"
  scope: "payment processing module"
  timestamp: "2024-01-15T11:00:00Z"
  entities: &entities
    - id: "PaymentProcessor"
      type: "class"
      properties:
        file: "src/services/payment_processor.rb"
        lines: 145
        methods: 8
        complexity: 24
      confidence: 0.95
    - id: "process_payment"
      type: "method"
      properties:
        class: "PaymentProcessor"
        visibility: "public"
        params: ["order", "payment_method"]
        complexity: 12
      confidence: 0.95
    - id: "stripe-gem"
      type: "dependency"
      properties:
        name: "stripe"
        version: "8.0.0"
        usage: ["PaymentProcessor"]
      confidence: 0.90
  relationships: &relationships
    - from: "PaymentProcessor"
      to: "stripe-gem"
      type: "depends_on"
      properties:
        import_type: "require"
    - from: "process_payment"
      to: "PaymentProcessor"
      type: "member_of"
      properties:
        visibility: "public"
  meta:
    version: "1.0"
    completeness: 0.75
entities: *entities  # Same items as state.entities, for bindings like ${<step>.entities}
relationships: *relationships  # Same items as state.relationships
confidence: 0.85
evidence_anchors:
  - {ref: "file:src/services/payment_processor.rb:1-145", kind: file}
  - {ref: "file:Gemfile:42", kind: file}
assumptions:
  - "Static analysis reflects runtime behavior"
  - "No dynamic method definitions"
```

### Verification

- [ ] State includes world_id and timestamp
- [ ] All entities have unique IDs and types
- [ ] Relationships reference valid entity IDs
- [ ] Confidence scores present for entities
- [ ] Evidence anchors support state assertions

**Verification tools:** Read (to verify file references)

### Safety Constraints

- `mutation`: false
- `requires_checkpoint`: false
- `requires_approval`: false
- `risk`: low

**Capability-specific rules:**
- Do not modify state while modeling it
- Note when state may be stale or dynamic
- Flag entities with low confidence
- Do not invent entities without evidence

### Composition Patterns

**Commonly follows:**
- `observe` - Observations feed into state modeling
- `retrieve` - Retrieved data informs state
- `integrate` - Merged data forms state

**Commonly precedes:**
- `transition` - State enables transition modeling
- `compare` - States can be compared (diff)
- `simulate` - State is starting point for simulation

**Anti-patterns:**
- Never use state for predictions (use `predict`)
- Avoid state for single-value measurement (use `measure`)

**Workflow references:**
- See `reference/workflow_catalog.yaml#world_model_build` for state in world modeling
- See `reference/workflow_catalog.yaml#digital_twin_sync_loop` for state in digital twins
