# 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 is 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](https://xiry.app/topics/ai.md)
- 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, 9 March 2026](https://x.com/LangChain/status/2031055593360990358): A concrete production playbook for an agentic sales automation system: architecture, constraints, memory, subagents, evals, adoption, and measurable results.

## Related

- [Local Deep Researcher](https://xiry.app/resources/local-deep-researcher-2395): Fully local web research and report writing assistant using Ollama or LMStudio (GitHub repo, Open source)
- [Hermes 3](https://xiry.app/resources/hermes-3): Open-weights fine-tune of Llama 3.1 built for agentic function calling. (AI model, Open source)
- [Odin AI](https://xiry.app/resources/odin-ai): Enterprise platform to build autonomous AI agents and automated business workflows. (Web app, Paid)
- [AIToolHub](https://xiry.app/resources/aitoolhub): Directory and consulting hub for AI tools, skills, and automations (Web app, Freemium)
- [AutoAgent Optimization Journey Chart](https://xiry.app/resources/autoagent-optimization-journey-chart): Step chart tracking benchmark gains across autonomous harness-tuning experiments (Framework, Free)
- [AutoGPT](https://xiry.app/resources/autogpt): Open-source platform and framework for building autonomous AI agents (GitHub repo, Freemium)

Updated 11 October 2026. Page: https://xiry.app/resources/how-langchain-built-their-internal-gtm-agent

Make your own library: Xiry takes your saved reels, tweets, Reddit bookmarks and Watch Later videos, makes them searchable and pulls the useful stuff out, like this library. It's invite-only for now; join the waitlist at https://xiry.app/#waitlist.
