# WEEK3

> Source: <https://dev.to/rathnams089/week3-47f5>
> Published: 2026-10-25 07:05:02+00:00

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

Agent Logger is a local, privacy-first logbook for AI coding agents, with a private Discord bot on top.

Coding agents are great at making changes and terrible at telling you what they did. Once I had several agent sessions going across different repos, I kept losing track of which agent touched what, on which branch, and whether it was finished. Agent Logger answers that without me having to dig through git diff:

agent-logger start ~/claude-token-counter --agent claude-code

agent-logger end

It records the session (agent, repo, branch, start/end time, status) in a local SQLite database, snapshots the repo with git so it knows which files were modified and which were newly created, and writes a short summary with a local open-weight model.

Then from my phone, in Discord:

/status shows the session that's running right now

/sessions lists recent sessions across all my repos

/changes shows the summary and file list for the latest session

Who gets to be lazier? Anyone running coding agents. You don't have to babysit the terminal or reread diffs to know what happened. You check Discord.

Demo

You can reproduce it end to end in about 5 seconds. The demo script creates a throwaway repo, runs a full session, and cleans up after itself:

bash scripts/demo.sh

==> 1. Start a tracked session

Started session: session_f650cf60

Agent: demo-agent

Branch: main

==> 3. End the session (records changed/new files, generates summary)

Ended session: session_f650cf60

Files changed: 2

New files: 1

==> 4. Show session status

  f650cf60 | demo-agent | repo | main | completed

Code

A local coding-agent session logger with a private Discord bot. Track coding sessions record file changes, and get AI-powered summaries — all running locally.

`/sessions`, `/status`, and `/changes` commands restricted to your user ID

```
# Clone/create the repository
git clone <your-repo> agent-logger
cd agent-logger
# Create a virtual environment (already set up)
source .venv/bin/activate

# Install the package in development mode
pip install -e .

# Or using the venv python directly:
/Users/rathnam.s/agent-logger/.venv/bin/python3 -m
```

…
cli.py provides the start, end, status, changes, track and serve commands

state.py stores sessions in SQLite

git_tracker.py detects changes with git snapshots and git diff --numstat

summarizer.py writes the summary with a local model, or a deterministic fallback

discord_bot.py provides the /sessions, /status and /changes slash commands

There are 92 pytest tests covering the state, git, summarizer, bot and CLI modules

How I Built It

Python 3.14, managed with uv

Ollama runs the open-weight summarization model locally. I used phi (AGENT_LOGGER_MODEL=ollama:phi), served at localhost:11434.

llama-cpp-python is an optional second backend that points at any local .gguf file

discord.py for the slash-command bot, aiosqlite/SQLite for storage, httpx to talk to Ollama

[TODO: name the agent harness you built it with. The README credits Hermes Agent; also mention Claude Code if you used it]

The summarizer is layered: Ollama, then llama-cpp, then a deterministic template. If no model is running, you still get a usable summary, so the tool never breaks because a model is down.

Privacy was a hard requirement:

Only file names and counts go to the model. Full diffs never leave the machine.

Discord only gets the summary and file paths, never code.

Every bot reply is ephemeral (only you can see it), and commands are restricted to an allowlist of Discord user IDs. If the list is empty, everyone is denied.

Why Does Open Innovation Matter?

This tool watches everything my agents do across all my repos. That is exactly the kind of data I don't want to stream to a third-party API.

With an open-weight model running locally through Ollama:

My code stays on my machine. Summaries are generated locally, and no prompt goes to an external service.

It works offline and costs nothing. There's no API key, no per-token billing and no rate limit, so I can log every session without thinking about cost.

It's swappable. phi today, any Ollama or GGUF model tomorrow, changed through one environment variable.

It's inspectable. I can see the exact prompt (file names only) and know nothing else is sent.

A closed API would have forced a choice between useful summaries and keeping my code private. Open models removed that trade-off.
