Patterns¶
Recipes for things people keep asking the framework to do but that compose cleanly from existing primitives.
The split between Concepts and Patterns is intentional: Concepts explain what OpenArmature is (typed state, nodes, edges, middleware, checkpointing, observers). Patterns explain ways to use it: opinionated shapes for common downstream questions like "how do I run an agent loop?" or "how do I skip work that's already been done?".
When to read which¶
- You don't know what a
Stateis, or how nodes and edges fit together → start with Concepts. - You know the primitives but you're asking "how do I do X with them?" → look here.
Patterns are user-level recipes, not framework contracts. New patterns can be added without spec coordination; they're how-to docs composing existing primitives.
The catalog¶
- Parameterized entry point: start the graph at an arbitrary node via state-driven routing.
- Tool dispatch as node: model an agent tool-call loop as a graph cycle.
- Session as checkpoint resume: carry multi-turn agent state across turns using the existing checkpointer.
- Bypass if output exists: short-circuit a node whose external output already exists, via middleware.
- State migration on resume: let older in-flight checkpoints resume against an evolved state schema without each node body having to handle multiple shapes.
- Caller-supplied trace identifiers:
propagate tenant ID / request ID / feature flags into every
observability span via
invoke(metadata=...). - Custom observer: reconciling started → completed pairs: thread per-call state between paired events using a per- invocation dict keyed on the spec's uniqueness tuple.