AI · Framework
How LangChain Built Their Internal GTM Agent
Architecture playbook for building production sales agents using Deep Agents and LangSmith.
An engineering case study detailing how LangChain built an internal go-to-market agent for outbound drafting and account intelligence. It outlines real production patterns including safety rails, human-in-the-loop Slack interfaces, memory refinement loops, and CI evaluation harnesses.
The framework
Results (Dec 2025 - Mar 2026): lead-to-qualified-opportunity conversion up 250% (3x pipeline dollars); rep follow-up rate up 97% for silver leads, 18% for gold; reps reclaimed 40 hours/month each (1,320 hours team-wide); 50% daily / 86% weekly active usage.
Constraints & non-negotiables: human-in-the-loop (nothing sent without explicit rep approval); contact history knowledge (never draft if a teammate already reached out). Core capabilities: relationship-aware personalization (customer vs warm vs cold), explainability (drafts come with reasoning + sources), learning loop from rep edits. Every rep action (send/edit/cancel) logged to LangSmith.
What it does: (1) researches leads and writes personalized email drafts; (2) aggregates account-level signals (web, developer ecosystem, product usage, marketing touchpoints).
Data sources: Salesforce (CRM), BigQuery (usage data/events), Gmail (email threads), LinkedIn (contact research), Apollo (contact enrichment), Exa (real-time web signals), Gong (conversation context), Slack as IN/OUT interface where reps work.
Inbound flow: new Salesforce lead -> do-not-send safety checks (open support ticket? teammate reached out this week?) -> research (Salesforce record, Gong transcripts, LinkedIn; Exa for web if thin history) -> load outbound 'skill' playbook differing for warm/cold -> Slack DM draft with send/edit/cancel buttons + reasoning. 48-hour SLA: silver-lead drafts send automatically if not approved.
Account intelligence: every Monday, pulls Salesforce + BigQuery + web (Exa, funding/launches/AI news). Sales report: expansion opportunities - package install/usage spikes, hiring AI engineers, executive moves, feature fit matching, most-engaged individuals. Engineering report: account health - BigQuery usage trends, credit exhaustion alerts, renewal dates, Gong call highlights, open questions/threads. Both delivered as Slack weekly digests.
Build: Deep Agents (docs.langchain.com/oss/python/deepagents/overview) for orchestration - virtual filesystem offloads large tool results, native planning tool enforces checklist (do-not-send checks -> research -> draft -> rationale -> follow-ups). Deep Agents four parts: planning tool, sub agents, file system, system prompt.
Memory loop: rep edits draft -> LLM structured extraction (what changed, what it implies, examples) -> WRITE to Postgres append-only log /memories/rep_{id}/email_style -> READ before future draft generation; weekly cron compacts memories per rep.
Subagents: compiled subagents with constrained tools + structured output schemas as contracts. Sales research subagent (Apollo, Exa, BigQuery) and deployed-engineer subagent (Salesforce, Gong, support tools). One subagent per account, parallel execution, LangSmith Deployment handles scaling/durable execution.
Evals: define success in LangSmith before coding; scenario library grounded in real rep situations; expanded to hard cases (deep AI researchers, re-engaging customers, heavy-jargon verticals); test harness mocks external APIs. Two levels: rule-based assertions (right tools, right order, no duplicate drafts) + LLM judge (tone, word count, formatting), all in CI. Rep Slack actions attached to traces; patterns that hold get codified into default behavior.
What it's for
- Design production agent architectures with subagents and sandboxed tool sets
- Implement human-in-the-loop email drafting workflows in Slack
- Build memory loops that learn individual tone and style from rep edits
- Set up continuous evaluation suites for LLM agents using simulated scenarios and API mocks
Key points
- Deep Agents orchestration using planning tools, filesystem offloading, and subagents
- Hard safety checks to avoid duplicate outreaches or contacting accounts with active tickets
- Automated Slack delivery with inline send, edit, and cancel buttons
- Postgres-backed memory extraction loop that updates prompt context based on rep edits
- Weekly intelligence reports tracking product usage spikes and account hiring signals
- Dual-layer evals in CI using rule-based assertions and LLM judges
Pricing
Free
Details
- Type
- Framework
- Category
- AI
- Topic
- Agent Architecture
- Open source
- No
- Platforms
- other
- For
- AI engineers, sales operations teams, and founders building autonomous enterprise agents
- Tags
- agents, langchain, gtm, langsmith, llm evals, architecture
Why it was saved
- @LangChain: A concrete production playbook for an agentic sales automation system: architecture, constraints, memory, subagents, evals, adoption, and measurable results.
Related
Fully local web research and report writing assistant using Ollama or LMStudio
Open-weights fine-tune of Llama 3.1 built for agentic function calling.
Enterprise platform to build autonomous AI agents and automated business workflows.
Directory and consulting hub for AI tools, skills, and automations
Step chart tracking benchmark gains across autonomous harness-tuning experiments
Open-source platform and framework for building autonomous AI agents
Updated