Multi-agent architecture

A deterministic orchestrator owns the state machine and dispatches one specialist agent per step. Agents never call each other and never talk to the customer — they return to the bus, which either advances the state or hands control to a human.

agent worker orchestrator bus human handoff
orchestratorDeterministic state-machine router

Reads the RFQ state, selects exactly one agent, applies its guardrails to the result, then writes the next state and an audit entry. Bounded at 30 steps per run so no chain can spin indefinitely.

Intake channel

Mocked Salesforce RFQ form — route, commodity, container lines, terms, discount ask

submitted
Contracting AgentValidator
container catalogpolicy rules
  • · discount ceiling 40%
  • · no unknown container types
validating
Needs correctionhuman

owner · Sales user

invalid line, implausible qty or out-of-policy discount ask

Pricing AgentProposer
pricing historycost model
  • · 5 iterations
  • · 2000 tokens
  • · target margin 18%–35%
  • · cost @ 65% of list
pricing
reprice loop
Price Sanity AgentCritic (independent cost model)
conservative cost model
  • · cost @ 75% of list
  • · 2 reprice attempts
  • · breach outside 7%–50%
price_sanity_check
Pricing escalationhuman

owner · Pricing Super User

margin breach · reprice loop exhausted · agent cap hit

Contracting AgentDrafter
clause libraryterms table
  • · approved price is immutable input
drafting_contract
revise-draft loop
Contract Sanity AgentCritic
clause checklist
  • · 3 draft revisions
contract_sanity_check
Contracting escalationhuman

owner · Contracting Super User

warnings survive the revision cap

pending_sales_approval
Approval gatehuman

owner · Sales owner

mandatory — nothing customer-facing passes without it

Contracting AgentDispatcher
email renderer
  • · single send per approval
sending

Quote sent

Terminal. A customer counter offer re-enters the pricing loop as a reprice.

sent

shared layer — read by the orchestrator and every agent

State store

RFQ status, prices, drafts — single source of truth

Audit log

Every transition, cap hit and human ruling, append-only

Reference data

Container types, base rates, pricing history

Guardrail config

Caps, margin bands and policy limits in one module

Proposer / critic separation

The agent that sets a price is never the agent that clears it, and each runs a different cost model. Disagreement is a designed signal.

Every loop is bounded

Iteration, token, reprice and revision budgets are declared up front. Exhausting one escalates to a named human instead of retrying.

Orchestrator holds authority

Agents return results; only the orchestrator mutates state. No agent-to-agent calls, so there is no hidden control flow.

Humans own irreversibility

Price overrides, contract deviations and the customer-facing send each require an explicit ruling from the right role.