karloscodes

Debug production with AI agents

· 2 min read

AI-aided. I wrote the first version. AI helped me polish the writing.

Something breaks in production. You open the logs, scroll, search, find the error, switch to the code, trace it, fix it, deploy, and check. None of the steps is hard. The cost is the switching, browser to editor to terminal and back, with a trace id on the clipboard the whole way.

An AI coding agent already sits in the editor with your codebase loaded. The one step it can’t do is read the logs, because the logs live behind a login in a browser tab. So the loop stays yours, and the agent waits for you to paste a stack trace into it.

Give it the logs instead. Not raw files scattered across servers. An API that returns the error groups, how often each one fired, and the events that share a trace with each one. Then the loop runs in one place. The agent asks what broke in the last hour, gets the group with its stack trace, opens the file, and writes the fix. You read the diff, deploy, and watch the count stop climbing.

That’s why LogNorth has an agent API. Four read-only endpoints, apps, issues, events, and one event with its full context, behind a key with the prefix lgn-agent- that can’t write anything. You install a skill into Claude Code or Cursor with one command and ask in plain English. The agent makes the calls, LogNorth answers, and your data stays on your server.

The structure that makes logs useful to you is what makes them useful to the agent. Grouping, occurrence counts, the request that caused it. The agent gets the same grouping and the same context you see, through a key that can only read.

None of this needs an APM or distributed tracing. Your logs, an agent that has the codebase, and a deploy script. If you’re solo with a small codebase, this is where small pays. The agent can hold all of it.

Next time an error lands, don’t open the browser. Ask the agent what broke in the last hour, and see how far it gets before you have to touch anything. LogNorth.

New posts in your inbox. Unsubscribe anytime.

Or grab the RSS feed.