This series follows our work on an AI agent runtime—the software that manages a language model’s tool calls, state, and retries—and Aiden, StackGen’s platform for running agents across teams. Many examples involve site reliability engineering (SRE): investigating incidents and keeping services available. The posts mix implementation details, experiments, and lessons from things that went wrong. Results from our setup may not transfer directly to yours; the useful part is often the test or tradeoff, not our choice.

Start with a pack

Pack For
Agent evals Testing pyramid, separate grader, supervised E2E loop
Go agent runtime Runtime definition, Go vs Python, platform split
SRE on-call Triage, RCA, observability
SRE as service Service Rendered Efficiently culture pack
AI agent guardrails with OPA Authorize tool calls, Terraform policy as code, time rules, HITL
Evidence-gated RCA checklist Operator review of agent write-ups
“Done” checklist When not to trust agent completion

Topic hubs

Dive by theme:

Your next reads

Read in order

Start at post 1 or choose a topic. At the end of each article, use Next in series to continue without returning to this page.

  1. Compare Go vs Python for AI agents: concurrency, deployment, typed tools, ML libraries, and prototyping. See why our runtime uses Go—and when Python wins.

    · go, ai-agents, architecture

  2. Why we chose TOML for flat, typed agent configuration after considering YAML, PKL and CUE, and when those alternatives may fit better.

    · config, toml, yaml

  3. Go platform architecture for a production AI agent codebase — patterns that keep rapid development sustainable without drowning in process.

    · go, architecture, ddd

  4. Six runtime bugs we found implementing ReAcTree: delegated approvals, graph wiring, timeouts, session isolation, recursion and memory.

    · ai-agents, reactree, production

  5. AI agent memory that forgets on purpose — Pensieve manages four memory types with decay and self-pruning so RAG stops stuffing stale context.

    · ai-agents, memory, rag

  6. Agent skill distillation without fine-tuning: teach reusable skills from production traces instead of GPU-trained distilled models.

    · ai-agents, learning, skills

  7. HITL approvals can make AI agents worse. How to find the human-in-the-loop balance so review gates protect production without stalling the agent.

    · hitl, ai-agents, ux

  8. Defense-in-depth for production AI agents: layered policy, HITL, and tool governance when the agent has root — prompts are not security.

    · security, ai-agents, hitl

  9. Observability for AI agents: session traces, tool attribution, token budgets, and audit trails — the signals traditional APM misses in production.

    · observability, ai-agents, langfuse

  10. Terraform for AI agent configuration — why we use infrastructure as code, not YAML dashboards, to govern production agents.

    · terraform, iac, gitops

  11. AI agent runtime vs platform: why we split the Go runtime from Aiden, a multi-tenant orchestration layer for enterprise GenAI agents.

    · aiden, platform, multi-tenant

  12. Contributing back while building a commercial product: how we shipped a proprietary platform and still merged PRs into the agent framework we depend on.

    · open-source, community, ai-agents

  13. Production agent tool calls need layered JSON repair — why one pass fails on malformed LLM output and what we learned in Go middleware.

    · ai-agents, production, go

  14. Evidence-gated RCA for AI SRE agents: prove with receipts, then narrate. Fixed stages, structural evals, and token-aware tool loops.

    · ai-agents, compound-ai, orchestration

  15. AI incident triage for SREs — what actually helps on-call versus demo theater. Canonical copy now on StackGen.

    · sre, incident-response, on-call

  16. Evidence-based verification for AI agents: don't trust self-report — pull proof from ArgoCD, Datadog, and systems of record, then let Go own pass/fail.

    · ai-agents, sre, verification

  17. LLM tokenomics for production agents: token budget strategies, context compression, and FinOps loops that keep sessions finishing.

    · llm, finops, ai-agents

  18. How to debug multi-step and multi-stage AI agent workflows and execution logs — green one stage at a time, score tool effects not transcripts.

    · ai-agents, workflows, evaluation

  19. Your RCA agent doesn't need another runbook — it needs a map. Topology, gates, and verify-first navigation beat a forty-page notebook.

    · ai-agents, sre, evaluation

  20. Beyond Confluence runbooks: why GitOps triage steps matter for AI agents — version-controlled procedures that change with your stack.

    · runbooks, gitops, confluence

  21. AI agent learning loop: daily digests become human-approved workflow and policy changes — not a bigger vector store.

    · ai-agents, learning, governance

  22. Questions for evaluating AI incident-response pilots: recorded evidence, staged checks, approval policies, and test results beyond a fluent demo.

    · ai-agents, production, sre

  23. A structured way to investigate service incidents: identify the affected system and onset, test competing explanations, and report uncertainty.

    · sre, incident-response, root-cause-analysis

  24. An AI agent scorecard can grade the wrong work; check trace identity, coverage, and evaluations before using its reliability or quality scores.

    · observability, ai-agents, telemetry

  25. Check an AI agent’s deliverable and tool outcomes before reporting a goal as complete; return unverified work explicitly when checking stops.

    · ai-agents, verification, llm-as-judge

  26. For AI-assisted incident analysis, record required checks, return missing fields together, and limit confidence to what the evidence supports.

    · ai-agents, root-cause-analysis, sre

  27. When an incident agent reaches an empty result, broaden searches using recorded identifiers instead of guessing rule IDs or measurements.

    · ai-agents, sre, root-cause-analysis

  28. An incident agent can collect a useful metric lead and omit it from the final report; check time windows, unrelated alerts, and transcript-to-summary consistency.

    · ai-agents, sre, root-cause-analysis

  29. AI agent loop detection can erase a good answer. Preserve the best evidence-backed result when a stalled run ends — don't throw the work away.

    · ai-agents, loop-detection, reliability

  30. Prompt caching for AI agents is an architecture problem: stable prefixes, early compaction, and references beat copying a turbulent payload.

    · ai-agents, prompt-caching, llm

  31. Interrupt, redirect, cancel, or contain an AI agent mid-run. Apply feedback at safe boundaries, preserve evidence, and keep tool policy in force.

    · ai-agents, hitl, human-in-the-loop

  32. PII redaction for AI agents needs two views: a protected model history and authorized operator visibility when debugging tool calls.

    · ai-agents, pii, privacy

  33. SRE for agentic systems: uptime isn't enough. Judgment SLOs and how to measure agentic drift when the agent can be 'up' and still wrong.

    · ai-agents, sre, observability

  34. An AI agent runtime owns the plan→tool→context loop in production. Not a GenAI platform, chatbot, or notebook. Bounds, traces, and mid-run steer live here.

    · ai-agents, runtime, golang

  35. What are SRE AI agents? AI for incident triage, diagnostics, and RCA with bounded autonomy — not a chatbot and not open-ended remediation demos.

    · ai-agents, sre, incident-response

  36. Aiden the hard way: turn a vague GitHub issue into a review PR — GitHub integration, agent, workflow, webhook, and status poll wired by hand.

    · ai-agents, github, workflows

  37. Aiden the easy way: one OpenTofu module from a vague GitHub issue to a review PR — Specify, Research, Plan, without wiring every resource by hand.

    · ai-agents, github, workflows

  38. Single-agent vs multi-agent for SRE triage: a fair A/B, what each shape wins at, and a decision framework so you stop defaulting to either.

    · ai-agents, multi-agent, orchestration

  39. Claim-aware evidence packing: don't accuse AI agents of inventing what you truncated. Why hallucination guards fail when they drop the receipts.

    · ai-agents, golang, runtime

  40. Reasoning effort is not a free upgrade for tool-heavy AI agents. Live SRE A/Bs: blanket high timed out, adaptive low→high dug deeper.

    · ai-agents, sre, reasoning

  41. AI SRE agent benchmarks: wall time, tool calls, tokens, and ReAcTree tax — fair A/B numbers so you know when orchestration is worth the cost.

    · ai-agents, sre, benchmarking

  42. Canary-first evals for live SRE investigate: check the canary before burning judge tokens, and never treat a draft RCA as done.

    · ai-agents, sre, evaluation

  43. From vibes to contracts: how we rebuilt agent evals around eval sets, rubrics vs criteria, a grader stack, and pass^k reliability.

    · ai-agents, evaluation, reliability

  44. Fair agent evals for planner vs single-agent: match domain tool access on workers before you compare tokens, pass rate, or declare a routing winner.

    · ai-agents, evaluation, benchmarking

  45. Agent orchestration tax after a fair eval: on AppWorld tasks, planner paths cost ~1.6× tokens and ~3× iterations — measure coordination cost separately from benchmark success.

    · ai-agents, evaluation, benchmarking

  46. AI agent eval failure modes on AppWorld: budget stops before evaluate, PII placeholders poison tool calls, 422 wrong methods, and prose PASS vs judge FAIL.

    · ai-agents, evaluation, reliability

  47. Stop duplicate agent workers: combined handoff and tool-registration fixes improved fairness to 5/5 and reduced measured planner tokens on one AppWorld slice — partial pass% rose while strict TGC remains a separate harness goal.

    · ai-agents, evaluation, multi-agent

  48. Run AppWorld locally with the Aiden agent runtime: docker-compose, MCP HTTP wiring, health gates, and lessons from replacing custom shims with the official three-server stack.

    · ai-agents, evaluation, benchmarking

  49. Unattended AI agent evaluation fails when the model asks the user or reports done with zero MCP calls. Put those rules in the harness, not the framework.

    · ai-agents, evaluation, benchmarking

  50. Single-agent MCP loaded 453 tools (~17k peak). A planner peaked lower, spent ~2× total tokens, and sometimes won quality. Report pass@1 and pass@3 — that is not pass^k.

    · ai-agents, evaluation, multi-agent

  51. Simple vs plan on AppWorld skills smoke: plan scores higher on some tasks, ties on another, and costs more in this three-task sample. Choose the mode that fits the job — both belong in the toolkit.

    · ai-agents, evaluation, multi-agent

  52. Context engineering A/B: observation masking (tool-result clearing) made an AI SRE agent ~43% cheaper—then failed equal-evidence RCA. Scorecard + knobs.

    · ai-agents, context-engineering, sre

  53. Weekly reflection: context engineering over language wars, plus public libraries and servers for write/select/compress/isolate with multi-language or MCP clients.

    · ai-agents, context-engineering, weekly-reflection

  54. When observability tool results spill to disk, agents should page with opaque cursors, not grep the preview and declare every pod Unavailable.

    · ai-agents, mcp, observability

  55. Plain English: ReAct is one reason→act→observe loop. ReAcTree is a tree of agent nodes with sequence, parallel, and fallback control flow — for SRE-style tool-heavy jobs.

    · ai-agents, reactree, react

  56. Same dual-part observability prompt across three model classes and single-agent ReAct vs hierarchical ReAcTree. Wall, tokens, cost, correctness, and an efficiency score you can steal.

    · ai-agents, benchmarking, evaluation

  57. Same alert+logs prompt, three model classes. How their Theories diverge: leak vs measurement artifact, and what that means for operators.

    · ai-agents, reasoning, sre

  58. From live combo benches: the short Grafana/Loki tool set that showed up in successful closes — and the dead ends that burned turns.

    · ai-agents, observability, grafana

  59. When a hierarchical ReAcTree planner earns its tax on alert+logs triage — and when a single-agent ReAct loop is the better default. Real ratios from a six-combo bench.

    · ai-agents, reactree, react

  60. Host-side gates for typed query failures, unchanged observations, and same-tool fan-out — why prompt-only retries fail on high-thinking models.

    · ai-agents, reactree, loop-detection

  61. Efficiency normalized to a cohort median can rise while every seat gets slower. Publish absolute wall, tokens, and correctness first.

    · ai-agents, benchmarking, evaluation

  62. Debug a multi-step AI agent with a reproducible prompt, complete trace, step-level evidence checks, and controlled replay. Fix host failures before prompts.

    · ai-agents, debugging, workflows

  63. Merits and demerits of reasoning vs normal chat models on a live Grafana triage job — elapsed time, tokens, Theory style, and when each earns the bill.

    · ai-agents, reasoning, openai

  64. Evaluate AI agent root cause analysis with a 13-point evidence scorecard. Catch unsupported claims, reward honest unknowns, then compare latency and cost.

    · ai-agents, evaluation, sre

  65. Buyer checklist for an AI agent runtime: loop, tools, gates, and an eval receipt — with numbers from a real multi-model triage bench.

    · ai-agents, runtime, evaluation

  66. Plan roots already route to planning; digs default to tool calling. Putting a high-thinking reasoning model on every task makes workers slow. Use a thinking model for the planner and a normal chat model for digs.

    · ai-agents, reasoning, orchestration

  67. Compare OpenAI Chat Completions vs Responses API for AI agents: tools, reasoning tokens, retries, and latency. Debug a slow run from its trace.

    · ai-agents, openai, reasoning

  68. We labeled a score 0-100 and watched a perfect, cheap, fast agent run print 125. Cap budget bonuses at 1.0 so efficiency never grades above how often you were Correct.

    · ai-agents, benchmarking, evaluation

  69. Random CI reruns mix model skill with incident difficulty. Freeze one checkout outage, swap only the bound model, and rank on Correct first, then wall time and new input tokens.

    · ai-agents, sre, benchmarking

  70. Separate the agent from its grader, check facts with code, and run the installed build in the trial environment.

    · ai-agents, evaluation, llm-as-judge

  71. Use fast tests for agent bounds, contract checks for facts, and a small number of live trials for whole jobs.

    · ai-agents, evaluation, testing

  72. Check verifiable facts with code and use a calibrated model judge for questions that require reading and interpretation.

    · ai-agents, evaluation, llm-as-judge

  73. Detect stalled agent loops from outcomes and evidence, not repeated tool names; test the stop rule with stubbed calls.

    · ai-agents, evaluation, testing

  74. Test the brief passed from a worker to its parent: settled facts, open gaps, size limits, and a clear stop condition.

    · ai-agents, evaluation, multi-agent

  75. Keep live agent trials deliberate, report missing tasks and failed attempts, and match trial IDs to traces before trusting a CI result.

    · ai-agents, evaluation, ci-cd

  76. A supervised E2E learning loop makes agent suites stronger over time. Automation drafts coverage and fixes; humans merge, deploy, and re-assert. A draft PR is not closure.

    · ai-agents, evaluation, testing

  77. A beginner-friendly guide on why your automated testing robot needs two separate jobs: finding missing tests and fixing broken ones.

    · ai-agents, evaluation, testing

  78. Close an E2E finding only after scope, human disposition, runnable asserts, real execution, and post-change verification. Track loop health, not PR volume.

    · ai-agents, evaluation, testing

  79. Most open E2E learning loops are bookkeeping failures: skip-as-success, top-N false absence, merge without deploy, and lost proposals. An operator checklist.

    · ai-agents, evaluation, testing

  80. How OPA and Rego came about, why policy engines beat prompt rules, how Pydantic AI and other frameworks wire allow/ask/deny yourself, and what Aiden ships pre-equipped.

    · ai-agents, opa, rego

  81. Open Policy Agent guardrails for AI agents: deny by default where it matters, enforce before tool execution, outside the model. Includes a gh secret set deny lab.

    · ai-agents, opa, rego

  82. Policy as code for AI agent guardrails: create Rego with sg_policy, attach with sg_agent_policy_attachment, review with plan and apply.

    · ai-agents, terraform, opentofu

  83. Business hours and freeze-window Rego for AI agent tool permissions using input.timestamp and OPA time builtins.

    · ai-agents, opa, rego

  84. Allow, deny, or ask: OPA HITL for destructive shell, secret writes, and data exfiltration. Test with opa test before you ship.

    · ai-agents, opa, hitl

More on this site

Unnumbered related posts appear above the archive footer. Standalone engineering notes are listed on the series index.

FAQ

Why build an enterprise AI agent platform in Go?

We chose Go for its types, deployment model, and concurrency support. The series explains that choice alongside its costs, including access to Python-first AI libraries; it is not a general recommendation to switch languages.

Where should I start reading?

Use a starter pack: agent evals (pyramid and supervised E2E), Go agent runtime (definition, why Go, platform split), or SRE on-call (triage, RCA, observability). Then open the searchable series archive and follow series_order. Each post is self-contained but builds on prior lessons.

Who is this series for?

Engineers interested in how agents run and fail in practice. The starter packs introduce the terms before the more detailed implementation posts.