Observability

AMOF provides comprehensive observability across AI agent sessions, workspace operations, and release lifecycle. Every significant action is recorded, costs are tracked, and audit trails are maintained.

Session Telemetry

Every agent session tracks detailed performance and cost metrics in .amof/sessions/<id>/telemetry.json.

MetricDescription
Input tokensTokens sent to the LLM (per call and cumulative)
Output tokensTokens received from the LLM
Cost (USD)Per-call and session-total cost
LatencyPer-call response time in milliseconds
Provider failuresConsecutive failure count per provider
Tool callsCount and type of each tool invocation
Modified filesSet of files changed during the session
Guardrail eventsuser_confirmed and user_rejected counters

Budget Monitoring

ThresholdAction
50%Warning to stderr
75%Warning to stderr
90%Critical warning to stderr
100%Session terminated

Event Logging

AMOF maintains append-only JSONL event logs for every agent session and run.

Event format
{
  "timestamp": "2026-03-03T14:30:00.000Z",
  "type": "tool_call",
  "content": {"tool": "Write", "path": "src/app.py", "result": "success"},
  "level": "info",
  "run_id": "abc123",
  "ecosystem": "aws-boilerplate"
}
TypeDescription
llm_requestRequest sent to LLM (model, tokens, prompt summary)
llm_responseResponse received (tokens, cost, latency)
tool_callTool invocation (name, parameters, result)
tool_errorTool execution failure
guardrail_blockGuardrail prevented an action
plan_createdPlanner produced an execution plan
subtask_startSubtask execution began
subtask_completeSubtask finished
budget_warningBudget threshold crossed
session_startAgent session started
session_endAgent session ended

Release Audit Trail

Every release action writes a structured record to releases/<tag>.json.

patch --alpha  -->  patch --alpha  -->  promote --beta  -->  promote --rc  -->  promote
(v1.0.0-alpha.1)   (v1.0.0-alpha.2)   (v1.0.0-beta.1)    (v1.0.0-rc.1)    (v1.0.0)

Each step writes an audit record, commits version file changes, creates a Git tag, and pushes.

Workspace Auditing

After significant work sessions, audit records are written to ecosystems/<name>/audit/ containing:

  • Summary -- What was accomplished
  • Goals -- What was intended
  • Decisions -- Design decisions and rationale
  • Files Changed -- List of modified files with descriptions
  • Commands Run -- Notable shell commands executed
  • Errors -- Errors encountered and how they were resolved

Diagnostics

amof check

Verifies prerequisites are installed: git, docker, helm, aws, kubectl, python, terraform.

amof troubleshoot

AreaWhat It Checks
EnvironmentAPI keys set, tools installed, .env loaded
Workspacestate.json valid, repos synced, branches correct
Agent errorsRecent session errors from events.jsonl
Configurationagent.yaml valid, manifest valid, guardrails loaded

Codebase Index Cost

TypeCostWhen
Full index$0.10 - $0.50First run or after major restructuring
Incremental index$0.01 - $0.10Normal development (only changed files)
No-op$0.00No changes since last index