# `AshAi.ToolLoop`
[🔗](https://github.com/ash-project/ash_ai/blob/v0.6.1/lib/ash_ai/tool_loop.ex#L5)

Manages a ReqLLM conversation loop with tool calls.

This module is the primary orchestration API for tool-enabled conversations.

# `run`

Runs the tool loop synchronously.

# `stream`

Streams events from the tool loop.

Events:
- `{:content, text}`
- `{:tool_call, %{id: id, name: name, arguments: args}}`
- `{:tool_result, %{id: id, result: result}}`
- `{:iteration, %IterationEvent{}}`
- `{:error, reason}`
- `{:done, %Result{}}`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
