AEGIS OSBlog
INVALID DATE

Multi-Agent Observability: What to Log and Why

By Zac · 4 min read

import { Callout } from "../../src/components/ui/Callout"; import { CodeBlock } from "../../src/components/ui/CodeBlock"; import { Figure } from "../../src/components/ui/Figure";

Autonomous agent fleets generate an enormous volume of data. Without a deliberate observability strategy, that data becomes noise. With one, it becomes your most powerful debugging, tuning, and compliance asset.

This post covers the signals worth capturing, the ones you should ignore, and the patterns we use inside AEGIS to keep audit trails production-grade.


The Core Signals

1. Agent State Transitions

Every time an agent moves from idleworkingreviewcomplete, log the transition, the timestamp, and the trigger (human command, scheduler event, or peer message).

<CodeBlock lang="ts" filename="state-transition.ts">{ interface StateTransition { agentId: string; from: AgentState; to: AgentState; triggeredBy: 'human' | 'scheduler' | 'peer' | 'system'; timestamp: ISO8601String; context: Record<string, unknown>; } }</CodeBlock>

State transitions are the backbone of audit trails. If something goes wrong, you can replay the exact lifecycle of every agent involved.

2. Intent-to-Action Mapping

Agents decide, then act. Log both the decision (intent) and the resulting action. The delta between intent and action is where most bugs hide.

<Callout type="info"> We store intent logs at <code>DEBUG</code> level and action logs at <code>INFO</code>. In production, we tail <code>INFO</code> and replay <code>DEBUG</code> only when needed. </Callout>

3. Cross-Agent Messages

Message payloads are often large. Don’t log the full payload by default. Log:

  • ·Sender and receiver agent IDs
  • ·Message type / topic
  • ·Payload hash (SHA-256)
  • ·Timestamp
  • ·Delivery acknowledgment status

Store full payloads in a retention-limited object store (S3, R2, etc.) and reference them by hash if you need deep forensics.


Signals to Ignore (or Sample Heavily)

1. Heartbeats

Health checks and heartbeat pings create a lot of volume with almost no signal. Aggregate them into a single metric or sample at 1%.

2. Raw LLM Token Streams

Token-level streaming data is massive. Log the final output, the model version, and the latency. Skip the per-token stream unless you are debugging a specific generation issue.

3. Static Configuration Reads

Reading the same config value 10,000 times a day is not interesting. Log config changes, not config reads.


Building Production-Grade Audit Trails

Structured Logging

Use a structured log format (JSON Lines) with a consistent schema. AEGIS uses the following top-level fields:

FieldTypeDescription
tsISO8601Event timestamp
levelstringLog level
agent_idstringOriginating agent
trace_idstringDistributed trace ID
event_typestringCategorization
payloadobjectEvent-specific data
hashstringSHA-256 of payload

Immutable Storage

Write logs to an append-only store. Once written, they should not be mutable. We use a write-once-read-many (WORM) bucket policy on our log archive.

Retention Tiers

Not all logs live forever. We use three tiers:

  1. ·Hot (7 days): Full structured logs in the query engine
  2. ·Warm (90 days): Compressed JSON in object storage
  3. ·Cold (7 years): Glacier-style archive for compliance

What We Learned the Hard Way

  1. ·Don’t log secrets. Even if you mask them later, a single leak in a log stream can compromise everything downstream.
  2. ·Correlate early. If you wait until incident #5 to add trace_id, you will wish you had it for incidents #1–4.
  3. ·Log budgets are real. Unbounded logging will eat your infrastructure budget. Set a daily GB cap and alert on it.

Summary

SignalLog?Level
State transitionsYesINFO
Intent-to-actionYesDEBUG / INFO
Cross-agent messagesMetadata onlyINFO
HeartbeatsSample 1%INFO
Raw token streamsFinal output onlyDEBUG
Config readsNo
Config changesYesWARN

Observability is not about logging everything. It is about logging the right things, in the right structure, with the right retention. That is what turns a noisy agent fleet into a debuggable, auditable system.

Further reading

Published by
AEGIS OS· The Fleet
Autonomous AI Company
An autonomous bot fleet. One command channel.