Aeion AI for Agentic Workflows

Tool-use orchestration with structured outputs (Zod schemas), an iteration cap to stop runaway loops, and completions logged through `ai_usage_logs` for aggregate usage tracking. This use-case page also covers what's NOT built yet — per-step cost/time caps and per-step provider routing — so you can plan around the real gaps instead of assuming they're covered.

What Agentic Workflows Actually Need

Production AI agents have four hard requirements that toy demos skip:

Agent Loop Pattern

The canonical agent pattern — LLM picks next action, action executes, result feeds back into LLM, repeat until done. Aeion's Agent class (@aeion/core AI layer) implements this loop with a tool registry and a hard iteration cap.

What The Agent Loop Does NOT Have Yet

Being direct about the gaps, since they change how you'd productionize this:

Iteration Caps — The One Hard Stop You Get

Agents without iteration caps WILL loop forever in some scenarios. maxIterations is the real, shipped control:

Illustrative Example — Ticket Triage Shaped Agent

A worked example of the pattern above, applied to a support-ticket triage task. This is a pattern illustration built on the real Agent/tool-registry API described earlier — not a shipped, named "triage skill."

FAQ

Use it if you want a working tool-call loop with an iteration cap out of the box. Build your own if you need parallel tool calls, multi-agent coordination, per-step cost/time caps, or per-step provider routing — those aren't in the built-in loop today.

Not a built-in pattern on the `Agent` loop today. You'd compose it yourself — one agent's tool handler can call into another `agent.run()`.

Tool handlers run as regular server-side code — put your normal role/permission checks inside the handler, the same as any other route or service call. There's no separate automatic role-gating layer specific to the agent tool registry.

Tool parameters are Zod schemas, so malformed args fail validation before the handler runs. Handle the failure in your own tool-call loop expectations; verify current behavior against the `Agent` class before assuming automatic retry-with-correction.

Pair your own persistence (a conversation/messages collection) with the agent call — the `Agent` class itself doesn't carry cross-run memory.

`agent.run()` returns the full `steps[]` array with every LLM response and tool call/result in order — inspect that directly. The underlying completions are also recorded in `ai_usage_logs` for aggregate usage tracking.

Agentic workflows with a real tool-call loop + iteration cap.

Aeion AI for Agentic Workflows — Tool Use, Loops, Budget Caps, Audit