Build a Multi-Agent Procurement System with LangGraph: A Step-by-Step Guide for B2B Leaders

By Sam Qikaka

Category: Agents & Architecture

Discover how to build a vendor‑neutral multi‑agent procurement system using LangGraph and open‑weight models. This hands‑on guide covers agent roles, ERP integration, cost benchmarks, a 5‑stage rollout plan, and a pre‑launch checklist – everything B2B operations leaders need to automate complex sourcing workflows.

Why Multi-Agent AI for B2B Procurement Now? Procurement is inherently multi‑stakeholder. A typical sourcing event requires: scouting potential suppliers, validating financials and compliance, analyzing contract terms against company policy, and negotiating pricing – often across separate systems and human reviewers. Single‑agent architectures fall apart here because no single model prompt can hold all the context, chain the required tool calls, and maintain accuracy across dozens of sequential steps. Multi‑agent systems solve this by decomposing the workflow into specialized agents, each with its own memory, tools, and prompt instruction. LangGraph, an open‑source library from the LangChain ecosystem, takes this further: it lets you define a graph of agent nodes and conditional edges, so the system can loop, branch, and escalate without losing state. For procurement, that means you get a

coordinator agent that can dispatch subtasks to a supplier‑vetting agent, a contract analyst, and a negotiation engine – all while staying in sync with your ERP. B2B operations leaders are under pressure to reduce cycle times and improve sourcing quality. Meanwhile, open‑weight models like Llama 3 and Mistral have become capable enough to handle structured business logic when paired with the right retrieval and tool‑calling scaffolding. The combination is mature enough that you can now build a credible, internal procurement agent fleet without locking yourself into a single IaaS provider. Core Agent Roles: Supplier Vetting, Contract Analysis, and Negotiation Before writing a line of code, you need to define exactly what each agent does and what data it needs. Here are the three essential roles in our LangGraph‑based system: Supplier Vetting Agent Responsibility: Given a category of spen

d, find suitable suppliers from your company‑sanctioned master list (or from external databases if approved), and produce a ranked shortlist based on criteria like financial health, historical performance, ESG compliance, and delivery capacity. Data inputs: Internal supplier master (via ERP API), third‑party credit reports (e.g., Dun & Bradstreet API), internal quality records (from a data lake), and any blocklists. The agent uses retrieval‑augmented generation (RAG) to pull the latest documents and then generates a scorecard. Contract Analysis Agent Responsibility: Ingest a draft contract or amendment, compare it against your organization’s clause library and risk thresholds, and flag deviations – pricing formulas, termination terms, data protection addenda, indemnities. It should output a “red‑line” summary readable by a human buyer. Data inputs: Contract repository (e.g., SharePoint,

iManage, or a contract lifecycle management system), clause templates, regulatory requirement database. The agent often needs to parse long PDFs, so a pdf‑to‑text preprocessing step is required. Price Negotiation Agent Responsibility: Using historical pricing data, market indices, and predefined negotiation guidelines, propose a target price, suggest counter‑offers, and simulate the business case. This agent does not autonomously commit the company; it operates as an assistive negotiator, producing a recommended negotiation script and fallback options. Data inputs: Historical purchase price variance (PPV) reports from the ERP, commodity indices (public APIs where available), and pre‑approved discount thresholds. Together, these three roles form a pipeline that a LangGraph supervisor can orchestrate. Because each agent is a separate node, you can test, replace, and retrain them independen

tly – a significant advantage over monolithic prompts. Setting Up LangGraph with Open-Weight Models LangGraph’s stateful graph execution is well‑suited to multi‑step procurement flows. Here’s how to set up the environment with open‑source tooling. Environment and Model Selection You’ll need a Python 3.12+ environment with , , and the provider library for your model. For open‑weight models, you have two practical paths: - Self-hosted via vLLM or Hugging Face TGI: Deploy models like or on a GPU instance. For production procurement tasks, consider the 70B Llama 3 variant for better reasoning on contract language. - Managed API providers that serve open‑weight models: Several cloud marketplaces now host Llama and Mistral with OpenAI‑compatible endpoints. This simplifies integration while keeping you free of proprietary‑model lock‑in. We recommend starting with Llama 3 70B for the coordinator

and contract analysis, and the 8B variant for lighter supplier vetting calls. Use consistent system prompts across nodes to maintain reliability. Building the LangGraph Graph A minimal graph for the procurement supervisor includes: 1. A supervisor node that receives a user request (e.g., “Source pl