Execution flow
When an agent run is triggered (via dashboard, API, or webhook):1
Queued
A message is sent to the execution queue (Azure Service Bus). The run status is set to Pending.
2
Processing
A worker picks up the message, loads the agent configuration, and sets status to Running.
3
LLM Loop
The agent enters a loop:
- Build the prompt (system message + conversation history + tool definitions)
- Call the LLM
- If the LLM returns a tool call → execute the tool, add the result to history, repeat
- If the LLM returns a final text response → exit the loop
- If max steps reached → exit with current output
4
Quality Check
If a QualityChecker system agent is configured, it evaluates the output and assigns a score.
5
Complete
Status is set to Completed (or Failed). Results are stored and published via SignalR for real-time updates.
Run metrics
Each run records:Step details
Each step within a run records:- Tool Name — which function was called
- Input Data — parameters passed to the tool
- Output Data — result returned by the tool
- Reasoning — the LLM’s chain-of-thought before the tool call
- Token Usage — per-step input/output tokens
- Duration — execution time in milliseconds
Hierarchical runs
Agents can invoke other agents using the InvokeAgent tool. This creates a parent-child relationship:- The parent run’s
ParentAgentRunIdlinks child runs - Child runs execute independently with their own step limits and credit tracking
- The parent agent receives the child’s final output as a tool result
Error handling
When an agent run fails:- The ErrorAnalyzer system agent (if enabled) examines the error and provides diagnosis
- The error message is stored on the run record
- Credits consumed up to the point of failure are still deducted
- LLM API timeout or rate limit
- Tool execution error
- Max steps exceeded without resolution
- Insufficient credits

