CyberAg Documentation
CyberAg ships curated sample data for local development and E2E tests. All seed data lives in one source file and is loaded into LocalStack DynamoDB + S3.
**File:** apps/console/src/data/mock.ts
**Seed script:** scripts/local/seed.ts
**Command:** npm run local:seed
| Entity | Count | IDs (examples) |
|---|---|---|
| Agents | 3 | a1 Cursor Prod, a2 Code Reviewer, a3 CI Bot |
| Identities | 4 | i1–i4 (linked to agents via agent ID) |
| Violations | 2 | v1 PII leak, v2 prompt injection |
| Policies | 2 | p1 PII Detection, p2 Admin Tool Restriction |
| Guardrail events | 2 | g1, g2 |
| Red team runs | 1 | rt1 (completed, 68% pass rate) |
| Connectors | 3 | c1 AWS, c2 GitHub, c3 Cursor |
| Audit records | 1 | ar1 (replayable) |
| Replay decisions | 1 | rp1 (match=true) |
| Kill switch | 1 | globalActive: false |
| Discovery graph | 1 | 8 nodes, 8 edges (stored at DISCOVERY#GRAPH) |
The seed script also uploads:
decisions/d1.json — sample blocked SQL injection decision (for replay)audit/t1/{timestamp}-{hash}.json — signed audit artifactAfter seeding, GET /api/v1/discovery/graph returns a fixed topology:
The API prefers the seeded DISCOVERY#GRAPH item. If missing, it builds a graph from agents + identities in DynamoDB.
# Full reset (destroys LocalStack volumes)
npm run local:reset
npm run local:deploy
npm run local:seed
# Re-seed only (infra already running)
npm run local:seed
All sample data uses tenant ID **t1**.
1. Edit apps/console/src/data/mock.ts
2. Run npm run local:seed
3. Refresh the console at http://localhost:3002
Identity agent fields must use **agent IDs** (a1, a2, …), not display names, so graph edges resolve correctly in the computed fallback path.
npm run local:verify
Checks health, guardrail scan, agents list, violations list, and (with Gemini key) Ask, Hardening, and Policy lint.