Workflows Overview
How agents use LocusGraph in practice.
The Core Agent Loop
Every LocusGraph-powered agent follows the same loop:
- Observe — perceive the environment, user input, or system state.
- Store — record observations, decisions, and actions as events in the wisdom graph.
- Retrieve — pull relevant context from the graph before acting.
- Act — execute with the benefit of accumulated knowledge.
- Learn — refine stored wisdom based on outcomes.
This loop runs every session. Over time, the agent builds a wisdom graph that compounds — each session starts smarter than the last.
How Sessions Work
Every session starts by retrieving relevant context. The agent queries the graph for recent events, known patterns, and past decisions related to the current task. This grounds the agent in what it already knows.
During the session, every meaningful action gets stored as an event. Commands run, files edited, errors encountered, decisions made — all become nodes in the graph.
At session end, the agent summarizes what happened and links key learnings to persistent contexts. Ephemeral details fade; durable wisdom persists.
Choosing a Workflow
Different agent architectures call for different workflows:
- Single agent — one agent, one graph, persistent wisdom across sessions. The simplest starting point.
- Multi-agent — multiple agents share a graph, each with scoped contexts. Agents collaborate through stored knowledge.
- Memory-augmented RAG — combine document retrieval with agent experience for richer context.
- Session and long-term — manage the lifecycle of ephemeral session data and persistent knowledge.
- Coding agent — specialized patterns for terminal commands, file edits, error tracking, and user intent.
Start with the single agent workflow. Add multi-agent coordination or RAG augmentation as your system grows.