You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This ensures each task starts with a clean slate and avoids conversation history contamination.
62
+
60
63
## Using the Tracing Callback
61
64
62
65
For multi-agent systems or when you need to collect conversations from many runs, use `MessageTracingAgentCallback`:
@@ -190,7 +193,7 @@ Messages use OpenAI's chat completion format:
190
193
}
191
194
```
192
195
193
-
## Custom agent adapters
196
+
## Custom Agent Adapters
194
197
195
198
If you're implementing a custom adapter, the framework handles message storage automatically via `get_messages()`. Just ensure your `_run_agent()` method returns a `MessageHistory`:
196
199
@@ -211,13 +214,13 @@ class MyAgentAdapter(AgentAdapter):
211
214
return history
212
215
```
213
216
214
-
See the [agent adapter guide](../reference/agent.md) for details on implementing custom adapters.
217
+
See the [AgentAdapter guide](../reference/agent.md) for details on implementing custom adapters.
215
218
216
219
## Tips
217
220
218
221
**For debugging**: Use `verbose=True` to see traces in real-time.
219
222
220
-
**For benchmarks**: Clear history between tasks with `agent_adapter.clear_message_history()`.
223
+
**For benchmarks**: Create a new adapter instance for each task to ensure clean conversation history.
221
224
222
225
**For multi-agent systems**: Use a shared tracer and `get_conversations_by_agent()` to analyze each agent separately.
0 commit comments