客戶正與 AI 智能體對話,誰在監察這些智能體?
Your customers are chatting with AI agents. Who is watching the agent?
OpenLIT 以 OpenTelemetry 追蹤 AI 智能體每次執行,將訊息、工具呼叫及模型回應記錄在同一追蹤中,方便逐步重播。每條追蹤亦顯示每次回覆的 tokens、延遲及成本,並可用 LLM-as-a-judge 評估即時回答。OpenLIT 為開源軟件,原生支援 OpenTelemetry,可將追蹤和指標傳送至 OpenLIT UI 或既有的可觀測性後端。
Your customers are already chatting with AI agents. On WhatsApp, Messenger, and Instagram.
Meta Business Agent went global in June. Brands now use these agents to answer questions, book appointments, qualify leads, and sell, right inside the chat. On the other side, marketing agents draft campaigns, publish posts, research leads, and send email. All on their own.
But who is watching the agent?
A customer-facing agent is not a chatbot demo. It talks to real people, calls real tools, and spends real money on every reply.
That makes two failure modes very expensive:
- One confident hallucination. The agent quotes a wrong price, books a slot that doesn't exist, or promises a refund it can't issue. You find out from an angry customer.
- One retry loop. The agent calls the same tool again and again, and burns through tokens. You find out from your invoice.
If all you have is the final message in the chat, you can't tell which prompt, tool call, or model response went wrong.
See every conversation, step by step
OpenLIT traces every agent run with OpenTelemetry. Every message, every tool call, every model response shows up as a span in one trace, so you can replay exactly what the agent did for a given customer.
Know what every reply costs
Each trace carries tokens, latency, and cost for every single reply, per model and per request. A runaway loop or a sudden switch to a pricier model stands out right away instead of at the end of the month.
Catch bad answers before customers do
Score live answers with LLM-as-a-judge evaluations, so you see hallucinations and off-target answers on real traffic, not just in your test set. Add guardrails for prompt injection and off-topic chats, which matter a lot when anyone on WhatsApp can type anything into your agent.
Change prompts without a redeploy
Version prompts in Prompt Hub and roll back in a click when a change makes things worse. Keep API keys in Vault instead of scattering them across services.
One line to instrument your agent
OpenLIT is open source and OpenTelemetry native. One line of setup instruments your LLMs and agent frameworks:
import openlit
openlit.init()
Because it is plain OpenTelemetry, the traces and metrics can go to the OpenLIT UI or to the observability backend you already use.
- GitHub: https://github.com/openlit/openlit
- Docs: https://docs.openlit.io
Give your agents eyes
Building a WhatsApp, Messenger, or marketing agent? What would you trace first? Tell me in the comments.
來源:DEV Community · dev.to