Track 2 supply-chain agent built for Beat The Clock — Agent Hack Boston Tech Week Hackathon. DelXAI triages delivery exceptions, checks mock carrier capacity, reschedules shipments when approved, drafts customer-facing options, and writes an in-memory ops audit log.
Live demo: https://supply-chain-agent-pi.vercel.app/
Team: Lenny Pische · Bohdan Koshevoi
Sponsors: Wayfair · Subconscious · Baseten · Cloudflare
Run the app, choose Exception Agent, and try:
Order WF-10482 missed its delivery window - fix it
Expected flow:
- The agent calls
getShipmentandgetCarrierUpdate. - It diagnoses the missed white-glove window and SLA risk.
- It calls
getRescheduleSlotsand chooses the best recovery slot. - It calls
rescheduleDelivery, thendraftCustomerCommunication. - It calls
resolveExceptionand returns Situation, Recommended action, Alternatives, Customer message, and Ops notes.
More sample prompts:
What delivery exceptions are open today?Customer wants the earliest redelivery for tracking 1Z99910482Summarize options for a weather delay in DenverLook up order WF-23891 and explain the partial shipment risk
- Mock shipment and exception fixtures in
lib/data/ - Mutable supply-chain store in
lib/supply-chain/store.ts - AI SDK tools in
lib/tools/supply-chain.ts - Read-only Lookup mode for shipment and exception questions
- Multi-step Exception Agent mode for diagnosis, rescheduling, customer drafts, and exception closure
- Dual Subconscious API key failover on quota/rate-limit style errors
Choose one challenge. Your agent should use tools (APIs, MCP, functions) and talk to users through the built-in UI.
Millions of customers shop for furniture on Wayfair every day.
Challenge: Build an agent that improves discovery and the buyer experience.
Ideas to explore:
- Style or room-based product recommendations
- “Help me furnish this room” from a photo or description
- Compare options, explain tradeoffs, answer sizing questions
- Guided search instead of endless filters
Wayfair and its supplier network move huge volumes of furniture worldwide.
Challenge: Build an agent that improves Wayfair’s ability to manage its supply chain.
Ideas to explore:
- Track shipments, flag delays, summarize status
- Answer “where is order X?” or “what’s at risk this week?”
- Coordinate supplier updates, inventory, or routing decisions
- Turn messy ops data into clear next steps
Wayfair runs ~$12B in revenue and serves ~22M customers a year.
Challenge: Build an agent system that improves internal operations — financial operations or customer service.
Ideas to explore:
- Triage support tickets and draft responses
- Look up order/billing history and explain charges
- Summarize finance or ops metrics for a team
- Route issues to the right team with context
1. Get a Subconscious API key
Sign up at subconscious.dev/platform and copy your key (sky_...).
2. Create a .env.local file with your Subconscious API keys
pnpm install
cp .env.example .env.local
# Set SUBCONSCIOUS_API_KEY in .env.local
# Optionally set SUBCONSCIOUS_API_KEY_2 for automatic failover3. Run the app
pnpm devOpen http://localhost:3000.
4. Try the two modes
- Lookup — read-only shipment lookup and exception summaries
- Exception Agent — multi-step delivery exception recovery with write tools
Use Image to attach a damage or carrier-note photo for multimodal reasoning.
You mostly edit three places:
| What | Where |
|---|---|
| Supply-chain tools | lib/tools/supply-chain.ts |
| Tool bundles | lib/tools/index.ts |
| Agent behavior & prompts | lib/agents/index.ts |
| Mock data | lib/data/*.json |
| Mutable store | lib/supply-chain/store.ts |
| MCP integrations | lib/tools/mcp-tools.ts |
Tools are functions your agent can call. Example:
// lib/tools/index.ts
export const searchProducts = tool({
description: "Search furniture by style, room, or keyword",
inputSchema: z.object({ query: z.string() }),
execute: async ({ query }) => {
// Call your API, mock data, or Cloudflare Worker
return { results: [] };
},
});Add it to agentTools in the same file, then customize the prompt in lib/agents/index.ts for your track.
MCP servers expose tools (files, APIs, databases). Wrap them as AI SDK tools — see lib/tools/mcp-tools.ts.
pnpm add @modelcontextprotocol/sdkThe UI sends images as data URLs. Useful for room photos, screenshots, or docs. Details: .agents/skills/subconscious-dev/references/multimodal.md.
Agent mode runs up to 30 tool steps (lib/agents/index.ts). The API allows 5-minute runs (app/api/chat/route.ts). Increase either if your demo needs it.
- Subconscious provider —
lib/subconscious.ts - Lookup + delivery exception agents —
lib/agents/index.ts - Supply-chain tools —
lib/tools/supply-chain.ts - Streaming API —
app/api/chat/route.ts - Chat UI —
components/chat-app.tsx - Subconscious API skill —
.agents/skills/subconscious-dev/(for Cursor/Codex)
Re-install the skill anytime:
npx skills add https://github.com/subconscious-systems/skills --skill subconscious-dev| Variable | Required |
|---|---|
SUBCONSCIOUS_API_KEY |
Yes, unless SUBCONSCIOUS_API_KEY_2 is set — get one here |
SUBCONSCIOUS_API_KEY_2 |
Recommended fallback key |
The server keeps keys private and uses SUBCONSCIOUS_API_KEY first. If Subconscious returns a quota/rate-limit style error (429, 402, or a quota-like 403), the app retries the same request once with SUBCONSCIOUS_API_KEY_2 and sticks to that key until restart.
pnpm lintpnpm build- In Lookup mode:
What delivery exceptions are open today? - In Exception Agent mode:
Order WF-10482 missed its delivery window - fix it - Confirm the final response includes a customer message and ops notes.
- Try a blocked path:
Reschedule delivered order WF-99002
Set SUBCONSCIOUS_API_KEY and optionally SUBCONSCIOUS_API_KEY_2 on your host, then:
pnpm build && pnpm startWorks on Vercel, Cloudflare, or any Node host.
Production: https://supply-chain-agent-pi.vercel.app/