Add support for AgentOps to the library
[AgentOps](https://docs.agentops.ai/v2/introduction) is an open source tool for agent debugging and observability. It would be great to integrate Agentic into AgentOps so that could use it as a debugging tool.
I note that AgentOps already integrates with `LiteLLM` which agentic uses under the hood. So the first step is probably just to use this integration and see how the results are.
Then you could work your way up to instrumenting Agent "prompt" requests and tool calls so you get a fuller picture.
Here is Agentops code that uses a LangChain "callback" to do tracing:
https://github.com/AgentOps-AI/agentops/blob/main/agentops/integration/callbacks/langchain/callback.py
Now Agentic doesn't really support callbacks at the moment. I think the easiest thing would just be to instrument at the point where the agent emits events to the log manager:
https://github.com/supercog-ai/agentic/blob/main/src/agentic/actor_agents.py#L1375
This code could call an "ObservabilityLogger" which would construct spans based on the event types and order (PrompStart->TurnEnd represents a whole turn. CompletionStart->CompletionEnd represents an LLM completion. ToolStart->ToolResult represents a tool call. And completions and tool calls are nested inside of Turns.)
0 条评论