OBSERVABILITY
OPSGain visibility into your agent's thought process, debug failures, and monitor costs in production.
WHY_OBSERVABILITY_MATTERS#
Agents are "black boxes" by nature. Without tracing, you don't know if an agent failed because of a bad prompt, a tool error, or a hallucination. AKIOS provides built-in hooks to stream events to your favorite monitoring platforms.
USING_THE_LOGGER_INTERFACE#
The SDK exposes a Logger interface. You can attach multiple loggers to an agent to capture lifecycle events.
logger.ts
CUSTOM_TRACING_OPENTELEMETRY#
For production, you'll want to send traces to tools like Jaeger, Datadog, or LangSmith. Implement the `AgentLogger` interface.
1
Implement the Logger
otel-logger.ts
2
ATTACH_TO_AGENT
main.ts
VISUALIZING_THOUGHTS#
Tracing isn't just for debugging—it's for understanding. A "thought trace" reveals the agent's reasoning chain.
[Thought]
User wants weather. I should use 'get_weather' tool.
[Action]
get_weather({ city: "Tokyo" })
[Observation]
"Sunny, 25°C"
[Answer]
It is currently sunny and 25°C in Tokyo.