How We Built LangChain’s Paid Media Agent
LangChain's Paid Media Agent is a Slack-resident Deep Agent that merges ad-platform data with warehouse pipeline data, produces weekly per-platform PDF reports, answers follow-up questions, and proposes campaign changes for human approval. It runs in a sandboxed microVM. Context is split into layers: a short map-like system prompt, progressively disclosed skills, a company wiki, live tools and deterministic code. Moving calculations into Python and keeping the model for judgment cut a reporting run from 18 minutes and about $3 (3.9M tokens) to 85 seconds, roughly 40x cheaper. Other lessons: merge separate Slack and scheduled graphs into one runtime with per-entry-point capability profiles, and define a source of truth per metric instead of forcing one normalized schema.
Related posts
- How We Built Our Design Agent
LangChain mediumAdeptContent Studio, LangChain's Slack-based design agent, produces on-brand videos, graphics, slide decks and UI recreations entirely as code, running on Managed Deep Agents with a per-thread LangSmith Sandbox. Quality came from encoding designers' principles, anti-slop guardrails and the reasoning behind feedback rather than from prebuilt components. A 115-component design system was largely discarded once a stronger model arrived, because rules that compensate for model weaknesses expire. Motion runs on HyperFrames (web-page video editing with GSAP) and a custom canvas engine with motion blur, both rendering deterministically by timestamp so frames can be inspected and rendered in parallel. Median request cost fell from about $8 to 50 cents, and the harness is open-sourced.
- How we built LangChain’s GTM Agent
LangChain mediumAdeptLangChain's GTM agent, built on Deep Agents, triggers on new Salesforce leads, runs do-not-send checks, researches the prospect across Salesforce, Gong, LinkedIn and Exa, and posts a relationship-aware email draft with reasoning to Slack for rep approval. A weekly account-intelligence job uses per-account subagents with constrained tools and structured output schemas, run in parallel. Rep edits are diffed by an LLM into per-rep style memories stored in PostgreSQL, and evals combine rule-based assertions with an LLM judge in CI. The team reports a 250% lift in lead-to-opportunity conversion and about 40 hours saved per rep each month.
- How our GTM Agent builds consistent, high-quality sales artifacts
LangChain mediumAdeptLangChain's internal GTM Agent generates sales artifacts such as account plans, proof-of-value documents, proposal decks and onboarding plans, producing over 100 per week across 12 weeks. Most of its quality comes from business context rather than prompt tuning: sales-stage gates, leadership-owned templates, Salesforce and call data, and a brand kit baked into a sandbox image. The pipeline fills templates with python-pptx, renders them through LibreOffice to rasterized pages for visual self-review, then files native Google docs and hands them off in Slack. A stop rule (ship once one review finds no real defect) cut a one-pager run from 18 to 7 minutes, and deals with a sent artifact advanced 47% of the time versus 16% for matched deals.
- Building Long-Running Agents with ScaleDown and Deep Agents
LangChain mediumAdeptThe langchain-scaledown integration offloads context-management decisions in long-running agents (summarizing history, compressing tool results, extracting fields, classifying state) from frontier LLMs to ScaleDown's small, task-specific constrained decoding models, which ScaleDown reports are far faster and cheaper on these narrow tasks. It ships middleware for LangChain and Deep Agents. Summarization replaces history past a trigger fraction. Tool compression adds a compression_query argument that cut a docs page by about 90%. Extraction copies exact values from user messages into agent state. A custom Classify-based circuit breaker can stop looping or drifting runs. ScaleDown calls can also route through the LangSmith LLM Gateway for tracing and spend limits, while open-ended generation stays on a general-purpose model.
- How Stripe Built Kai on Deep Agents in 1 Week
LangChain mediumAdeptStripe's company-wide productivity agent Kai was built by one engineer in a week on LangChain's open-source Deep Agents harness. It uses a layered architecture: Deep Agents at the base, a Stripe-specific harness for security and infrastructure, a configuration layer for custom agents, and the UI on top. Key mechanics include an S3-backed virtual filesystem with sync-in/sync-out around sandbox calls, a sandbox exposed as a tool rather than as the agent's runtime, tunable summarization for long sessions, and skill-gated dynamic loading of 500+ MCP tools. Model quality degraded beyond about 150 skills, so the team is moving toward RAG or classifier prefiltering ahead of LLM skill selection, while adoption reached 83% weekly usage across the company.