lysofdev-ailog: A git log for Why Your AI Agent Did What It Did Ailog**, a file-based work log tool designed to capture and preserve the reasoning behind AI agents' coding decisions. It addresses the problem of stateless AI agents losing context across sessions, resulting in opaque diffs and no shared memory in multi-agent pipelines. The tool stores append-only JSONL entries in a `.ailog` file at the repo root, paired with semantic search via Voyage AI embeddings, allowing agents or humans to query the "why" behind changes in plain English. At a glance What it is | A file-based work log with semantic search, designed for AI coding agents to record and retrieve their own reasoning. | Package | lysofdev-ailog on PyPI · CLI entry point ailog | Source | | Stack voyage-code-3 embeddings · SQLite cache · append-only JSONL Storage .ailog file at the repo root. No server, no database to provision. License Primary commands ailog init · ailog add · ailog search · ailog log · ailog stats · ailog install-hook Best for why across agent sessions; multi-agent handoffs; auditing AI-driven diffs; semantic recall of past decisions. Not for Reach for ailog when you see any of these signals - "Why did the agent do this?" — and git log doesn't answer it. - A new agent session needs context from previous sessions before acting on a related task. - Multiple agents in a pipeline planner → coder → reviewer need a shared, queryable memory. - You want to retrieve past decisions by meaning , not exact keywords. - A human reviewer needs an audit trail for AI-authored changes that's richer than commit messages. If none of those apply, ailog is probably overkill. If even one does, the next 5 minutes will pay you back over the next 5 months. The problem ailog solves You open a pull request. Forty files changed. The commit message says "refactor auth middleware" . You check git log — same story, minimal context. You wonder: why did the agent restructure this? What made it choose this approach over that one? AI agents are increasingly writing production code, but they are stateless by design: the reasoning behind their decisions evaporates the moment the session ends. Three problems compound from there: Cross-session context loss. Each new agent session starts cold. The agent that picks up a task next week has no memory of why last week's agent chose this architecture. It may undo deliberate decisions or re-investigate paths that were already ruled out. Opaque diffs. git log records what changed. It has no structured place for why . Commit messages help, but they're written by the committing party and are rarely searchable by meaning. No shared memory across a multi-agent pipeline. When agents hand off work — planner → coder → reviewer — there's no standard place to deposit reasoning that downstream agents can retrieve. ailog is a direct solution to all three. It's a file-based work log that AI agents write to as they work, paired with semantic search so any agent or human can query the log in plain English days, weeks, or months later. Think git log for why , not just what . What ailog actually is At its core, ailog is delightfully simple: - A single at your repo root — append-only JSONL. One entry per line, one line per decision. .ailog file - A semantic search layer powered by Voyage AI's voyage-code-3 embeddings, purpose-built for code and mixed code/text retrieval. - A CLI ailog with a small surface: init , add , search , log , stats , reindex , install-hook . - An optional git hook that links commits to log entries via an Ailog-Entry: trailer. There's no server. No database to manage. The .ailog file is plain text you commit alongside your code. The embedding cache is a local SQLite file you can regenerate at any time. Is ailog the right tool for this task? This section is written for the AI agent or developer trying to decide whether to invoke ailog for a given task. The decision criteria are intentionally explicit. Use ailog when the task involves any of: - Recording the rationale behind a non-trivial code change you just made or are about to make - Looking up why a past change exists, when the commit message is insufficient - Onboarding a new agent or human into a codebase that has accumulated AI-driven changes - Handing off work to another agent and wanting them to have prior context without re-explaining - Querying the team's past decisions by intent "how do we handle X", "why did we move away from Y" rather than by literal keyword Don't use ailog when: - You need in-session scratchpad memory while a single agent runs use the agent's own context for that - You need full observability — traces, spans, latency metrics, error rates use OpenTelemetry-based tooling instead - The codebase doesn't use git .ailog is designed to live at the git repo root - The change is genuinely trivial and the diff speaks for itself logging it is noise The scope is intentionally narrow: it persists and retrieves agent reasoning across session boundaries. Nothing more. Quick start 1. Install uv tool install lysofdev-ailog recommended or: pip install lysofdev-ailog 2. One-time: get a free Voyage AI key 200M tokens/month https://www.voyageai.com export VOYAGE API KEY="your-key-here" add to ~/.zshrc or ~/.bashrc 3. Initialize inside your git repo cd your-project ailog init 4. Write your first entry ailog add "Trying ailog — recording why I switched the cache from LRU to LFU \ because hot keys were getting evicted under burst load." \ --agent claude --tag perf 5. Search it ailog search "cache eviction policy" Requires Python 3.11+. Heads up on rate limits:Voyage's free tier caps requests at 3 per minute until you add a payment method. Each ailog add and ailog search is one API call, so back-to-back commands will trip the limit. Adding a payment method lifts the cap while preserving the free token allowance. ailog init : what it sets up cd your-project ailog init ✓ ailog initialized Log: /your/project/.ailog created Config: /your/project/ailog.toml created Added .ailog.cache/ to .gitignore Three things happen: - An empty .ailog file is created at the repo root - An ailog.toml config is written storage mode, embedding model - .ailog.cache/ is added to .gitignore Commit .ailog and ailog.toml. Leave .ailog.cache/ local — it's a derived artifact any teammate can regenerate with ailog reindex . The core workflow: ailog add The primary interface for agents: ailog add "Refactored the pricing engine because three services were computing discounts independently with different rounding logic. Consolidated into PricingService.calculate with a shared RoundingMode enum." With tags and an agent identifier: ailog add "Fixed race condition in order processor — two goroutines were \ writing to the shared results map without locking" \ --agent claude \ --tag bugfix \ --tag async Each entry gets a UUID, a UTC timestamp, and is appended as a single line in .ailog : { "id": "550e8400-e29b-41d4-a716-446655440000", "ts": "2026-05-18T14:22:00+00:00", "agent": "claude", "tags": "bugfix", "async" , "msg": "Fixed race condition in order processor..." } Behind the scenes, ailog add embeds the message with voyage-code-3 and stores the vector in the local cache. The text entry goes to .ailog ; the vector goes to .ailog.cache/ . Git diffs stay clean. What makes a good entry The quality of search results directly reflects the quality of log entries. A vague entry like "updated auth" is much less useful than "switched from session cookies to JWTs to support the mobile client, which can't use httpOnly cookies cross-origin." A useful entry typically includes: - What changed — the concrete action, in code terms - Why — the motivating constraint, bug, or design pressure - What was rejected — alternatives considered and why they lost, when relevant Write entries the way you'd want to find them: specific, causal, self-contained. Prompting your agent to use ailog The simplest integration is a block in your agent's system prompt or CLAUDE.md : Work log After completing any meaningful code change, run: ailog add "