All
Articles 122,624Blog Posts 128,987Tech Tutorials 31,410Research Papers 24,300News 17,611
⚡ AI Lessons

Dev.to · Mukunda Rao Katta
🤖 AI Agents & Automation
⚡ AI Lesson
1mo ago
Different agent frameworks log 'input_tokens' differently. Here's the fix.
This is a submission for the Hermes Agent Challenge. I run agents on three different frameworks....

Dev.to · Mukunda Rao Katta
🤖 AI Agents & Automation
⚡ AI Lesson
1mo ago
400 from Anthropic API. Two consecutive user messages. Every time.
This is a submission for the Hermes Agent Challenge. I spent 20 minutes debugging a 400 error from...

Dev.to · Mukunda Rao Katta
🧠 Large Language Models
⚡ AI Lesson
1mo ago
My Hermes agent spent $3 before I noticed. Now it can't.
A zero-dep Python lib that tracks cumulative LLM API cost and raises before you go over budget — with per-label breakdown and warn-at callbacks.

Dev.to · Mukunda Rao Katta
🧠 Large Language Models
⚡ AI Lesson
1mo ago
My Hermes agent's stop condition was a 40-line if/elif chain. I replaced it with 3 lines.
A zero-dep Python lib with composable stop conditions for LLM agent loops — turn limits, cost caps, response patterns, and custom predicates that you can OR/AND

Dev.to · Mukunda Rao Katta
🧠 Large Language Models
⚡ AI Lesson
1mo ago
My agent kept hitting context limits. This one function fixed it.
A zero-dep Python lib that trims LLM conversation history to fit a token budget — and always keeps tool_use/tool_result pairs together.

Dev.to · Mukunda Rao Katta
🔐 Cybersecurity
⚡ AI Lesson
1mo ago
Your Hermes agent's audit log is leaking customer emails. Here's a 100-line lib that fixes that.
A zero-dep Python lib that scrubs PII and provider keys from agent logs before they hit S3, the error tracker, or Slack.

Dev.to · Mukunda Rao Katta
🤖 AI Agents & Automation
⚡ AI Lesson
1mo ago
My agent kept forgetting what it was doing. A scratchpad fixed it.
A zero-dep Python lib for agent working memory — keyed notes, lists, counters, prompt injection, and JSONL logging in under 200 lines.

Dev.to · Mukunda Rao Katta
🤖 AI Agents & Automation
⚡ AI Lesson
1mo ago
I replaced 200 lines of ad-hoc state management in my Hermes agent with one object.
A zero-dep Python lib with a lightweight key-value state store for agent loops — snapshots, diffs, turn history, numeric helpers, and JSON persistence.

Dev.to · Mukunda Rao Katta
🤖 AI Agents & Automation
⚡ AI Lesson
1mo ago
My Hermes agent called exec_shell. It shouldn't have been able to.
A zero-dep Python lib that enforces an allowlist of tool names in an LLM agent loop — raises immediately on blocked tools or filters them silently from the resp

Dev.to · Mukunda Rao Katta
🧠 Large Language Models
⚡ AI Lesson
1mo ago
My Hermes agent ran 500 turns and cost $40 before I noticed. Now it can't.
A zero-dep Python lib that puts a hard turn cap on your LLM agent loop — with configurable warning thresholds before the limit hits.

Dev.to · Mukunda Rao Katta
1mo ago
My Hermes agent loop blew the context window at turn 47. llm-context-trim fixed it.
A zero-dep Python lib that trims LLM message lists to a token budget — always keeps the system prompt and your last N turns, drops middle messages oldest-first.

Dev.to · Mukunda Rao Katta
1mo ago
My Hermes agent kept returning JSON in a markdown code block. I kept writing the same regex. Then I stopped.
A zero-dep Python lib that extracts JSON, bulleted lists, key-value pairs, and markdown sections from LLM response text — without writing ad-hoc regex every tim

Dev.to · Mukunda Rao Katta
1mo ago
Claude's extended thinking is useful. Sending raw <thinking> tags to users is not.
A zero-dep Python lib that strips thinking/scratchpad tags from LLM responses — raw text and Anthropic content blocks — so you can use the reasoning internally

Dev.to · Mukunda Rao Katta
🤖 AI Agents & Automation
⚡ AI Lesson
1mo ago
My agent started lying. It took me two days to realize the system prompt had changed.
A zero-dep Python lib that hash-pins a system prompt and detects drift — so you know immediately when a prompt changes instead of debugging ghost behavior for h

Dev.to · Mukunda Rao Katta
🤖 AI Agents & Automation
⚡ AI Lesson
1mo ago
I changed my Hermes agent's system prompt and used tool-call-diff to prove it actually helped
A zero-dep Python lib that diffs two agent JSONL runs. See exactly what your prompt change moved: tool order, cost, step count, args.

Dev.to · Mukunda Rao Katta
🧠 Large Language Models
⚡ AI Lesson
1mo ago
I couldn't reproduce the bug because I had no record of what tool calls my Hermes agent made.
A zero-dep Python lib that logs every LLM tool call and its result to a JSONL file — name, args, result, duration, error — for audit and replay.

Dev.to · Mukunda Rao Katta
🤖 AI Agents & Automation
⚡ AI Lesson
1mo ago
My Hermes agent ran for 2 hours, hit a timeout at turn 89, and I had to start over. Now it checkpoints.
A zero-dep Python lib that writes one JSONL record per agent turn so you can resume after a crash instead of starting from scratch.

Dev.to · Mukunda Rao Katta
🤖 AI Agents & Automation
⚡ AI Lesson
1mo ago
I had 3,000 agent trace events in JSONL. My manager wanted them in Excel. One line.
A zero-dep Python lib that exports JSONL agent traces to CSV — auto-detects common field names for cost, tokens, duration, and error across different agent fram

Dev.to · Mukunda Rao Katta
1mo ago
grep for your agent traces — substring, exact, and regex in one call
A zero-dep Python lib that filters JSONL agent trace events by field value — full-text search, exact match, substring, regex, error presence, and invert — all A

Dev.to · Mukunda Rao Katta
🤖 AI Agents & Automation
⚡ AI Lesson
1mo ago
After every Hermes agent run, I print a 10-line summary. Now I know exactly what happened.
A zero-dep Python lib that reads a JSONL agent trace and prints a compact summary — event count, errors, cost, tokens, duration, tools used, lanes.

Dev.to · Mukunda Rao Katta
🤖 AI Agents & Automation
⚡ AI Lesson
1mo ago
I shipped 50 agent infrastructure libraries. Here is what I learned.
A reflection on the boring-but-essential agent stack layer and why small single-purpose libraries ship faster and compose better than monoliths.

Dev.to · Mukunda Rao Katta
🧠 Large Language Models
⚡ AI Lesson
1mo ago
prompt-shield: a tiny, zero-dep prompt-injection detector you can drop in front of any agent
A pattern-based first line of defense for LLM apps. Five rules, zero runtime deps, deterministic, fast.

Dev.to · Mukunda Rao Katta
🤖 AI Agents & Automation
⚡ AI Lesson
1mo ago
A six-concern production harness for Nemotron agents on Crusoe Managed Inference
Wrap your Nemotron agent in one context manager, get one auditable RunReport that answers the six questions every production owner asks on day one.

Dev.to · Mukunda Rao Katta
🧠 Large Language Models
⚡ AI Lesson
1mo ago
agenttap: see exactly what your LLM SDK sent to the wire, with API keys scrubbed
An httpx transport plug-in that captures the exact JSON request body sent to Anthropic, OpenAI, or any httpx-based SDK. Credentials redacted by default.
DeepCamp AI