← All case studies Case study · Agentic AI on AWS

Supplier Onboarding Agent: agents reason, capabilities act, evidence proves

A small AWS reference implementation of a governed enterprise agent. Ask “Can Supplier Acme be onboarded?” and get one of three answers, with every gate citing the evidence records behind it. The model writes the summary. Deterministic code makes the decision.

Agent One LangGraph workflow Runtime FastAPI locally, Lambda + DynamoDB on AWS Method RepoGenics, from intent-drive-starter
evidence/EX-62b9….jsonl
{
  "evidence_id": "EV-ebb77d5cffb4",
  "capability": "security_assessment",
  "args": {"supplier_id": "acme"},
  "observation": {
    "status": "PENDING",
    "assessor": "SecOps"
  },
  "inference": "Security status PENDING
    does not meet required COMPLETE.",
  "unknowns": []
}
decision: NOT_READY   gates: 2 PASS · 1 FAIL
Acme is APPROVED in the registry, but its security assessment is PENDING. The decision is NOT_READY, and the failing gate points at this record.
3
Possible answers: READY, NOT_READY or NEEDS_REVIEW, set only by deterministic gates
3
Capability calls per decision in every demo run, one evidence record each
21
Automated tests passing offline, with no AWS credentials and a fake model
0
Paths by which the model’s output can change the decision, the gates or the evidence IDs

The request

“Can this supplier be onboarded, and can you prove it?”

Agents reason. Capabilities act. Evidence proves.

Onboarding decisions look simple and are not. The answer depends on facts held in different systems, a policy someone else owns, and records that are sometimes missing. An agent that answers confidently from a gap is worse than no agent at all.

The brief was the first template of a reusable decision framework on AWS, with firm boundaries written into the intent before any code:

  • Answer with exactly one of READY, NOT_READY or NEEDS_REVIEW.
  • One reasoning agent. Capabilities fetch facts and never decide.
  • The model never sets the decision. Policy gates are code.
  • Never invent missing data. Unknown is not a pass.
  • Every reason cites evidence IDs a reviewer can trace without re-running anything.
  • Least-privilege IAM, a signed API, and no automatic deployment.

How it was delivered

The Repogenic Loop, applied to a decision agent

The repository started from intent-drive-starter, so the intent, the gate before code, the rules and the proof were in place before the agent was.

1

Intent

intents/001-supplier-onboarding.md fixed the outcome, the three answers, eight success criteria and the boundaries. A pre-implement hook blocks code until the intent states an outcome and its evidence.

2

Variation

AI-assisted engineering produced the LangGraph workflow, three capability adapters, the policy engine, the evidence store and the FastAPI and Lambda entry points.

3

Selection

21 tests decided what stayed. Each workflow rule has a test named after it, from “capabilities do not decide” to “retry at most once”.

4

Inheritance

docs/AGENTIC-WORKFLOW-RULES.md traces each rule to the code that enforces it and the test that proves it. Every run leaves an evidence file on disk.

5

Guardrails

Deterministic gates, a one-retry ceiling, observation kept apart from inference, IAM scoped to one table, one log group and one model, and a manual deploy.

The agentic workflow

One agent, three capabilities, one ledger

A single LangGraph workflow plans three critical questions and answers each with the smallest useful capability call. Calls are keyed by capability and arguments, so an identical call is never repeated. A second pass for more evidence runs at most once, and only when a gap could still change the outcome.

LangGraph workflow: understand_intent, plan_questions, gather_evidence, evaluate_gaps, make_decision and evidence_report, with an optional gather_more_evidence retry; three capabilities write to an evidence ledger, a deterministic policy engine feeds make_decision, and an advisory model only writes the summary
The model sits beside the decision path, not on it. Only policy_engine.py can set the answer.

One run, traced

“Can supplier acme be onboarded?” from request to verdict. Every step below is in the run’s evidence file or report.

1
IntentINT-001 loaded: outcome, boundaries, success criteria.
2
Plan3 critical questions: the policy, the supplier status, the security status.
3
Gather3 calls, 3 evidence records. Policy POL-ONB-001 requires APPROVED and COMPLETE.
4
Gap checkSecurity is PENDING, an observed failure, so no retry is needed.
5
DecideNOT_READY. The failing gate cites EV-ebb77d5cffb4.
6
ReportEvery cited ID is checked against the ledger, then the model writes the summary.

The output

Four suppliers, three verdicts

The precedence is fixed in code: a gate observed to fail means NOT_READY, even when other evidence is missing; otherwise any unknown means NEEDS_REVIEW; only when every gate passes is the answer READY. These are the real results for the four simulated suppliers that ship with the repository.

Gate grid for four suppliers: Acme fails the security gate and is NOT_READY; Globex passes all gates and is READY; Umbrella has no security assessment, an unknown, and NEEDS_REVIEW; Initech is REJECTED in the registry and is NOT_READY
Umbrella is the case that matters most: the missing assessment is reported as an unknown, not guessed and not treated as a pass.

The evidence

Proven where it is proven, and honest where it is not

21 tests passingVERIFIEDThe full suite runs offline with the fake model and no AWS credentials, locally and in GitHub Actions on every push. CI also runs the pre-implement intent gate.
All four demo verdictsVERIFIEDpython -m src.demo returns NOT_READY for acme and initech, READY for globex and NEEDS_REVIEW for umbrella, each with three calls and three evidence records.
Every rule has a testVERIFIEDEight workflow rules, from “separate observation from inference” to “every conclusion references evidence”, each map to the code that enforces them and a named test.
Retry disciplineVERIFIEDTests show a transient failure recovering on one retry, no second retry, no retry when a failing gate has already settled the outcome, and no retry for a record that does not exist.
AWS code pathsVERIFIED OFFLINEThe DynamoDB evidence store and the Lambda handler are tested against simulated AWS services (moto). The SAM template scopes IAM to one log group, one table and one Bedrock model.
AWS deploymentNOT YETDeployment is manual by design and has not been recorded. The container image has not been built in CI. Nothing is claimed as deployed until it is.
Real systems of recordNOT YETSupplier, security and policy data are simulated JSON. There is no policy versioning yet.
Summary faithfulness, evidence integrity, review queueNOT YETThe Bedrock summary is labeled non-authoritative but not evaluated. Evidence is not hashed or signed. NEEDS_REVIEW outcomes have no handoff queue.

The architecture

A fixed engine and swappable decision packs

The agent loop, gate evaluator, evidence ledger, capability contract and guardrails are built once. A new business question should be a new pack: an intent file, a few capability adapters, a gate list and tests. Supplier onboarding is the only pack built so far; the others are the design target.

Fixed engine of six parts on the left; on the right four decision packs: supplier onboarding, built with 21 tests, and employee onboarding, customer KYC and production access, all marked proposed
The V2 test of the pattern: replace one simulated capability with a real system behind the same CapabilityResult contract, and the agent, policy engine and tests should not change.

Why it matters

An explainable decision, not a confident guess

Unknown is not a pass

Missing data becomes a recorded unknown and a NEEDS_REVIEW answer. The agent never fills a gap with a plausible value, which is the failure that makes enterprises distrust agents.

An audit trail by default

Every call writes one record with the question, the raw observation, the inference and the source. A reviewer follows the evidence IDs instead of asking the AI to explain itself.

Pack #2 should be config

The engine does not know it is about suppliers. Employee onboarding, KYC or production access should bring their own intent, capabilities and gates, not a new platform. That is still to be proven.

Python 3.12LangGraphPydanticFastAPIpytestmotoAWS LambdaAPI Gateway (IAM auth)Amazon DynamoDBAmazon BedrockAWS SAMGitHub ActionsIntent-driven engineering

Need an agent that can show its evidence?

From a written intent to a governed decision agent on AWS, with deterministic gates, an evidence record for every call, and unknowns that go to a human instead of being guessed.

Talk to Repogenic

Reference implementation on simulated data only. It is not connected to real supplier, security or policy systems, and has not been deployed to production.