eval
Debug and test your agent prompts and tools
Evaluation is opt-in. Ordinary co ai sessions keep bounded records for recent debugging but make no scoring calls. Use co ai --eval to enable completion scoring.
What it does
The eval plugin helps you debug agents during development:
Generate Expected (after_user_input)
Generates what should happen once for each user turn, unless another plugin already set it for that turn.
Evaluate (on_complete)
After agent finishes, evaluates if the task was truly completed.
Quick Start
Want to customize? Run co copy eval to get an editable copy.
Combined with re_act
Use re_act for intent and reflection, then let eval judge the completed turn independently:
One evaluation per turn
A continued session keeps its earlier messages and trace entries as conversation context. Evaluation evidence is narrower: it starts at the current turn's user_input entry and includes only that turn's tool results and final response.
The expected outcome and verdict are also refreshed for every new user input. A tool used in an earlier request therefore cannot create a false pass or failure in the next one.
How it works
1. Generate Expected
2. Evaluate Completion
Events Used
| Event | Handler | Purpose |
|---|---|---|
after_user_input | generate_expected | Set expected outcome |
on_complete | evaluate_completion | Evaluate if task complete |
Use Cases
- Development: Verify your agent completes tasks correctly
- Testing: Automated evaluation of agent responses
- Debugging: Identify incomplete or incorrect tool usage
Source
connectonion/useful_plugins/eval.py
ConnectOnion