# Research Brief: Building AI Agents for Client Deployment

**Slug:** `conv-building-ai-agents`
**Target audience:** Web developer (6+ yrs JS/TS/PHP, SvelteKit/React/Next), new to AI agents, knows LangChain name and basic RAG concept, hasn't deployed anything AI. Wants a standardised, sellable, modular, reusable, maintainable agent offering for clients.
**Date:** July 2026

---

## Core Concepts (ranked by importance, with analogies)

### 1. Agent vs Chatbot — The One While Loop

**What it is:** A chatbot does one LLM call → response, done. An agent runs an LLM inside a **while loop**: it calls the model, the model requests a tool, the agent executes the tool, feeds the result back in, and repeats until the task is complete.

**Analogy:** A chatbot is a vending machine — insert query, get answer. An agent is a personal assistant — you say "plan my Tokyo trip," they research flights, check your calendar, cross-reference hotel prices, and come back with options. They keep going until the job is done.

**Key pattern — the 5-stage loop:** Perceive → Reason → Plan → Act → Observe → (loop or return). Every major AI company (OpenAI, Anthropic, Google, Meta) converges on this same core architecture.

**Why it matters for clients:** Clients don't need a better Q&A bot. They need systems that *do things* — book appointments, check inventory, triage support tickets, generate reports. The agent loop is how you deliver action, not just conversation.

### 2. Tool-Use / Function Calling Is the Universal Connector

**What it is:** Tools are defined as functions with a name, description, and JSON Schema for parameters. The LLM decides *when* to call a tool and with *what arguments*. Your code executes it and returns the result.

**Analogy:** Think of function calling as API endpoints for your LLM. The model is smart enough to know "I need to check the weather" → calls `get_weather(lat, lon, date)` → reads result → decides next step. You control what the model can touch.

**Why it matters for clients:** This is how agents connect to *real systems* — CRMs, databases, email APIs, Shopify, WordPress. For a client deployment, your value proposition IS the integrations. The agent is just the brain; the tools are the hands.

### 3. Augmented LLM — The Foundation Layer

**What it is:** An LLM + tools + memory + retrieval all wired together. This is the primitive building block. Agents are augmented LLMs running in a loop.

**Analogy:** Think of the base LLM as a brilliant but locked-in-a-room expert. "Augmenting" it means giving them a phone (tools to call APIs), a filing cabinet (retrieval/RAG), and a notepad (memory/conversation history). Now they can actually help.

**Why it matters for clients:** This is your "minimum sellable unit." A well-tuned augmented LLM that can answer questions from a client's knowledge base and trigger a few actions beats a flashy multi-agent system every time.

### 4. Modular Architecture — Tools, Prompts, Models, Knowledge as Separate Layers

**What it is:** Instead of one monolithic agent, separate your system into: tool definitions (what actions the agent can take), system prompts (how the agent behaves), model selection (which LLM to use), and knowledge sources (RAG data, vector stores, APIs).

**Analogy:** A well-organised workshop vs a junk drawer. Tools hang on a pegboard (modular, labelled, swappable). Prompts are the instruction manual. The model is the craftsman. Knowledge sources are reference books. Each can be swapped without rebuilding the shop.

**Anthropic's recommended composition pattern:**
- Tools as discrete reusable modules
- Agent Skills as capability packages (standardised workflows, specialised integrations)
- Agents defined per-task, using only the tools/resources needed
- Configuration-driven — update central config to roll out changes across all agents

**Why it matters for clients:** You can't sell a custom one-off to every client — you'd burn out. Modular design means you build once, configure per client. Swap in a different knowledge base, change a few tool endpoints, adjust the system prompt, and you've delivered a bespoke-feeling agent from a standardised platform.

### 5. Agent Loop Costs 4–15x More Tokens Than Chat

**What it is:** Because agents loop (multiple LLM calls per request), token consumption is dramatically higher. A single-agent loop uses ~4x more tokens than a standard chat. Multi-agent systems can hit 15x.

**Cost breakdown for production agents:**
- **4 cost dimensions:** model tokens, retrieval infrastructure, compute, operational (monitoring/prompt iteration)
- **Real monthly costs:** $500–$3,000/month infrastructure for a moderate production agent (hundreds to low-thousands tasks/day)
- **Hidden cost:** 0.5–1 FTE equivalent for maintenance in first year
- **Actual total:** 2–5x higher than the raw API cost you estimate in planning

**Analogy:** Running an agent is like hiring an employee who bills per thought. Every time they pause to think, you pay. They think a lot — especially when they make mistakes and retry.

**Why it matters for clients:** You MUST educate clients on the ongoing cost. A $200/month agent might cost $800/month to run and maintain. Build cost predictability into your pricing model (usage tiers, caps, retainer models).

### 6. Observability Is Not Optional

**What it is:** Structured logging, distributed tracing, token accounting, prompt auditing — everything that lets you see *why* an agent made a decision, which tools it called, how many tokens it spent, where it failed.

**Analogy:** Debugging an agent without observability is like trying to fix a car with the hood welded shut. You can see it's not working, but you have no idea why. You need the hood up.

**Why it matters for clients:** When a client says "the agent gave a wrong answer," you need the receipts. What prompt was sent? What tool was called? What data was retrieved? Tools like Langfuse, Helix, and Braintrust provide this. Bake it in from day one — retrofitting is painful.

### 7. Framework or DIY? The Spectrum

**What it is:** Your options span from raw provider SDK (OpenAI SDK, 50 lines of code) through thin wrappers (Vercel AI SDK) to full orchestration frameworks (LangChain, LangGraph) to no-code/low-code (n8n, Copilot Studio).

**The community consensus (from HN, Reddit, Anthropic's own report):**
- **Start simple:** Many teams who jumped straight to LangGraph had to rip it out and rebuild from scratch a month later. Frameworks add abstraction layers that obscure prompts/responses and make debugging harder.
- **When to use frameworks:** Observable framework benefits (tracing, eval, durable execution, multi-agent primitives) only really pay off once your system has measurable complexity.
- **The winning pattern:** Use the Vercel AI SDK (TypeScript) or raw OpenAI/Anthropic SDK for the agent loop itself. Add LangChain/LangGraph ONLY when you need multi-step orchestration, complex RAG pipelines, or graph-based control flow.
- **According to Anthopic:** "The most successful implementations weren't using complex frameworks or specialized libraries. They were building with simple, composable patterns."

**Analogy:** Frameworks are like buying a fully-equipped professional kitchen. Great if you're running a restaurant. Overkill if you just need to boil pasta for dinner. Start with a pot and a stove (raw SDK), add tools as you need them.

**Why it matters for clients:** Your client doesn't care if you use LangChain or not. They care about reliability, cost, and delivery speed. Pick the approach that gets you to a working, observable system fastest. For a JS/TS developer building for clients, the Vercel AI SDK is a strong starting point — it's already in their framework comfort zone.

### 8. What Businesses Actually Care About (vs What Devs Focus On)

**From the research across communities:**

| Clients care about | Devs tend to focus on |
|---|---|
| Reliability (consistent outputs) | Which framework is coolest |
| Cost predictability (no surprise bills) | Agent architecture patterns |
| Integration with existing systems | Prompt engineering techniques |
| Support burden — what happens when it breaks | Multi-agent orchestration |
| Human-in-the-loop / guardrails | Context window optimization |
| Measurable ROI (saved hours, booked appointments) | Model comparison benchmarks |
| Data privacy & control | RAG pipeline tweaking |

**The hard truth from Reddit (r/AI_Agents, "AI Agents truth no one talks about"):**
> "Building the agent is only 30% of the battle. Deployment, maintenance, and keeping up with API changes will consume most of your time."

**And from HN:**
> "One client pays me $2k/month for an agent. Every successful deployment I've seen has humans making final calls."

---

## Common Beginner Questions (actual quotes from community sources)

These are real questions from r/AI_Agents, r/LLMDevs, Hacker News, and r/LangChain:

### 1. "How are you all deploying AI agent systems to production?"
> "I've found a huge amount of content online about building AI agents w/ langgraph, crewAI, etc, but very little about deploying to production. (everyone stops at the prototype...)"
> — r/AI_Agents, 2025

### 2. "Why isn't there a way to deploy AI agents as easily as web apps?"
> "I've been thinking about how much friction there still is in turning an AI project into something usable or shareable. You can push web apps with... but agents are still painful."
> — r/AI_Agents, 2026

### 3. "Building the agent is only 30% of the battle"
> "I built 30+ AI agents for real businesses — Here's the truth nobody talks about. Building the agent is only 30% of the battle. Deployment, maintenance, and keeping up with API changes will consume most of your time."
> — r/AI_Agents, "AI Agents truth no one talks about," 2025

### 4. "Has anyone got an example of an agent doing work in production that is saving the company money?"
> "Running multiple agents is expensive, decreasing RoI. My DeepSearch agent for stocks uses 6 agents, and each query costs about 2 USD."
> — HN, "Building Effective Agents" thread, June 2025

### 5. "We removed LangChain and LangGraph from our project because they are literally worthless"
> "We've removed LangChain and LangGraph from our project at work because they are literally worthless, just adding complexity and making you write MORE code than if you didn't use them because you have to deal with their whole boilerplate."
> — HN, June 2025 (on "Building Effective Agents")

### 6. "How important is LangChain in building Agents?"
> "I'm new to this space. I'm wondering, how important is Langchain for building agents? Do you guys use some other framework?"
> — r/AI_Agents, typical beginner question

### 7. "The ability to swap out APIs just isn't the bottleneck"
> "Having built several systems serving massive user bases with LLMs... The ability to swap out APIs just isn't the bottleneck. It is always the behavioral issues or capability differences between models."
> — HN, June 2025

### 8. "I just can't understand why people are choosing to build these huge complex systems in an untyped language"
> (referring to Python-based LangChain/LangGraph) "I just can't understand why people are choosing to build these huge complex systems in an untyped language when the only AI or ML is API calls... or very occasionally doing some lightweight embeddings."
> — HN, June 2025 (TypeScript developer frustration)

### 9. "What should I pick if I want to build agents in TypeScript?"
> "If you want to ship quickly and your agents are embedded in a Next.js app, start with the AI SDK — the ToolLoopAgent in AI SDK 6 covers most embedded-agent cases — then add orchestration when you hit real complexity."
> — Developers Digest, LangChain vs Vercel AI SDK, 2026

### 10. "How are you testing AI agents before shipping to production?"
> "We've been running reliability audits on AI agents before production deployment, and the failure patterns are consistent enough that I built a framework around them."
> — Ask HN, "How are you testing AI agents before shipping to production?" 2026

---

## Common Misconceptions or Pitfalls

### 1. "I need a framework to build agents"
**Reality:** A basic agent loop is <100 lines with a raw provider SDK. Frameworks (LangChain, etc.) are useful for complex orchestration BUT they obscure what's happening, make debugging harder, and tempt you into premature complexity. Anthropic's own advice: start with LLM APIs directly. The most successful deployments use simple, composable patterns.

### 2. "More agents = better results"
**Reality:** Multi-agent systems cost dramatically more (up to 15x tokens) and add coordination complexity. Start with a single well-designed agent. Only add more agents when you have data showing a single agent hits fundamental limits. Even Anthropic's guidance: "If a single agent can solve your problem, use a single agent."

### 3. "The model handles everything — I just need good prompts"
**Reality:** Prompt engineering is necessary but not sufficient. You need tool schemas that work reliably, error handling at every step, token budgets, stopping conditions, observability, fallback chains, and human-in-the-loop for edge cases. The model is the smartest part of the system; the infrastructure around it is what makes it production-ready.

### 4. "I can build it once and it will just work"
**Reality:** APIs change. Models get deprecated. Client data evolves. Agent behavior drifts over time as models update. The community consensus: maintenance is 70% of the ongoing effort. Build observability from day one, plan for iteration cycles, and charge ongoing retainer — not just a one-time build fee.

### 5. "Agent output is deterministic enough for client SLAs"
**Reality:** LLMs are non-deterministic by nature. Two identical prompts can produce different results. For client work you need: structured output (JSON mode), guardrails (input/output validation), fallback chains (if model A fails, use model B), eval suites to catch regressions, and explicit human review for high-stakes actions.

### 6. "RAG is the main event"
**Reality:** RAG (Retrieval-Augmented Generation) is one piece of the puzzle. It solves "how does the agent know my client's data." But clients also need: who can access the agent (auth), what can it do (tool permissions), where does data go (privacy), what happens when the API is down (resilience), how do I know it's working (dashboards). RAG is table stakes, not differentiation.

### 7. "I can copy the pattern across all clients"
**Reality:** A modular platform is smart, but every client has unique edge cases — different data formats, different compliance requirements, different integration surfaces. Plan for 70% platform, 30% customisation. Don't over-promise on "fully automated" — every deployment has a long tail of client-specific tweaks.

---

## Source URLs for Show Notes

### Core References

1. **Oracle Blog — "What Is the AI Agent Loop?"** (Casius Lee, March 2026)
   → https://blogs.oracle.com/developers/what-is-the-ai-agent-loop-the-core-architecture-behind-autonomous-ai-systems
   *Best for: agent loop mechanics, chatbot vs agent distinction, cost/token analysis, tool integration patterns*
   *See also companion notebook: https://github.com/oracle-devrel/oracle-ai-developer-hub/blob/main/notebooks/agent_loop_foundations.ipynb*

2. **Anthropic — "Building Effective AI Agents"** (Erik Schluntz & Barry Zhang, Dec 2024, updated 2025)
   → https://www.anthropic.com/engineering/building-effective-agents (blog post)
   → https://resources.anthropic.com/hubfs/Building%20Effective%20AI%20Agents-%20Architecture%20Patterns%20and%20Implementation%20Frameworks.pdf (full PDF)
   *Best for: "start simple" philosophy, augmented LLM, tool-first design, agent skills, observability, architecture patterns from single agent to multi-agent*
   *Essential reading — this is the most-cited resource in the community*

3. **Developers Digest — "LangChain vs Vercel AI SDK: Which TypeScript AI Framework Should You Use?"** (June 2026)
   → https://www.developersdigest.tech/blog/langchain-vs-vercel-ai-sdk
   *Best for: TypeScript-specific framework comparison, decision framework for JS/TS devs*

4. **Langfuse — "Comparing Open-Source AI Agent Frameworks"** (March 2025)
   → https://langfuse.com/blog/2025-03-19-ai-agent-comparison
   *Best for: framework landscape overview, "Do I need a framework at all?" discussion, Mastra, AI SDK, LangGraph*

5. **Solv Systems — "How Much Do AI Agents Cost in 2026?"**
   → https://solv-systems.com/resources/cost-of-ai-agents-2026
   *Best for: real cost numbers, TCO model, $500-$3k/mo real costs, 4 cost dimensions*

### Pricing & Business Model

6. **OpenClaw — "How to Charge for AI Agents"**
   → https://openclawlaunch.com/blog/how-to-charge-for-ai-agents
   *Pricing models: hourly ($75-350/hr), fixed project ($1.5k-$150k+), monthly subscription ($200-500/mo), usage-based, value-based*

7. **Pickaxe — "How to Monetize AI Agents in 2026"**
   → https://pickaxe.co/post/monetize-ai-agents-2026
   *Local business tiers: Starter $300-500/mo, Growth $500-1k/mo, Premium $1-1.5k/mo*

### Community Discussions

8. **HN — "Building Effective AI Agents"** (443 comments, June 2025)
   → https://news.ycombinator.com/item?id=44301809
   *Packed with real practitioner experience — framework blowback, cost concerns, DIY success stories*

9. **HN — "What years of production-grade concurrency teaches us about building AI agents"**
   → https://news.ycombinator.com/item?id=47067395
   *Elixir/BEAM discussion, durable execution, statefulness for agents*

10. **Reddit r/AI_Agents — "AI Agents truth no one talks about"**
    → https://www.reddit.com/r/AI_Agents/comments/1k3t3ga/ai_agents_truth_no_one_talks_about/
    *30+ agents built for real businesses — 70% of effort is post-build*

11. **Reddit r/AI_Agents — "Need advice on creating a production ready AI Agent for an enterprise client"**
    → https://www.reddit.com/r/AI_Agents/comments/1kv7nuu/need_advice_on_creating_a_production_ready_ai/

12. **Reddit r/AI_Agents — "How are you all deploying AI agent systems to production?"**
    → https://www.reddit.com/r/AI_Agents/comments/1hu29l6/how_are_youll_deploying_ai_agent_systems_to/

13. **Reddit r/AI_Agents — "Best stack for building Agents in prod?"**
    → https://www.reddit.com/r/AI_Agents/comments/1lodrvw/best_stack_for_building_agents_in_prod/

### Technical Reference

14. **Dev.to — "Building AI Agents from Scratch: Function Calling, Tool Use, Agentic Patterns"**
    → https://dev.to/pockit_tools/building-ai-agents-from-scratch-a-deep-dive-into-function-calling-tool-use-and-agentic-patterns-382g
    *JS/TS-focused implementation from scratch — good for developers who want to understand before adopting frameworks*

15. **IBM — "AI Agent Frameworks: Choosing the Right Foundation"**
    → https://www.ibm.com/think/insights/top-ai-agent-frameworks

16. **AWS — "AI Agent Frameworks & Building Blocks"**
    → https://aws.amazon.com/marketplace/build-learn/ai-agent-learning-series/agent-frameworks-building-blocks
    *"Tool-first design: Design your tool interfaces before building agent logic"*

### MCP (New Standard)

17. **a16z — "A Deep Dive Into MCP and the Future of AI Tooling"**
    → https://a16z.com/a-deep-dive-into-mcp-and-the-future-of-ai-tooling/
    *MCP is "USB-C for AI" — the emerging standard for tool integration*

---

## Episode Angle Notes

### The Core Through-Line for This Episode

The target listener is a seasoned web developer who's *curious but cautious* about AI agents. They've heard the hype, maybe played with ChatGPT API, know LangChain exists, but haven't shipped anything to a client.

**The framing:** "You already know how to build modular, maintainable systems for clients. AI agents are just another kind of module — they're the module that *decides which other modules to call*. Everything you know about clean architecture, separation of concerns, configuration-driven design, and maintainability transfers directly."

**The tension to play with:**
- Developer instinct: "I want to build the coolest multi-agent system"
- Client reality: "I want to book 40 more appointments this month"
- The gap is where the podcast conversation lives

### Suggested Conversation Flow

1. **Define the agent** — the one while loop, augmented LLM, what makes an agent vs a chatbot
2. **The modular mindset** — how to structure agents for reuse across clients (tools/prompts/models/knowledge as separate layers)
3. **Framework trap** — the community's experience with LangChain/LangGraph vs simple SDK approaches
4. **Cost reality** — what it actually costs to run agents, and how to price for clients
5. **Maintenance burden** — the 70% nobody talks about, why you need a retainer model
6. **What businesses actually buy** — reliability, integrations, support, not "agents"
7. **Getting started** — practical first step for a SvelteKit/Next developer

### Hot Topics to Land On

- Anthropic's "Building Effective Agents" — the single most important resource
- The Vercel AI SDK as the natural entry point for JS/TS devs
- MCP as the emerging standard for tool integration
- Agent costs = 4-15x chat costs (set expectations with clients)
- The two things every client agent needs: human-in-the-loop and observability

---

*End of research brief — compiled from 17 sources across Oracle, Anthropic, Developers Digest, Langfuse, Solv Systems, Hacker News, Reddit (r/AI_Agents, r/LLMDevs, r/LangChain), Dev.to, a16z, and pricing guides.*
