Skip to main content
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

Runs and their tool-call traces are persisted and visible in AI Monitoring and via cruqai runs / cruqai trace. See Observability. An agent can also run without you: on a recurring schedule, or in response to an inbound channel message. A run does not have to finish in one pass either. It can pause for a person, wait until a later time, keep a plan across a long task, and check its own work before finishing: see Long-running agents.

Choosing the model

Each agent node names one model, and swapping it is a change to the graph rather than to any code. That makes the model a variable you can measure instead of guess at: Evals runs a fixed suite of test cases across several models and ranks them on score, latency, and cost.