.ts
A Pack
Back to Projects
Case Study
Completed

A Pack

Multi-Agent AI Research System — Qwen Cloud Hackathon

Role

Full-Stack Engineer & AI Architect

Year

2026

Tech Stack

9 Technologies

Status

Completed

Overview

Most AI research tools are a black box: one prompt in, one wall of text out, and no way to know whether the model read a real source or made it up. A Pack is built the opposite way. Give it a question and a pack of eight specialized AI wolves plans the work, searches the web in parallel, challenges every weak claim, and produces a cited research brief — every move streaming live on a canvas, every claim carrying a receipt, and the total cost shown before a single cent is spent. Built for the Qwen Cloud Global AI Hackathon — all inference runs on Qwen models via Alibaba Cloud.

The Problem

AI research tools give you a spinner and a wall of text. You have no idea if the model read a real source, made something up, or hallucinated a citation. There is no transparency, no cost visibility before it runs, and no way to audit what happened. A Pack is the opposite: every action is visible, attributable, and auditable before and after it runs.

Screenshots

A Pack - Image 1
1 / 5

Demo

Challenges

01

Building a reliable multi-agent orchestration system where eight distinct wolf roles coordinate without deadlocking, stalling, or silently dropping work mid-hunt.

02

Streaming a live event canvas to the browser while keeping the event log append-only, replayable, and tamper-evident — the UI had to be a pure function of the stream, not a separate state machine.

03

Implementing a hard spend cap (Boundary) that warns, downgrades model tiers, and halts with a checkpoint before a single overspend cent is committed — all without disrupting the running hunt.

Solutions

01

Built a Supervisor loop in Python/FastAPI that drives each hunt: assigns a dense per-hunt sequence number, validates every event against a frozen JSON schema, and commits to Postgres in one transaction — no dual-write window.

02

Transactional outbox pattern: Postgres is the single source of truth; a relay tails committed events and republishes to Redis Streams. The Rust/Axum gateway tails Redis and fans out to browser WebSockets. Frontend reducer drops seq <= lastSeq so duplicates are no-ops.

03

Boundary system: cost is estimated via /rehearse before approval; during the hunt the Supervisor tracks spend in real time, downgrades from max → plus → flash under pressure, then halts with a checkpoint the user can resume or abort.

Key Highlights

Eight wolf roles, one hunt: Alpha (orchestrator), Beta (planner), Scouts (parallel web researchers), Tracker (analyst), Sentinel (critic that drops unsourced claims), Howler (writer), Elder (memory), Warden (field medic that reroutes faulted wolves).

Every claim carries a receipt — who found it, which source, whether the Sentinel challenged it. challenged_kept claims survived on evidence. Nothing happens off-screen.

Flight Recorder: the full event log is replayable. Every decision the pack made can be audited step by step after the hunt completes.

Elder memory system: lessons from past hunts are stored, readable, editable, and vetoable by the user before they influence the next run.

Benchmark mode: the pack runs head-to-head against a lone agent on the same task, scored — proving the multi-agent approach outperforms a single model at scale.

Scale & Scope

8

Wolf Roles

14+

API Endpoints

Real-time

Event Stream

Qwen

Inference

Technology Stack

React
Python / FastAPI
Rust / Axum
PostgreSQL
Redis Streams
FastAPI
Docker
Vite
Alibaba Cloud ECS

Outcome

Shipped for the Qwen Cloud Global AI Hackathon — live at 47.237.4.147 on Alibaba Cloud ECS with real Qwen inference, completed hunts you can open immediately, and claim receipts showing the Sentinel's full audit trail.