How it works
Fleet Log Analyst is an agentic assistant for autonomous mobile robot (AMR) fleets. A maintenance engineer asks a question in plain language; an agent investigates the shift's logs and the robot documentation, and answers with root causes, evidence and actions.
Agent graph (LangGraph)
START → prepare ─chat──→ agent ⇄ tools → END
└report→ triage → agent ⇄ tools → write_report → END
- triage: deterministic detectors (error bursts, abnormal battery drain, overheating, localization loss, recurring codes, cross-robot zone correlation, telemetry gaps). The LLM reasons over findings instead of raw telemetry.
- agent ⇄ tools: a ReAct loop with a capped tool budget. Tools: dataset overview, log search, events around a timestamp, telemetry statistics, error-code summary, knowledge-base search.
- write_report: structured output (Pydantic
IncidentReport), one incident per root cause, with causal chain, evidence, owner and actions. - Conversation state is checkpointed in Postgres, so follow-up questions keep context.
RAG
Markdown documentation (error codes, lidar maintenance, drive train, Wi-Fi, safety, battery) is chunked by heading and embedded into pgvector. Each vector records its embedding model, so switching provider never mixes dimensions. Documents can be added and re-indexed from the admin area.
Observability (Langfuse)
Every run is one Langfuse trace: graph nodes, LLM calls with token usage, tool calls and retrievals, grouped by conversation (session) and tagged with mode, dataset and model. An eval script replays reference questions and scores the answers.
MCP
The same tools are exposed as a Model Context Protocol server (amr-mcp), so Claude
Desktop, Claude Code or any MCP client can investigate the fleet logs directly.
Stack
Python 3.12 · LangGraph · Mistral AI (Ollama for local development) · Langfuse · Postgres + pgvector · FastAPI + HTMX with server-sent events · Docker Compose · Caddy.
The QL-200 robot, its documentation and the sample logs are fictional and generated for this demo.