How to Test and Debug AI Agents in Sparkforge Agent Studio
The Message Execution Timeline records every node, tool call, model metric, and latency badge for an AI agent run. The Chat Emulator simulates the conversation alongside the timeline so you can debug, jump to source nodes, and reset between tests.
Agent Studio's Message Execution Timeline and Chat Emulator give you full visibility into how an AI agent runs. The Timeline records every event, tool call, and decision with model metrics. The Chat Emulator simulates conversations and lets you jump from any log entry to the responsible node on the canvas.
Why test and debug here
- Execution transparency: follow every node transition and tool invocation in order.
- Step-level performance: spot slow prompts, API calls, or tool steps and optimize them.
- Model and cost awareness: review model, token usage, temperature, and other settings per message.
- Fast issue resolution: jump from a log entry straight to the responsible node on the canvas.
- Realistic environment: validate conversations in a UI that mirrors end-user chat.
Message Execution Timeline
The Timeline appears next to the Chat Emulator and updates live during a run.
- Event cards show node name, model, input/output tokens, and execution time.
- Latency badges (red = slow, green = fast) flag bottlenecks.
- Hover an event to see raw JSON inputs and outputs.
Transition node button
Each step displays a purple Transition label showing the node the conversation moved to during execution. Click the label to focus and highlight that node on the canvas so you can review or fix its logic without searching the flow manually.
Performance metrics panel
Beneath each message, the metrics footer shows:
- Model and version (for example, gpt-4-turbo)
- Input and output token counts
- Temperature, max tokens, top-p, frequency and presence penalties
- Total cost estimate (when billing is enabled)
Chat Emulator
The Chat Emulator is a simulated chat interface for safe testing. It mirrors deployment behavior with:
- Mobile-responsive chat window with avatar support
- Reset button to clear context between runs
- Side-by-side layout with the Timeline for live review
Test and debug an agent
- Go to AI Agents → Agent Studio and open the agent.
- Click the Test tab in the top-right.
- Click Start to launch the Chat Emulator. The Timeline opens automatically.
- Send a test message or trigger the agent via API. Each node transition, tool call, and model step logs in real time.
- Review event cards for node names, tool activity, token usage, latency, and any slow-step badges.
- Click into log entries to inspect model version, tokens, temperature, and cost estimates.
- Click a log card to highlight the corresponding node on the canvas. Adjust prompts, logic, or variables.
- Click Reset in the emulator to clear chat and logs, then retest.
- Once behavior is correct, move the agent to Staging or Production.
Frequently Asked Questions
Is the Timeline available for Voice AI agents?
Does the Timeline increase token usage or cost?
Can I export Timeline logs?
Why don't I see the Go to Node button?
Will resetting the Chat Emulator clear the Timeline?
Was this article helpful?
Thanks for the feedback.