Ai4
AI-assisted summary of What It Takes to Build an Agent Platform for Customers with Docusign and PCMag / Fast Company — original source. Check the original for full context.
Source published:
Detailed notes
## Background Published on YouTube by Ai4 on August 23, 2026, this session features Tabrez Mohammed, VP of AI at Docusign, in conversation with tech journalist Rob Pegoraro from PCMag and Fast Company. The discussion covers the architectural tradeoffs, security safeguards, and platform design patterns necessary to build a production-grade, external-facing AI agent platform for enterprise customers.
## TL;DR Tabrez Mohammed details how Docusign developed its customer-facing Intelligent Agreement Management (IAM) agent platform in just four to six months by combining off-the-shelf components with proprietary agreement workflows. To handle sensitive contracts affordably and reliably, Docusign developed privacy-preserving fine-tuning pipelines that achieve frontier-level performance at 1/20th the cost, orchestrating tasks via LangGraph and optimizing prompts using DSPy. The platform mitigates legal hallucinations and security threats through multi-layered extraction pipelines, granular token-level cost telemetry, user-scoped OAuth permissions, and mandatory human-in-the-loop controls for irreversible contract executions.
## Atmosphere & style The session balances sharp technical pragmatism with a conversational, lighthearted vibe, featuring playful banter around legal tech hallucinations, Black Hat security risks, and engineer sleep deprivation. Pegoraro serves as an engaging, mildly skeptical host referencing industry critiques and real-world vulnerabilities, while Mohammed delivers authoritative, grounded insights focused on telemetry, unit economics, and sensible enterprise architecture over generative AI hype.
## Key takeaways - [00:04](https://www.youtube.com/watch?v=sOGtknSLLpU&t=4s) Docusign transitioned from standard e-signatures to AI-driven agreement intelligence to help enterprises extract actionable insights and track obligations across vast repositories of signed contracts. - [02:01](https://www.youtube.com/watch?v=sOGtknSLLpU&t=121s) AI powers both pre-commit contract risk analysis against thousands of company agreements and post-commit lifecycle tracking, such as proactive obligation audits and 30/90-day renewal tracking. - [04:25](https://www.youtube.com/watch?v=sOGtknSLLpU&t=265s) Customer privacy is preserved through an automated multi-layer de-identification pipeline validated by stratified sampling, ensuring zero direct employee inspection of customer contracts. - [04:25](https://www.youtube.com/watch?v=sOGtknSLLpU&t=265s) In-house fine-tuned legal models achieve or exceed frontier model performance on agreement-specific tasks at 1/20th or less of hyperscaler API costs. - [06:21](https://www.youtube.com/watch?v=sOGtknSLLpU&t=381s) Docusign delivered an enterprise agent platform in 4 to 6 months by assembling existing open-source components first and selectively engineering custom replacements only when measurement revealed bottlenecks. - [08:21](https://www.youtube.com/watch?v=sOGtknSLLpU&t=501s) The platform relies on external graph-based orchestration (LangGraph) rather than LLM-internal orchestration to ensure deterministic behavior, strict execution boundaries, and modular component design. - [08:21](https://www.youtube.com/watch?v=sOGtknSLLpU&t=501s) Dynamic model routing assigns frontier reasoning models to multi-step legal analysis while directing discrete tool calls and extraction tasks to smaller, cost-optimized models. - [08:21](https://www.youtube.com/watch?v=sOGtknSLLpU&t=501s) Rigorous token-level telemetry on every input, output, and tool call safeguards unit economics and prevents AI margin erosion. - [11:09](https://www.youtube.com/watch?v=sOGtknSLLpU&t=669s) Implementing DSPy and automated prompt optimization algorithms (GEPA) cut operational prompt and token costs by more than 50%. - [12:13](https://www.youtube.com/watch?v=sOGtknSLLpU&t=733s) Hallucinations are minimized by replacing single-shot prompts with classical ML pre-extraction, continuous self-verification against source text, and inspectable intermediate artifacts. - [14:37](https://www.youtube.com/watch?v=sOGtknSLLpU&t=877s) Security blast radius is constrained by restricting arbitrary code execution, enforcing user-scoped OAuth tokens to prevent confused deputy privilege escalation, and requiring human-in-the-loop checkpoints for signing. - [16:35](https://www.youtube.com/watch?v=sOGtknSLLpU&t=995s) Enterprise customer behavior is shifting from interactive conversational chats to autonomous, event-driven agent workflows integrated directly into Docusign workflow services.
## Detailed walkthrough ### [00:04](https://www.youtube.com/watch?v=sOGtknSLLpU&t=4s) From E-Signatures to Agreement Intelligence
Rob Pegoraro opens the conversation by introducing Tabrez Mohammed, Vice President of AI at Docusign, while jokingly acknowledging AI's notoriously rocky track record in legal tech. Pointing to infamous incidents where lawyers used hallucinating LLMs that cited non-existent case law before unimpressed judges, Pegoraro playfully warns any lawyers in the audience: "please don't do that if there are any lawyers in the room." He asks what convinced Docusign to lean heavily into AI despite these well-known risks.
Tabrez explains that Docusign has operated in the agreement space for more than two decades, building an e-signature business that has served over a billion users. However, once businesses accumulate millions of signed documents, a fundamental challenge emerges: agreements cannot just sit in a digital filing cabinet. Organizations urgently need actionable insights from their post-signing repository. Docusign's AI journey began by pairing classical machine learning with modern large language models (LLMs) to extract key contract terms and make existing features "2x, 5x, 10x better, more accurate." Over the last two years, as agentic platforms matured, Docusign shifted focus toward creating net-new capabilities that were previously impossible to build without an agent framework.
- **Scale of Docusign:** Over 20 years in the agreement space with an e-signature user base exceeding one billion people. - **Initial AI Strategy:** Modernizing legacy feature sets with LLMs to yield dramatic accuracy and performance multipliers before developing net-new agentic capabilities.
---
[02:01](https://www.youtube.com/watch?v=sOGtknSLLpU&t=121s) Pre-Commit Risk Analysis and Post-Signing Lifecycle (IAM)
Addressing what AI actually adds to the end-user signing experience, Tabrez breaks the workflow into two critical stages: pre-commit evaluation and post-commit agreement management. On the commit side, reviewing a contract—whether it is a single page or a hundred pages—requires high confidence. AI tools allow users to actively interrogate the document, deeply analyze specific clauses, and compare the incoming draft against hundreds or thousands of existing agreements across the enterprise. This contextual comparison reveals how a new contract shifts the company's liability profile and surfaces hidden obligations at a scale human review could never match before LLMs.
On the post-signing side, AI continuously monitors operational commitments and renewal windows (such as 30- or 90-day deadlines). It cross-references contract terms against real-world vendor performance to determine whether both parties fulfilled their agreed obligations. These insights feed directly into subsequent contract negotiations, optimizing future agreement terms. Tabrez notes that delivering on this promise—telling users exactly what they signed up for—is the core mission behind Docusign IAM (Intelligent Agreement Management), a platform suite introduced two years ago to manage post-signature workflows across enterprise business processes.
- **Pre-Commit AI Capabilities:** Natural-language document interrogation, clause risk analysis, and comparative benchmarking against thousands of enterprise contracts. - **Post-Commit Lifecycle Tracking:** Proactive obligation monitoring, automated 30/90-day renewal tracking, and vendor performance audits to inform future contract renegotiations.
---
[04:25](https://www.youtube.com/watch?v=sOGtknSLLpU&t=265s) Privacy-Preserving Contract Training and Achieving 1/20th the Cost
When asked what datasets Docusign used to train its AI models, Tabrez emphasizes that while inference quality depends strictly on training data quality, contracts are among the most sensitive proprietary assets any business owns. Docusign maintains strict privacy boundaries: employees do not browse customer contracts. To leverage this repository safely, the team developed a novel, multi-layered de-identification and anonymization pipeline designed to remove personally identifiable information (PII) and corporate identifiers without stripping out the semantic structure required for downstream legal reasoning.
The team continuously validates this data pipeline by running stratified sampling on post-anonymization documents to ensure that re-identification of any party is impossible. Once sanitized, this data feeds into fine-tuning and post-training pipelines. Tabrez reports that Docusign's specialized models achieve or exceed the performance of frontier hyperscaler models (such as GPT-4 or Claude) on agreement-specific tasks while operating at "1/20th or less of cost." This drastic efficiency gain enables Docusign to run deep, multi-contract analytics directly on its platform far more affordably than customers could by building DIY integrations on top of off-the-shelf commercial APIs.
```mermaid flowchart TD accTitle: Docusign Privacy-Preserving Fine-Tuning Pipeline
subgraph DataIngestion ["1. Ingestion & Privacy"] A["Enterprise Contract Repository"] --> B["Multi-Layer De-Identification Engine"] B --> C["Stratified Sampling & Re-Identification Checks"] end
subgraph Optimization ["2. Training & Tuning"] C --> D["Sanitized Contract Dataset"] D --> E["Domain-Specific Fine-Tuning & Post-Training"] end
subgraph Serving ["3. Production Inference"] E --> F["Specialized Legal & Agreement Models"] F --> G["Frontier-Level Performance at <= 1/20th Hyperscaler Cost"] end ```
- **Data Privacy Guarantee:** Zero direct human inspection of customer agreements; automated multi-stage anonymization verified through stratified re-identification testing. - **Cost-to-Performance Ratio:** In-house fine-tuned models match or beat frontier LLMs at 1/20th (or lower) the compute and token cost.
---
[06:21](https://www.youtube.com/watch?v=sOGtknSLLpU&t=381s) Building a Customer-Facing Agent Platform in 4 to 6 Months
Moving from foundational models to interactive customer-facing agents required rapid execution. While Docusign's IAM platform was launched two years prior, work on the dedicated agent platform began at the start of the calendar year and reached production in time for announcement at Docusign Momentum in May—an end-to-end development timeline of roughly four to six months. Pegoraro remarks that shipping a customer-facing enterprise platform that quickly sounds like a startup pace and jokingly asks if the engineering team managed to get any sleep.
Tabrez attributes this rapid velocity to an intentional architectural philosophy: recognizing what constitutes Docusign's true intellectual property. Docusign's IP lies in its proprietary domain capabilities, agreement workflows, and platform APIs—not in inventing custom agent harnesses from scratch. The team adopted existing open-source and off-the-shelf components to build an end-to-end functional prototype within weeks. Only after running the integrated system against live data and spotting specific bottlenecks—such as information loss, accuracy degradation, or excessive token costs—did engineers systematically ablate and replace individual framework layers with custom-engineered components.
- **Time to Market:** 4 to 6 months from initial project inception to an enterprise-ready production launch at Docusign Momentum. - **Pragmatic Prototyping Strategy:** Stitching together existing ecosystem tools within weeks, then selectively replacing components only when measurement exposed accuracy, cost, or latency deficiencies.
---
[08:21](https://www.youtube.com/watch?v=sOGtknSLLpU&t=501s) LangGraph Orchestration, Model Tiering, and Token-Level Instrumentation
Discussing the platform's core architecture, Tabrez highlights the industry debate over whether orchestration should live inside the LLM agent or outside the agent via deterministic state graphs. Docusign firmly selected external orchestration using LangGraph. External control provides strict behavioral guarantees and predictable execution paths that enterprise customers expect when handling legally binding documents. However, to avoid vendor or framework lock-in, Docusign designed every subsystem to be modular and swappable within months if architecture requirements shift.
```mermaid flowchart LR accTitle: External Agent Orchestration and Dynamic Model Routing
subgraph OrchestrationLayer ["External Orchestration (LangGraph)"] UserReq["User Input"] --> StateRouter{"External State Graph"} end
subgraph ModelRouting ["Task-Based Model Routing"] StateRouter -->|"Complex Legal Reasoning"| FrontierModel["Core Frontier / High-Parameter Model"] StateRouter -->|"Specialized Tool Calls & Extraction"| FineTunedModel["Lightweight / Fine-Tuned Model"] end
subgraph Observability ["Telemetry & Unit Economics"] FrontierModel --> TokenMonitor["Token & Cost Instrumentation"] FineTunedModel --> TokenMonitor end ```
On model selection, Docusign employs dynamic model routing: heavy frontier models handle complex multi-step legal reasoning, while lightweight, fine-tuned models handle structured tool calls and metadata extraction. When Pegoraro brings up industry skepticism around GenAI unit economics—referencing a presentation by tech critic Ed Zitron arguing that nobody wants to pay the real operational costs of AI models—Tabrez explains Docusign's rigorous cost-control methodology. To prevent cost overruns from threatening margins or inflating customer bills, Docusign instruments every single input and output token across individual tool calls and entire conversation sessions. Tabrez compares this discipline to traditional web engineering, where fixing performance requires relentless telemetry on metrics like time-to-first-pixel.
- **Orchestration Choice:** External graph-based orchestration via LangGraph to maintain strict predictability, deterministic boundaries, and component modularity. - **Model Routing Strategy:** Large reasoning models for complex high-level analysis; smaller, cost-optimized models for discrete tool execution and extraction tasks. - **Token Telemetry:** Comprehensive tracking of input and output tokens per tool call and chat session to ensure predictable unit economics and prevent margin erosion.
[11:09](https://www.youtube.com/watch?v=sOGtknSLLpU&t=669s) Cost Optimization and Automated Prompt Engineering with DSPy
Measuring model performance, expenditures, and token spend is considered a foundational baseline, but the most significant operational efficiency comes directly from cost optimization strategies. A core rule of thumb is straightforward: never deploy a larger model when a smaller model is sufficient for the task.
To systematically handle optimization, Docusign relies heavily on the framework DSPy. Tabrez Mohammed jokes that anyone unfamiliar with DSPy will likely end up building an inferior, homegrown version of it before eventually discovering the framework and switching over anyway. Integrating DSPy established a structured, repeatable iteration loop for refining and improving prompts. By leveraging automatic prompt optimization techniques like GEPA (Generative Prompt Optimization Algorithms), the team managed to reduce operational costs by over 50% across most implementations by optimizing the individual tool prompts.
- Cost reductions exceeding 50% were achieved through automated prompt optimization and tool-level tuning. - DSPy serves as the primary optimization and prompt iteration harness across agent implementations.
```mermaid flowchart LR accTitle: DSPy Prompt Optimization Workflow subgraph Evaluation ["Prompt Iteration"] A["Initial Tool Prompts"] --> B["DSPy Framework"] B --> C["Automated Prompt Optimization (GEPA)"] end subgraph Deployment ["Model Execution"] C --> D["Right-Sized Small Models"] D --> E["50%+ Token Cost Reduction"] end ```
---
[12:13](https://www.youtube.com/watch?v=sOGtknSLLpU&t=733s) Mitigating Hallucinations in Legal Workflows
When off-the-shelf LLMs are fed legal documents, outputs can seem convincing at first glance; however, when applied across hundreds or thousands of complex documents, standard single-shot approaches rapidly degrade and go off the rails. Rather than treating legal analysis as a single-shot prompt where the model is told to simply "go figure it out and come back with the answer," Docusign leverages a multi-layered pipeline.
The architecture pairs LLMs with classical machine learning models and specialized, constrained extraction systems. These systems pre-compile and vet foundational data beforehand, providing a structured trajectory that keeps the LLM within strict guardrails. During extraction and analysis, models are required to self-verify their outputs against explicit citations from the source text.
Looking forward, Docusign is conducting frontier research into concepts like progressive introspection (similar to LLM Wiki mechanisms). This enables models to produce structured intermediate artifacts over long-running jobs (such as 30-minute deep research tasks across 100-page reports). By exposing these intermediate reasoning steps, customers can inspect the progression of the work step-by-step rather than having to reverse-engineer an unverified final output.
- Single-shot LLM document parsing is replaced with pre-compiled, vetted data from classical ML models and constrained LLM extractors. - Output validation relies on continuous self-verification and strict source citations. - Progressive introspection research allows customers to verify long-running (30-minute) research tasks through inspectable intermediate artifacts.
---
[14:37](https://www.youtube.com/watch?v=sOGtknSLLpU&t=877s) Threat Modeling, Sandboxing, and Human-in-the-Loop Safeguards
Rob Pegoraro brings up the concurrent Black Hat conference in Las Vegas, asking about the agent platform's threat model and the need for red teaming. To move rapidly from zero to one while maintaining a tight security perimeter, Docusign made intentional architectural constraints.
To eliminate critical threat vectors at launch, the agent harness was explicitly restricted from writing or executing arbitrary code (a capability being introduced gradually with tighter controls). Furthermore, the platform strictly enforces user tokens rather than system tokens when authenticating with downstream APIs. Because actions execute purely within the individual user's authorization scope, the blast radius of any unexpected failure or hallucination is naturally limited to what that user is already permitted to do. This prevents privilege escalation vulnerabilities such as confused deputy attacks, ensuring that User A cannot manipulate the agent into exposing data from User B's account.
For high-stakes contract modifications, Docusign enforces strict Human-in-the-Loop (HITL) checkpoints. These prevent prompt injection or autonomous execution errors from triggering irreversible actions, such as an agent automatically signing or executing an agreement without explicit human sign-off.
- Blast radius is constrained by forcing downstream tool calls to run via user-scoped OAuth tokens rather than broad system tokens, preventing confused deputy attacks. - Direct code generation was disabled in early releases to eliminate major execution vulnerabilities. - Human-in-the-Loop (HITL) approval gates are strictly mandated for state-changing contract operations, preventing automated unauthorized document execution.
---
[16:35](https://www.youtube.com/watch?v=sOGtknSLLpU&t=995s) Customer Adoption and the Autonomous Roadmap
Customer adoption has scaled rapidly, with Docusign IAM (Intelligent Agreement Management) and its agent platform standing out as the fastest-growing product launch in the company's history. Enterprise customers who previously spent days or weeks on manual contract review processes are seeing those workflows compressed into minutes or hours within a couple of hours of tuning agent workflows.
Customer behavior is already transitioning from interactive, conversational queries toward automated, event-driven agent runs triggered by Docusign workflow services. Behind this expansion, Docusign's dedicated AI science team is actively conducting frontier research—with upcoming academic papers planned for major machine learning conferences. Key research areas include non-formal verification techniques for LLM outputs (outside traditional mathematical or code verification) and platform infrastructure supporting safe semi-autonomous and fully autonomous agent execution in collaboration with third-party ecosystem partners.
Pegoraro and Mohammed close the session with a lighthearted remark to the audience, inviting questions and joking that they won't make anyone sign a contract before chatting.
- IAM and agent tooling represent the fastest-growing product line in Docusign's history. - Workflows are shifting from interactive conversational chats to autonomous, event-driven pipelines integrated into Docusign workflow services. - Docusign's science team is publishing research on verification methodologies and autonomous multi-agent orchestration.
## Notable quotes > [00:04](https://www.youtube.com/watch?v=sOGtknSLLpU&t=4s) please don't do that if there are any lawyers in the room. — Rob Pegoraro
> [00:04](https://www.youtube.com/watch?v=sOGtknSLLpU&t=4s) 2x, 5x, 10x better, more accurate. — Tabrez Mohammed
> [04:25](https://www.youtube.com/watch?v=sOGtknSLLpU&t=265s) 1/20th or less of cost. — Tabrez Mohammed
> [12:13](https://www.youtube.com/watch?v=sOGtknSLLpU&t=733s) go figure it out and come back with the answer, — Tabrez Mohammed
## Mentioned Ai4, Black Hat, Claude, Docusign, Docusign IAM, Docusign Momentum, DSPy, Ed Zitron, Fast Company, GEPA, GPT-4, LangGraph, PCMag, Rob Pegoraro, Tabrez Mohammed
## Video description Tabrez Mohammed - VP of AI, Docusign Rob Pegoraro - Contributor, PCMag / Fast Company
Most AI agent talks focus on building tools for employees—but what changes when your users are your customers? In this talk, I will explore the unique challenges of building an externally facing agent platform at Docusign, including the strategic decisions and architectural tradeoffs required to balance long-term platform growth with the need to ship customer value quickly. I will share practical patterns for designing a secure, multi-tenant, extensible foundation that enables teams to deliver new agent capabilities rapidly without sacrificing scalability or maintainability. If you're building AI into a SaaS product, you'll leave with a framework for making platform decisions that help you move fast today while setting yourself up for success tomorrow.
[Source](https://www.youtube.com/watch?v=sOGtknSLLpU)