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

# Agents

> Data-driven LangGraph agents with a ReAct tool loop.

An agent is a versioned graph of nodes. The runtime compiles the graph to a
LangGraph and streams a tool-call trace as it executes.

## Graph shape

* **agent node** - a model (`provider/model`), a system prompt, and the tool ids
  it may call.
* **tool node** - executes the referenced tools and returns results to the agent.
* **router node** - optional branching.
* **edges** - connect nodes; `__end__` terminates the run.

A typical ReAct loop: `agent → tools → agent`, with `agent → __end__` when the
model has its answer.

## Versions

Each agent has numbered versions. Publishing a version points the agent at it.
`cruqai push` compiles an authoring file and publishes a new version.

## Running

```bash theme={null}
cruqai run <agent-id> "your question"
```

Runs and their tool-call traces are persisted and visible in **AI Monitoring**
and via `cruqai runs` / `cruqai trace`.
