Skip to content

ooiuuii/hermes-foundry

Repository files navigation

Hermes Foundry

Every employee has a Hermes. Every approval can think before it moves.

Hermes Foundry is a procurement agent mesh for the Hermes Agent Accelerated Business Hackathon by Nous Research, NVIDIA, and Stripe. It turns one Kingdee K3Cloud MCP-shaped purchase request into a dynamic approval route, personal Hermes prechecks, a Stripe test-mode supplier deposit hold, a NemoClaw/OpenShell tool boundary, and a reproducible audit trail.

The point is not "let AI approve purchase orders." The point is safer: agents coordinate the messy work before approval, while humans keep final authority over ERP submit and money movement.

We are not replacing Kingdee. Kingdee remains the ERP system of record; Hermes Foundry gives every approver a Hermes that can gather context, explain a recommendation, stage safe work, and stop before final ERP/payment authority.

Watch

Demo video:

GitHub Release: https://github.com/ooiuuii/hermes-foundry/releases/tag/v0.1-demo
Direct MP4: https://github.com/ooiuuii/hermes-foundry/releases/download/v0.1-demo/hermes-procurement-mesh-full-demo.en.andrew-nas-bgm.mp4

Local generated copies, when recorded:

artifacts/videos/hermes-procurement-mesh-full-demo.mp4
artifacts/videos/hermes-procurement-mesh-full-demo.zh.mp4

Large video files are intentionally not committed to normal Git history. The repo contains subtitles and the recording script so the video can be regenerated locally.

What You'll See

  1. A Kingdee K3Cloud MCP-shaped procurement request enters Hermes Foundry.
  2. A deterministic model_route_trace.json replays the Nemotron route decision from amount, category, department, supplier evidence, payment terms, and org policy.
  3. Each approver's personal Hermes does first-pass work: approve, reject with reasons, or ask for evidence.
  4. NemoClaw/OpenShell keeps ERP and payment tool execution outside model context.
  5. Stripe supplier deposit and Kingdee PO actions are staged, but final release waits for a human gate.
  6. npm run proof regenerates the model route trace, route artifact, Kingdee MCP trace, payment hold, guardrail log, audit ledger, and proof manifest from deterministic inputs.

Why This Exists

Enterprise workflows are rarely blocked by one missing button. They are blocked by scattered context:

  • ERP records live in one system.
  • Supplier quotes and evidence live in another.
  • Budget checks sit with finance.
  • Payment approval sits somewhere else.
  • Human approval reasons get buried in chat.

Hermes Foundry models a different operating pattern: every employee has a Hermes. The organization can precheck, explain, reroute, and document approvals without letting agents silently submit purchase orders or release money.

Architecture

Layer Role Evidence
React/Vite demo UI Procurement workbench, route, prechecks, payment gate, proof run, audit trail src/App.tsx, src/scenarioData.ts, src/styles.css
Hermes agent mesh Product model: every approver has a personal Hermes that can precheck and explain Demo UI, audit ledger
Nemotron 3 Ultra Route decision replay for the dynamic approval chain, with optional live capture when credentials are present artifacts/proof/model_route_trace.json, artifacts/proof/approval_route.generated.json, optional artifacts/proof/model_route_trace.live.json
NemoClaw/OpenShell Tool boundary around ERP/payment actions and credentials artifacts/proof/nemoclaw_guardrail_log.json
Stripe test mode Supplier deposit is staged, not captured, before approval artifacts/proof/stripe_test_supplier_deposit.json
Kingdee K3Cloud MCP scenario ERP procurement intake and PO submission modeled against the public MCP tool surface artifacts/input/procurement-request.json, artifacts/proof/kingdee_mcp_tool_trace.json
Proof pack Reproducible verifier artifacts generated from fixture input and org policy npm run proof

Runtime Split

Hermes Foundry has a local demo layer and a runtime proof story.

Runtime What it does
Local workspace Runs the React/Vite demo, proof generator, subtitles, and video recording scripts
Cloud Hermes/NemoClaw sandbox Validates the Hermes/NemoClaw/OpenShell execution-boundary story used by the demo
Nous/NVIDIA model route Supplies Nemotron route-generation reasoning; Hermes gateway captures can use HERMES_GATEWAY_MODEL=hermes-agent, Nous/NVIDIA direct captures can use nvidia/nemotron-3-ultra-550b-a55b, and OpenRouter users can set OPENROUTER_MODEL=nvidia/nemotron-3-ultra-550b-a55b:free
Stripe test mode Represents spend/payment execution while keeping deposit release approval-gated
Kingdee MCP fixture Models K3Cloud query_metadata, query_bill, save_bill, submit_bill, and audit_bill boundaries without storing production ERP data

In short: the UI is local, the proof pack is deterministic, the runtime badge reflects the Hermes/NemoClaw path, and Stripe/Kingdee are modeled as guarded business systems.

Real vs Demo

Part Status
Demo UI and video flow Real local React/Vite app and Playwright recording script
Proof pack generation Real deterministic generator, runnable with npm run proof; optional live route capture is separate
NemoClaw/Nemotron readiness Verified runtime path reflected in the demo proof badge
Stripe payment Test-mode supplier deposit hold, no live money movement
Kingdee data MCP-shaped demo fixture, no production Kingdee data and no committed KD credentials
Secrets No production API keys, Stripe secrets, ERP credentials, or passwords in the repo

Kingdee Integration Model

The Kingdee side is intentionally modeled against the public kingdee-k3cloud-mcp pattern instead of a fake ERP button. The demo fixture names the K3Cloud forms and tools the agent boundary would touch:

Kingdee MCP tool Hermes Foundry behavior
query_metadata Read form structure before converting a Kingdee bill into an approval packet
query_bill Read PUR_Requisition, supplier, and inventory evidence
save_bill Stage a PUR_PurchaseOrder draft inside the sandbox
submit_bill Block before the human gate; allow only after approval
audit_bill Treat as human-owned ERP authority, not autonomous agent action

The proof file artifacts/proof/kingdee_mcp_tool_trace.json records this boundary in a way judges can inspect after running npm run proof.

Run It

Requirements:

Requirement Notes
Node.js 20+ Vite/React app and proof scripts
npm Install dependencies and run scripts
Chrome Only needed for video recording through Playwright
ffmpeg Only needed for video recording and MP4 concatenation

Install and start:

npm install
npm run proof
npm run dev -- --port 5173

Open:

http://127.0.0.1:5173

Build:

npm run build

Record videos after the local app is running:

npm run record:demo
npm run record:demo:zh
npm run mix:soft-bgm

mix:soft-bgm adds a quiet original, noise-free launch-style audio bed to the English MP4. It expects ffmpeg, keeps generated audio/video files out of Git history, and can be tuned with SOFT_BGM_VOLUME=0.20.

Proof Pack

The verifier-facing artifacts live in artifacts/proof/.

File What it proves
org-structure.md Approval policy, budget rule, backup signer rule
model_route_trace.json Deterministic replay of the Nemotron route decision used by the demo
model_route_trace.live.json Optional live Nemotron capture generated only by npm run proof:live-route
model_route_trace.live.manifest.json Optional hash manifest for the live capture
runtime_smoke_2026-06-18.json Sanitized Hermes/Nemotron runtime smoke captured during the official free-access window
approval_route.generated.json Route artifact derived from procurement input and org policy
kingdee_mcp_tool_trace.json Kingdee MCP tool trace: metadata/read/stage/submit/audit decisions
stripe_test_supplier_deposit.json Supplier deposit drafted in Stripe test mode and blocked before human approval
nemoclaw_guardrail_log.json Tool decisions: ERP read/stage allowed, Kingdee submit and Stripe capture blocked before approval
procurement_audit_ledger.json Cross-system trail linking request, route, prechecks, approval, ERP, Stripe, and rollback
proof_manifest.generated.json Input/output hashes, verifier claims, and commands

Regenerate it:

npm run proof

Expected output:

PROOF_PACK_OK
generated model_route_trace.json
generated approval_route.generated.json
generated kingdee_mcp_tool_trace.json
generated stripe_test_supplier_deposit.json
generated nemoclaw_guardrail_log.json
generated procurement_audit_ledger.json
generated proof_manifest.generated.json

Optional live Nemotron route capture:

# Either put NOUS_API_KEY/NVIDIA_API_KEY/OPENROUTER_API_KEY in .env,
# or reuse a local Hermes Nous Portal login with HERMES_RESOLVE_NOUS=1.
npm run proof:live-route

This writes artifacts/proof/model_route_trace.live.json and artifacts/proof/model_route_trace.live.manifest.json. The live files store the provider, endpoint, model, prompt hash, parsed route decision, usage metadata, and raw model text, but never store the API key. The deterministic npm run proof path remains the verifier baseline.

Historical runtime smoke:

artifacts/proof/runtime_smoke_2026-06-18.json

This sanitized artifact records a successful Hermes/Nemotron gateway smoke captured on June 18, 2026 during the official free-access window. It is included as historical runtime evidence; the deterministic proof pack remains the reproducible baseline after the window ends.

For the Hermes/Nous Portal free route used during the demo setup:

$env:ROUTE_CAPTURE_PROVIDER="gateway"
$env:HERMES_GATEWAY_BASE_URL="http://127.0.0.1:8642/v1"
$env:HERMES_GATEWAY_MODEL="hermes-agent"
npm run proof:live-route

If you want to call Nous Portal directly instead of the Hermes gateway, use:

$env:ROUTE_CAPTURE_PROVIDER="nous"
$env:HERMES_RESOLVE_NOUS="1"
npm run proof:live-route

Direct Nous Portal may require paid credits for some Nemotron models. The gateway path is the route used by the demo runtime smoke.

Check the live capture prompt without credentials:

npm run proof:live-route:dry

Project Structure

hermes-foundry/
|-- src/
|   |-- App.tsx                  # Procurement mesh demo UI
|   |-- CinematicTrailer.tsx     # Intro/comparison scenes for video recording
|   |-- proofData.ts             # Proof artifact metadata for UI rendering
|   |-- scenarioData.ts          # Demo stages, event stream, and ledger copy
|   `-- styles.css               # Demo visual system
|-- scripts/
|   |-- capture-live-route.mjs   # Optional live Nemotron route capture
|   |-- add-soft-bgm.mjs         # Optional quiet BGM mixer for the English video
|   |-- generate-proof-pack.mjs  # Deterministic proof artifact generator
|   |-- verify-proof-pack.mjs    # Minimal proof invariant checks
|   `-- record-full-demo.mjs     # English/Chinese video recorder
|-- artifacts/
|   |-- audio/                   # Ignored generated BGM assets
|   |-- input/                   # Demo procurement request fixture
|   |-- proof/                   # Regenerated verifier artifacts
|   `-- subtitles/               # English and Chinese caption files
`-- docs/
    |-- ARCHITECTURE.md
    |-- JUDGING_NOTES.md
    |-- KINGDEE_INTEGRATION.md
    `-- SUBMISSION.md

How Hermes Is Used

Hermes feature How Hermes Foundry uses it Evidence
Persistent agent role model Every approver has a personal Hermes that carries role-specific context and judgment Precheck view, audit ledger
Tool-using business agent Agents read Kingdee-shaped ERP data, stage PO/payment actions, and write audit artifacts Event stream, proof pack
Human-supervised autonomy Agents can recommend and prepare actions, but cannot release payment or submit final PO without approval Payment gate, guardrail log
Runtime/tool boundary NemoClaw/OpenShell isolate credentials and block risky calls before approval nemoclaw_guardrail_log.json
Reproducible evidence Proof artifacts can be regenerated and hash-manifested proof_manifest.generated.json

Safety Notes

  • Do not commit .env, API keys, passwords, SSH keys, production ERP records, or live Stripe credentials.
  • Keep Stripe flows in test mode unless there is separate explicit approval.
  • Keep generated videos/screenshots out of normal Git history unless intentionally publishing them as release assets.
  • The proof pack is deterministic. It makes the story inspectable; it does not claim production Kingdee data, live Kingdee writes, or live Stripe execution.

About

Kingdee K3Cloud procurement agent mesh for the Hermes Agent Accelerated Business Hackathon

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages