Terminal Demo: Setup & Authentication
Verify platform services, obtain authentication tokens, and access the admin dashboard. Required before running any terminal demo.
On this page
Overview
These terminal demos let you exercise every governance feature using only a terminal. No Cowork session or Claude Code required. Each demo produces data that is immediately visible on the admin dashboard.
All commands assume the platform is built and running. Dashboard links below use relative paths — prepend your platform URL (e.g. http://localhost:8080 for local dev).
Why Preflight Matters
The platform runs as a set of coordinated services: 3 AI agents (subprocesses running Claude Code), 2 MCP servers (tool providers via TCP/stdio), and background jobs. The preflight check queries the service registry (PostgreSQL) with compile-time checked SQL (sqlx::query!{}) to verify all components are healthy. Without this, subsequent demos may fail silently — an agent message would hang waiting for an MCP server that isn't running.
Step 1: Preflight Check
Verify all services are healthy:
systemprompt infra services status
You should see:
- 3 agents running
- 1 MCP server running (systemprompt)
The agents map to the demo scenarios as follows:
| Service Agent | Agent ID | Scope | Used In |
|---|---|---|---|
| platform | developer_agent | admin | Governance (allow, scope), Agents |
| revenue | associate_agent | user | Governance (deny, scope) |
| admin | admin_agent | admin | Background |
If anything is down:
systemprompt infra services cleanup --yes
systemprompt infra services start --kill-port-process
Step 2: Access the Admin Dashboard
Navigate to /admin/login in your browser. Enter your email to receive a magic link. After authentication, the dashboard shows real-time metrics for every action you run from the terminal.
Key pages to keep open during demos:
| Page | URL | What It Shows |
|---|---|---|
| Dashboard | /admin/ |
Governance overview, policy violations, MCP access, cost breakdown |
| Events | /admin/events |
Full audit trail of all platform activity |
| Governance | /admin/governance |
Every tool governance decision (allow/deny) |
Step 3: Get the Plugin Token
The governance and MCP demos require a bearer token. To get it:
- Open /admin/
- Click the Share & Install icon (connected dots) in the top-right corner
- Select the Cowork tab
- Click the eye icon to reveal the token, then click Copy
Save it as an environment variable:
TOKEN="<paste-your-plugin-token-here>"
You will use this token for the Governance API demos and the MCP Access Tracking demo.
Audit
Verify the preflight succeeded:
systemprompt infra services status
Expected: 3 agents running, 2 MCP servers running, all background jobs healthy. If any service shows "stopped", restart with systemprompt infra services start --kill-port-process.
Notes
- JSON formatting: curl responses pipe through
python3 -m json.toolfor readability. You can substitutejqif preferred. - Cost: Each AI inference call costs approximately $0.01 (varies by configured model).
- Isolation: Each demo creates an isolated context so results do not interfere with each other.
Demo Sequence
Run the demos in order. Each builds on the previous:
| Category | Page | What It Covers |
|---|---|---|
| Governance | Agent Messaging | Allowed vs refused agent paths |
| Governance | Audit Trails & Costs | Inspect traces from agent messaging demos |
| Governance | Governance API | Direct curl calls: allow, deny, secret detection |
| MCP | MCP Access Tracking | MCP tool calls + database audit queries |
| Performance | Request Tracing & Benchmark | Typed data flow, all IDs, 200-request benchmark |
| Agents | Agent Tracing | Live agent messaging, artifacts, execution tracing |