An agent is a stored definition — name, system prompt, tool allowlist, optional model. Definitions are per-tenant and unique by name. A run executes one definition against a goal: POST /agents/:name/run mints a run id, allocates a workspace if the allowlist needs one, and spawns the loop on a background task. The response is an SSE stream of turn events.
The loop is dead simple: call the LLM with the running message history, dispatch any tool calls it requests, fold the results back into the history, repeat. It terminates on the finish tool, a text-only response, the turn cap, a token or USD budget cap, or external cancellation.
An agent is for…
- Tasks where the steps aren't known up front — "investigate this failure", "implement this feature", "research and write a memo".
- Long-horizon work that needs to iterate, backtrack, and self-correct.
- Anything that benefits from filesystem and git tooling alongside LLM reasoning.
- Workflows where the LLM should pick which tool to use next from a curated allowlist.
A DAG workflow is for…
- Tasks where the structure is known up front — extract, classify, route, transform.
- Parallelism with fan-out, merge, and conditional branches the operator wants to see in a diagram.
- Compliance contexts where every step's purpose is documented in the workflow definition itself.
- Generate-and-vet loops where the generator/critic pattern is the whole shape of the job.
Many real systems use both: a DAG workflow that calls an agent at one node, or an agent that delegates a structured sub-task to a workflow run. Grove ships both in the same binary; they share the broker, the persistence layer, and the auth layer.