Monitor and debug your agents with built-in observability tools.
Logging
Structured logging with context
Tracing
Distributed tracing with OpenTelemetry
Sessions & Debugging
Debug sessions and inspect state
Quick Reference
Logging
ctx.logger.info('Processing request', { userId, action });
ctx.logger.error('Failed to process', { error: err.message });Tracing
await ctx.tracer.withSpan('fetch-data', async (span) => {
span.setAttribute('source', 'api');
return await fetchData();
});Sessions
// Access session ID for debugging
const sessionId = ctx.session.id;
ctx.logger.info('Session started', { sessionId });Access Patterns
| Context | Logger | Tracer |
|---|---|---|
| Agents | ctx.logger | ctx.tracer |
| Routes | c.var.logger | c.var.tracer |
All logs and traces are automatically correlated with session IDs for easy debugging in the Agentuity dashboard.