> ## Documentation Index
> Fetch the complete documentation index at: https://agent-memory.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Actions

> Work items, dependencies, and the frontier

Actions are typed work items agents create, block, and complete. They form a dependency graph, so an agent can always ask what is actionable right now instead of re-deriving a plan.

Create with `memory_action_create` or `POST /agentmemory/actions`; update with `memory_action_update`. Statuses: `pending`, `active`, `done`, `blocked`, `cancelled`. An action with an unsatisfied `requires` edge starts `blocked`; setting a dependency to `done` flips its dependents back to `pending`.

## Edges

| Type             | Meaning                                            |
| ---------------- | -------------------------------------------------- |
| `requires`       | Source cannot start until target is done           |
| `unlocks`        | Completing source unblocks target                  |
| `spawned_by`     | Source was created while working on target         |
| `gated_by`       | Source waits on an external checkpoint or sentinel |
| `conflicts_with` | Source and target should not run at once           |

Edges are validated at create time (`actions/edges` adds them later); an unknown type or missing target is rejected.

## Frontier

`memory_frontier` (`GET /agentmemory/frontier`) returns every action with no unsatisfied `requires` edge, excluding done and cancelled, ranked by priority and urgency and annotated with lease conflicts. `memory_next` (`GET /agentmemory/next`) collapses that to the single highest-scoring action; active actions get a score bonus so in-flight work wins ties.

## Coordination around actions

| Primitive   | What it does                                                                                                                  | Invoke                                                             |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| Leases      | Exclusive claim on an action so two agents never work the same item. Default 10 minutes, max 1 hour                           | `memory_lease`, `leases/acquire\|release\|renew`                   |
| Routines    | Frozen multi-step workflows instantiated into actions with their dependencies                                                 | `memory_routine_run`, `routines/*`                                 |
| Signals     | Typed agent-to-agent messages (`info`, `request`, `response`, `alert`, `handoff`) with threading and TTL expiry               | `memory_signal_send`, `memory_signal_read`, `signals/*`            |
| Checkpoints | External gates (`ci`, `approval`, `deploy`, `external`, `timer`) that hold `gated_by` actions until resolved                  | `memory_checkpoint`, `checkpoints/*`                               |
| Sentinels   | Event-driven watchers (`webhook`, `timer`, `threshold`, `pattern`, `approval`) that auto-unblock gated actions when triggered | `memory_sentinel_create`, `memory_sentinel_trigger`, `sentinels/*` |
| Sketches    | Ephemeral action graphs for exploration that auto-expire after a TTL; promote to real actions or discard                      | `memory_sketch_create`, `memory_sketch_promote`, `sketches/*`      |
| Facets      | `dimension:value` tags on actions, memories, and observations, queryable with AND/OR logic                                    | `memory_facet_tag`, `memory_facet_query`, `facets/*`               |

`memory_diagnose` checks all of these subsystems for stuck, orphaned, or inconsistent state; `memory_heal` fixes what is fixable (stale leases, stuck actions, orphaned data).

Completed chains are compressed into [crystals](/docs/crystals-and-replay).
