<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ai-Agents on David Lang</title>
    <link>https://www.davidlang.tech/tags/ai-agents/</link>
    <description>Recent content in Ai-Agents on David Lang</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sat, 28 Feb 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.davidlang.tech/tags/ai-agents/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Building Reliable AI Agents: Lessons from Production</title>
      <link>https://www.davidlang.tech/posts/building-reliable-ai-agents-lessons-from-production/</link>
      <pubDate>Sat, 28 Feb 2026 00:00:00 +0000</pubDate>
      <guid>https://www.davidlang.tech/posts/building-reliable-ai-agents-lessons-from-production/</guid>
      <description>&lt;p&gt;Production agents fail in boring ways: timeouts, tool errors, runaway loops, and silent wrong answers. Reliability engineering applies to agents too.&lt;/p&gt;&#xA;&lt;h2 id=&#34;hardening-checklist&#34;&gt;Hardening Checklist&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Max steps and token budgets per session&lt;/li&gt;&#xA;&lt;li&gt;Idempotent tools with clear error messages&lt;/li&gt;&#xA;&lt;li&gt;Checkpoint state for long workflows&lt;/li&gt;&#xA;&lt;li&gt;Circuit breakers when external APIs fail&lt;/li&gt;&#xA;&lt;li&gt;Structured logging of every tool call&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;graceful-degradation&#34;&gt;Graceful Degradation&lt;/h2&gt;&#xA;&lt;p&gt;When the agent fails, fall back to search-only RAG or human handoff-never an empty error.&lt;/p&gt;</description>
    </item>
    <item>
      <title>From RAG to Agentic AI: What&#39;s Next for LLM-Powered Apps</title>
      <link>https://www.davidlang.tech/posts/from-rag-to-agentic-ai-whats-next-for-llm-powered-apps/</link>
      <pubDate>Mon, 01 Dec 2025 00:00:00 +0000</pubDate>
      <guid>https://www.davidlang.tech/posts/from-rag-to-agentic-ai-whats-next-for-llm-powered-apps/</guid>
      <description>&lt;p&gt;The industry moved from chatbots → RAG → agents. Understanding the progression helps you invest in the right layer for your product maturity.&lt;/p&gt;&#xA;&lt;h2 id=&#34;rag-era&#34;&gt;RAG Era&lt;/h2&gt;&#xA;&lt;p&gt;Ground models in private data. Mature patterns: chunking, hybrid search, citations. Still the right default for Q&amp;amp;A and search.&lt;/p&gt;&#xA;&lt;h2 id=&#34;agent-era&#34;&gt;Agent Era&lt;/h2&gt;&#xA;&lt;p&gt;Models call tools, plan multi-step workflows, and maintain state. Higher capability, higher risk.&lt;/p&gt;&#xA;&lt;h2 id=&#34;whats-next&#34;&gt;What&amp;rsquo;s Next&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Evals-as-code&lt;/strong&gt; in every pipeline&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Smaller specialist models&lt;/strong&gt; routed by orchestrators&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;On-device&lt;/strong&gt; for privacy-sensitive steps&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Human-agent collaboration&lt;/strong&gt; UIs, not just chat&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;migration-path&#34;&gt;Migration Path&lt;/h2&gt;&#xA;&lt;p&gt;Master RAG and evals first. Add one well-scoped agent tool. Measure task completion before expanding autonomy.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Building Multi-Agent AI Systems</title>
      <link>https://www.davidlang.tech/posts/building-multi-agent-ai-systems/</link>
      <pubDate>Tue, 20 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.davidlang.tech/posts/building-multi-agent-ai-systems/</guid>
      <description>&lt;p&gt;Multi-agent systems divide work among specialized agents-a researcher, coder, critic-coordinated by a supervisor or message bus.&lt;/p&gt;&#xA;&lt;h2 id=&#34;patterns&#34;&gt;Patterns&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Supervisor&lt;/strong&gt; - One model delegates subtasks and aggregates results.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Peer-to-peer&lt;/strong&gt; - Agents message each other until consensus or max rounds.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Pipeline&lt;/strong&gt; - Fixed stages (plan → implement → test).&lt;/p&gt;&#xA;&lt;h2 id=&#34;implementation-tips&#34;&gt;Implementation Tips&lt;/h2&gt;&#xA;&lt;p&gt;Give each agent a narrow system prompt and tool set. Pass structured state (JSON) between agents, not raw chat logs.&lt;/p&gt;&#xA;&lt;h2 id=&#34;failure-modes&#34;&gt;Failure Modes&lt;/h2&gt;&#xA;&lt;p&gt;Infinite loops, duplicated work, conflicting edits. Enforce step limits, idempotent tools, and single-writer rules for shared files.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Building AI Agents with LangChain and OpenAI</title>
      <link>https://www.davidlang.tech/posts/building-ai-agents-with-langchain-and-openai/</link>
      <pubDate>Sun, 28 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://www.davidlang.tech/posts/building-ai-agents-with-langchain-and-openai/</guid>
      <description>&lt;p&gt;AI agents loop: observe, plan, act with tools, observe again. They handle multi-step tasks like research, booking, or code changes.&lt;/p&gt;&#xA;&lt;h2 id=&#34;tool-definition&#34;&gt;Tool Definition&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#719e07&#34;&gt;from&lt;/span&gt; langchain.tools &lt;span style=&#34;color:#719e07&#34;&gt;import&lt;/span&gt; tool&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#268bd2&#34;&gt;@tool&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#719e07&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#268bd2&#34;&gt;search_docs&lt;/span&gt;(query: &lt;span style=&#34;color:#b58900&#34;&gt;str&lt;/span&gt;) &lt;span style=&#34;color:#719e07&#34;&gt;-&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#b58900&#34;&gt;str&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#2aa198&#34;&gt;&amp;#39;&amp;#39;&amp;#39;Search internal documentation.&amp;#39;&amp;#39;&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#719e07&#34;&gt;return&lt;/span&gt; vector_store&lt;span style=&#34;color:#719e07&#34;&gt;.&lt;/span&gt;similarity_search(query, k&lt;span style=&#34;color:#719e07&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#2aa198&#34;&gt;5&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Bind tools to the model; the model returns tool calls you execute and feed back as observations.&lt;/p&gt;&#xA;&lt;h2 id=&#34;control-and-safety&#34;&gt;Control and Safety&lt;/h2&gt;&#xA;&lt;p&gt;Set max iterations. Require human approval for destructive tools. Log every step for audit.&lt;/p&gt;&#xA;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;&#xA;&lt;p&gt;Agents are powerful and unpredictable. Start with a fixed workflow (chain); graduate to agents when the task path genuinely varies per request.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
