Skip to content

apps: add supplychain-demand-planning-agent#144

Open
RichmondAlake wants to merge 1 commit into
mainfrom
feature/apps-supplychain-demand-planning-agent
Open

apps: add supplychain-demand-planning-agent#144
RichmondAlake wants to merge 1 commit into
mainfrom
feature/apps-supplychain-demand-planning-agent

Conversation

@RichmondAlake
Copy link
Copy Markdown
Member

@RichmondAlake RichmondAlake commented May 18, 2026

Summary

Adds a new app entry — supplychain-demand-planning-agent — under apps/.

A multi-agent demand-planning assistant on Oracle AI Database. A LangGraph supervisor decomposes planner requests and delegates to two specialists (demand_analyst and policy_agent). Every memory layer, every retrieval primitive, and every LLM call lands in a single Oracle database:

  • OracleVS — vector knowledge (12 demand reports + 1 buy-volume policy)
  • AsyncOracleStore — long-term cross-thread memory (planner preferences)
  • AsyncOracleSaver — per-thread agent checkpoints
  • OracleSemanticCache — LLM-response cache
  • OracleChatMessageHistory — chat-session transcripts

Embeddings are produced in-database via an ONNX model (ALL_MINILM_L12_V2, 384 dims) loaded into Oracle with DBMS_VECTOR.LOAD_ONNX_MODEL — no external embedding API in the chain.

Bundle includes:

  • FastAPI + WebSocket backend that streams supervisor.astream_events("v2") as typed UI events
  • React + Vite + Tailwind frontend with chat pane, per-agent context window, live data explorer, animated architecture explorer, and light/dark theming
  • Setup scripts (bootstrap.py, onnx_setup.py, seed_supplychain.py)
  • Student / complete workshop notebook pair (9 TODOs across 12 parts) under workshop/
  • Per-part docs under docs/

Also adds one row to the Apps table in the root README.md.

Test plan

  • docker compose up -d oracle-free brings Oracle Free up healthy
  • python app/scripts/bootstrap.py creates the AGENT user and the vector memory pool
  • python app/scripts/onnx_setup.py loads ALL_MINILM_L12_V2 into Oracle and a smoke-test query returns a 384-dim vector
  • python app/scripts/seed_supplychain.py writes 12 demand reports + 1 policy memo into OracleVS and 2 user preferences into AsyncOracleStore
  • python -m uvicorn app.backend.main:app --host 0.0.0.0 --port 8000 boots; /api/health returns 200 with {"llm_provider": "oci", "llm_model": "xai.grok-4-1-fast-reasoning"}
  • cd app/frontend && npm install && npm run dev -- --port 3000 binds 3000; UI loads with the chat pane, data explorer (all 8 seeded tables visible), and architecture explorer
  • All three starter prompts produce a Priya-preference-aware buy recommendation in the chat
  • workshop/notebook_complete.ipynb executes end-to-end with 9/9 TODO checkpoints passing

A multi-agent demand-planning assistant on Oracle AI Database. A
LangGraph supervisor decomposes planner requests and delegates to two
specialists — demand_analyst (vector search over OracleVS) and
policy_agent (planner preferences from AsyncOracleStore plus a standing
buy-volume policy) — then synthesises a buy recommendation that honours
both the policy and the active planner's saved preferences.

Every layer lands in a single Oracle database:

  - OracleVS              vector knowledge (demand reports + policy)
  - AsyncOracleStore      long-term cross-thread memory (planner prefs)
  - AsyncOracleSaver      per-thread agent checkpoints
  - OracleSemanticCache   LLM-response cache
  - OracleChatMessageHistory chat-session transcripts

Embeddings are produced in-database via an ONNX model (ALL_MINILM_L12_V2,
384 dims) loaded into Oracle with DBMS_VECTOR.LOAD_ONNX_MODEL — no
external embedding API in the chain.

Bundle includes the FastAPI/WebSocket backend, the React/Vite frontend
(chat + per-agent context + data explorer + architecture explorer),
the three setup scripts (bootstrap, ONNX, seed), per-part docs, and the
student/complete workshop notebook pair.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant