Flagship Case Study

Agentic AI Production Harness

A runnable full-stack AI reference project for the layer most agent demos are missing: product UX, workflow control, retrieval grounding, typed tool execution, human approval, evaluation, traces, and operational readiness.

Problem

Agent demos often work in controlled paths but fail when real users introduce ambiguity, stale context, risky actions, partial inputs, tool failures, and production constraints. This harness shows how to make those risks visible and manageable.

Build status

The project now includes a dependency-free runnable Node demo, a golden workflow eval suite, a tool contract schema, trace artifacts, and a visual trace mock. Connecting the mock to generated traces is the next upgrade.

Run it locally

cd examples/agentic-ai-production-harness
npm run demo
npm run eval

Trace viewer mock

What the harness makes visible

trace_demo_001
1

Intent router

tool_request_with_human_approval

Detected a state-changing support action that requires review.

confidence 0.82
2

Retriever

2 policy documents found

Refund Policy and Account Cancellation Policy were used as grounding evidence.

precision 0.75
3

Tool contract validation

valid high-risk action

JSON schema validated the action type, customer id, reason, evidence ids, and approval requirement.

valid true
4

Approval gate

waiting for reviewer

The workflow pauses before account cancellation or refund execution.

approval required
5

Eval signals

pass with review

Groundedness, tool success, approval routing, latency, and cost are captured in the trace.

$0.012 / 1840ms

Production AI system map

How I connect product, data, agents, and release readiness

A production AI feature is not one model call. It is a workflow that needs trust, control, evaluation, and observability.

1

Product request

User intent, workflow context, permissions, and success criteria.

2

UX + state layer

Copilot screens, review queues, progress states, corrections, and trust signals.

3

Workflow orchestration

APIs, auth, queues, state machines, retries, and human approval paths.

4

RAG + data trust

Documents, metadata, retrieval, citations, freshness, and permission filters.

5

Model + agent control

LLM calls, tool contracts, routing, fallback logic, and bounded agent actions.

6

Eval + observability

Traces, prompt versions, golden workflows, cost, latency, and release gates.

Design rule: every AI feature should have a visible user path, a trusted data path, a bounded agent path, and a measurable release path.
Agentic AI Production Harness Architecture

This draw.io-backed SVG shows the production request path from user request to intent routing, planning, retrieval, tool control, approval, response composition, evaluation, and tracing.

Agentic AI Production Harness architecture diagram

Inspectable artifacts

These repository artifacts make the case study inspectable without pretending the full UI is finished.

Request intake and intent router

Classifies whether the user needs retrieval, tool execution, human review, or a normal response path.

Planner node

Breaks the task into controlled steps and records assumptions before any tool is called.

Retriever and policy checker

Fetches grounded context, checks document freshness, validates access rules, and prepares citations.

Tool execution gateway

Runs only approved tools with typed inputs, output validation, audit logs, and fallback handling.

Human approval checkpoint

Routes risky or irreversible actions to a reviewer instead of allowing fully autonomous execution.

Evaluation and trace layer

Scores groundedness, task completion, latency, cost, tool-call success, and failure categories.

Mock product states

  • User request intake with task type and risk label
  • Retrieved evidence panel with source, freshness, and citation status
  • Tool approval queue for risky or irreversible actions
  • Trace timeline showing prompt version, retrieved context, tool calls, latency, and cost

Failure modes covered

  • Wrong intent route
  • Stale retrieved document
  • Risky tool request
  • Malformed tool output
  • Prompt regression
  • Latency or cost spike

Evaluation table

ScenarioExpected behaviorSignal
Policy question with fresh sourceAnswer with citation and freshness noteGroundedness + citation coverage
Request needs external tool actionRoute through tool contract and approval ruleTool-call success + approval rate
Stale retrieved documentWarn or fallback instead of confident answerFreshness handling
Ambiguous user requestAsk clarification before planning actionsWorkflow completion quality

Implementation roadmap

  1. Connect the visual trace viewer to generated demo output.
  2. Add human approval UI mock for risky tool requests.
  3. Add a small retrieval corpus with document freshness and permission examples.
  4. Add demo GIF and screenshots for the portfolio case study page.
  5. Publish companion build notes explaining the implementation decisions.