Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perseus AMD Agent — Complete Agent Context Stack for AMD GPUs

AMD Developer Hackathon: Act II — Unicorn Track

"Agents lose memory when sessions end. Perseus + Perseus Vault solve this — on AMD hardware."

Perseus AMD Agent combines two open-source MIT-licensed tools into a complete AI agent context stack targeting AMD MI300X GPUs:

Component Role Tech
Perseus Pre-session context resolution (services, drift, files) Python CLI, 22+ MCP tools
Perseus Vault Cross-session persistent memory (recall, remember, insights) Rust, SQLite+FTS5, 23 MCP tools

License: MIT Hackathon: AMD Act II

🔴 Live demo: demo.perseus.observer — self-contained Perseus Vault semantic-vs-keyword recall demo (zero cloud, bundled ONNX embeddings).


The Problem

AI coding agents lose context every session:

  • Cold start: Every new session starts from zero — agents re-discover the same environment facts
  • No memory: What one agent learned yesterday is gone for today's session
  • Token waste: a hypothesis to measure with paired before/after session artifacts; no universal number is claimed here
  • SaaS lock-in: Cursor, Copilot, and others charge $20-40/seat/month but don't share context across sessions

The Solution: Resolve-Before-Context + Persistent Memory

  1. Perseus pre-resolves workspace state before the agent sees it — services, file changes, drift detection, system health. The agent gets a clean, pre-verified context instead of raw tool output.
  2. Perseus Vault carries memory across sessions — architectural decisions, bug fixes, conventions, and insights persist. Agents recall what happened last Tuesday.

Both target AMD MI300X GPUs with zero cloud dependency. Open-source MIT license throughout.


Architecture

┌──────────────────────────────────────────────────────────────┐
│                      Agent Session Start                      │
└───────────────┬──────────────────────────────────────────────┘
                │
    ┌───────────▼───────────┐
    │   Perseus (Python)    │  ◄── Pre-resolves workspace state
    │   @services @drift    │      22+ MCP tools auto-discovered
    │   @query @read @list  │      Lives in AGENTS.md preamble
    └───────────┬───────────┘
                │ Live context injected
                ▼
    ┌───────────────────────┐
    │   LLM (via vLLM)     │  ◄── Runs on AMD MI300X
    │   Qwen3-Coder /       │      ROCm 7 backend
    │   DeepSeek v4         │      FP8 KV cache, 256K context
    └───────────┬───────────┘
                │ Agent reasons with full context
                ▼
    ┌───────────▼───────────────┐
    │  Perseus Vault (Rust/SQLite) │  ◄── Persistent memory backend
    │  remember / recall           │      23 MCP tools
    │  forget / search             │      Published SQLite recall estimates
    └───────────┬───────────────┘
                │ Cross-session memory persists
                ▼
    ┌───────────────────────┐
    │  Next Session          │
    │  Agent recalls:        │
    │  - Architecture (demo state)│
    │  - Conventions (demo state) │
    │  - Bug fixes (demo state)   │
    │  - Correctness: not measured │
    └───────────────────────┘

📊 Performance Estimates — Published AMD ROCm Specifications

⚠️ HONEST LABELING: Benchmarks below are derived from AMD published specifications, ROCm 7 documentation, and vLLM community performance data. Real MI300X measurements pending AMD Developer Cloud credits. No fabricated measurements.

Target Hardware: AMD Instinct MI300X

Specification MI300X (Published) Source
Memory 192 GB HBM3 AMD product specs
Memory Bandwidth 5.3 TB/s AMD MI300X datasheet
Compute CDNA 3 architecture, 304 CU AMD Instinct docs
ROCm Support ROCm 7.0+ AMD ROCm docs
FP8 TFLOPS 2,614 (sparse) / 1,307 (dense) AMD MI300X specs
Interconnect Infinity Fabric 896 GB/s AMD architecture docs
TDP 750W AMD MI300X datasheet

Why MI300X for Agent Context

The 192GB HBM3 enables running the entire stack — context engine, LLM inference, and memory backend — on a single GPU:

  • Qwen3-Coder-FP8 (80B params): ~77 GB VRAM (fits with 115+ GB to spare)
  • Perseus context engine: ~120 MB VRAM (CPU-bound, negligible GPU usage)
  • Perseus Vault memory engine: ~360 MB VRAM (SQLite+FTS5, CPU-bound)
  • Remaining VRAM: >114 GB for KV cache (supports 256K+ token contexts)

Projected Performance (Published-Spec Derived)

Metric Estimate Methodology
Context resolution latency 120ms cold / 15ms warm Published-spec/CPU-equivalent estimate; raw observations are required for an observed claim
Token savings per session Unavailable Requires paired raw before/after sessions with model/provider/run provenance
Memory recall latency 3.5ms at 500 / 12.8ms at 5,000 SQLite FTS5 published estimates; no live Vault artifact
Memory entities stored Unavailable Entity count is not measured by this benchmark run
Cross-session correctness Unavailable A three-session demo is not a general accuracy evaluation
Projected GPU utilization Unavailable No rocm-smi VRAM/utilization artifact is included
Projected VRAM (context engine) ~480MB Perseus + Perseus Vault CPU-bound; GPU VRAM reserved for LLM
Projected cost/session Unavailable Paired inference/session utilization data is not available

What We Would Measure on Real AMD MI300X Hardware

Once AMD Developer Cloud credits arrive, we would measure:

  1. Context Resolution on MI300X — Cold/warm cache latency with actual filesystem I/O under ROCm
  2. vLLM Throughput — Qwen3-Coder-FP8 token generation rate with ROCm 7 backend, at context lengths from 8K to 256K
  3. Memory Recall Under Load — Perseus Vault FTS5 recall with 1K-50K entities while vLLM inference runs concurrently
  4. VRAM Partitioning — Verify the 480MB context engine + 77GB LLM + KV cache fit within 192GB
  5. Cost Profile — Real AMD Developer Cloud instance pricing × measured utilization
  6. Backend Comparison — vLLM ROCm vs vLLM CUDA (same model, different GPU) — latency, throughput, cost

Hardware Comparison: MI300X vs A100 vs H100

MI300X (AMD) A100 80GB (NVIDIA) H100 80GB (NVIDIA)
VRAM 192 GB HBM3 80 GB HBM2e 80 GB HBM3
Bandwidth 5.3 TB/s 2.0 TB/s 3.35 TB/s
FP8 Dense 1,307 TFLOPS N/A (no FP8) 990 TFLOPS
Max context (Qwen3-Coder-FP8) 256K+ tokens ~64K tokens ~96K tokens
VRAM headroom (agent stack) 114+ GB free ~3 GB free ~3 GB free
Open-source software ROCm (open) CUDA (proprietary) CUDA (proprietary)
Cost/GPU (cloud) ~$1.99/hr spot ~$1.10/hr spot ~$2.21/hr spot
Cost per 1M tokens ~$0.15 (projected) ~$0.30 ~$0.20

Key advantage: MI300X has 2.4x the VRAM of H100 at similar cost — running the full agent stack (context + inference + memory) on one GPU instead of two.


Cost Economics

These are mathematical projections — no AMD cloud instance required to calculate:

Scenario SaaS (Cursor) Perseus on MI300X Annual Savings
Solo developer $480/yr $0 projected GPU cost $480
10-dev team $4,800/yr $2/yr projected GPU cost $4,798
50-dev team $24,000/yr $8/yr projected GPU cost $23,992
100-dev team $48,000/yr $16/yr projected GPU cost $47,984

Mathematical projection: break-even on an $18K MI300X purchase is 9.0 months for a 50-dev team.

Calculation: 100 sessions/day/dev × 22 days/mo × 0.011 seconds/session ÷ 3,600 × $1.99/hr MI300X spot × 12 months. This is a projection, not a measurement.


Quick Start

# Install Perseus (Python)
pip install perseus-ctx

# Install Perseus Vault (Rust binary)
# Download from: https://github.com/Perseus-Computing-LLC/perseus-vault/releases

# Run a session with context + memory
perseus render ./my-project/.perseus/context.md --output ./my-project/AGENTS.md
perseus-vault serve &
hermes-agent --context-file ./my-project/AGENTS.md

Project Structure

perseus-amd-agent/
├── README.md              # This file
├── LICENSE                # MIT
├── AGENTS.md              # Project context for AI agents
├── .nojekyll              # Required for GitHub Pages
├── docs/
│   ├── STRATEGY.md        # Competition strategy and judging analysis
│   ├── ARCHITECTURE.md    # Detailed architecture
│   └── SUBMISSION.md      # Pre-written submission text (LabLab.ai)
├── src/
│   ├── benchmark.py       # Benchmark suite (published-spec + simulation)
│   └── context_engine.py  # Perseus context resolution demo
├── demo/
│   ├── demo_script.md     # 3-minute demo script
│   ├── demo_terminal.html # Playwright terminal simulation
│   ├── record_video.py    # Video recording script
│   └── demo_video.mp4     # Recorded demo
└── assets/
    ├── architecture.html  # Architecture diagram (SVG)
    └── thumbnail.png      # Rendered architecture thumbnail

Act I → Act II: What We Learned

From the AMD Act I hackathon (481 entries), winners shared three patterns:

Winner Pattern Act I Winner (REPOMIND) Our Act II Entry
Hardware benchmarks with tables VRAM usage, throughput at every context length, needle-in-haystack at 200K tokens Published-spec estimates + methodology for real measurement
Cost economics "$4.12 compute vs $40/seat/month." "Mathematical projection only; measured session cost and break-even are unavailable until paired utilization data exists."
Hardware-specific depth Found real AITER bug (2.8x faster TTFT but broken output) Analyzed MI300X 192GB advantage for full-stack agent deployment

Dual-backend pattern (from Google Cloud Rapid Agent Hackathon): Perseus + Perseus Vault with swappable backends — same architecture that won the Elastic Partner Track, now targeting AMD hardware.


License

MIT — LICENSE

Built For

AMD Developer Hackathon: Act II — July 6-11, 2026 Unicorn Track — No fixed benchmark, judged on creativity, originality, and product potential

About

Complete Agent Context Stack on AMD MI300X — Perseus + Perseus Vault benchmarks for AMD Developer Hackathon Act II

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages