How to answer research questions across scattered enterprise data with an orchestrator, parallel sub-agents, swappable skills and cited answers (Deep Agents + LangSmith, Madrigal Pharmaceuticals)
Confirmed by source: Production enterprise platform documented in a guest post by Parth Patel (Global Head of AI and Data Science) and Ron Filippo (CIO), Madrigal Pharmaceuticals, on the LangChain blog (29 Apr 2026): normalised tool layer, orchestrator with skills, parallel sub-agents, shared filesystem, cited answers, failure-fed evals; stated results weeks-to-hours per new use case and weeks-not-months to production. Page checked live (HTTP 200) on 2026-11-28. Not run by BranoLabs. (checked 2026-11-28)
The problem
At a pharmaceutical company, the information needed for a research question sits in structured systems, documents, external sources and live APIs, each with its own format and access rules. Building a separate pipeline per question is slow, and answers are only usable if every claim is cited and users only see data they are allowed to see.
Tools needed
- Deep Agents harness (orchestrator, sub-agents, virtual filesystem, checkpointing)
- Data warehouse with every source normalised behind one consistent tool interface
- Role-based permissions on the data tools
- Markdown skills, one per research workflow
- LangSmith tracing, trace-level LLM-as-judge evals and datasets fed from production failures
- LangSmith Deployment with GitHub CI/CD redeploys
Step-by-step recipe
- Normalise each data source into the same warehouse and expose it to agents through one consistent tool interface, with role-based access enforced in the tools.
- Put an orchestrator on top that decides which capabilities and sub-agents a task needs, what runs in parallel and when to merge results; keep domain logic out of it.
- Package each research workflow as a skill (what to look for, how to reason, what good output looks like) and let the orchestrator load the right one; new use cases become new skills, not new systems.
- Split questions across parallel sub-agents, each working on one slice or dataset, and have them write findings and sources to the shared filesystem instead of passing them between agents.
- Require a citation for every statement in the final synthesis, drawn from the sources tracked in the shared filesystem.
- Trace every tool call and retrieved chunk, score whole runs with LLM-as-judge graders modelled on real user feedback forms, and add each meaningful production failure to the eval dataset automatically.
Copyable prompt
You are the research orchestrator for [COMPANY]. Question: [RESEARCH_QUESTION]. User role: [ROLE] (only use tools this role may access). 1. Pick the skill for this question type from [SKILL_LIST]; if none fits, say so. 2. Split the work into up to [N] parallel sub-tasks (e.g. by data source or by sub-question) and assign each to a sub-agent. 3. Each sub-agent writes its findings with source IDs to /workspace/[RUN_ID]/[SUBTASK].md. 4. Synthesise: answer, key evidence, conflicts between sources, gaps. Every sentence must cite a source ID. If evidence is weak or missing, say so instead of guessing.
Original template written by our AI agent for AgentRecipes, not copied from the source. Replace the [BRACKETS] and {{variables}} with your own values and test before relying on it.
What the builder reported
Madrigal says building each capability as a skill cut development of a new use case from weeks to hours, and LangSmith deployment took the platform from prototype to enterprise use in weeks rather than months, with production failures feeding the eval suite automatically. Source: Madrigal guest post on the LangChain blog.
These are the source author's own claims. AgentRecipes has not run this recipe itself.
Watch out for
- Access control must sit in the data tools, not in the prompt; a sub-agent should never be able to fetch data the user cannot see.
- Parallel sub-agents multiply token cost; cap fan-out per question.
- In regulated settings, keep domain experts reviewing skills and outputs; cited answers still need human judgement.
- Guest post by Madrigal's Head of AI and CIO on the LangChain blog (vendor-hosted); the time savings are described as weeks to hours, not measured per use case.
Source
Original write-up: LangChain blog (customer case study) (2026-04-29) ↗
Found via LangChain customer stories: “How Madrigal Built a Flexible and Scalable Multi-Agent Research and Intelligence Platform for Pharma with LangChain and LangSmith”. This recipe summarises the source in words written by our AI agent; read the original for the full details. Link last checked 2026-11-28.
More research & monitoring recipes
New agent recipes in your inbox
A short email with the newest automation recipes, each linked to its real-world source. No spam. Every email has a one-click unsubscribe link.