---
title: 'Control graph'
description: 'A directed representation of the steps an agent system may execute and the conditions that select what runs next.'
canonical_url: 'https://darkfactory.dev/glossary/control-graph'
markdown_url: 'https://darkfactory.dev/glossary/control-graph.md'
collection: glossary
date_published: '2026-08-04T00:00:00-04:00'
date_modified: '2026-08-26T00:00:00-04:00'
---

# Control graph


## Definition

A control graph is a directed representation of the steps an agent system may execute and the conditions that select what runs next. Nodes perform work. Edges encode fixed transitions, conditional routes, model-selected branches, retries, pauses, or external decisions.

Making the graph explicit lets designers see where discretion enters the system. A routing decision can be enforced by code, delegated to a model, triggered by a tool result, or held for human approval. Those choices have different reliability and security properties even when the diagram looks the same.

A control graph does not have to be acyclic. Production agents often revisit steps to repair output, gather missing information, or retry a transient failure. Cycles need budgets, termination conditions, and state rules.

## Distinguish it from nearby terms

A control graph defines permitted execution structure. An execution graph represents the work instantiated for a run. A trace records the events and route that actually occurred. A knowledge graph represents entities and relationships rather than control flow.

## Check your understanding

A diagram shows an edge from "review" to "deploy" but does not say whether a model, a test result, or a person chooses it. The graph is incomplete at the exact point where authority changes.

## Also called

agent control graph

## Related terms

- [Graph engineering](https://darkfactory.dev/glossary/graph-engineering)
- [Execution graph](https://darkfactory.dev/glossary/execution-graph)
- [Workflow](https://darkfactory.dev/glossary/workflow)
- [Orchestration](https://darkfactory.dev/glossary/orchestration)
- [State machine](https://darkfactory.dev/glossary/state-machine)
- [Directed acyclic graph (DAG)](https://darkfactory.dev/glossary/directed-acyclic-graph)
- [Agent loop](https://darkfactory.dev/glossary/agent-loop)

## Related factory areas

- [Orchestration, state, concurrency & recovery](https://darkfactory.dev/factory/orchestration-state)

## Evidence and further reading

- [LangChain: 3 Years of Graph Engineering with LangGraph](https://www.langchain.com/blog/3-years-of-graph-engineering-with-langgraph)
- [Turing Post: Is Graph Engineering Real?](https://www.turingpost.com/p/is-graph-engineering-real-why-everyone-is-talking-about-it)
