Skip to main content

ui

Web UI and REST API gateway for Cruvero. Serves an embedded web dashboard and exposes HTTP endpoints for workflow management, tool approvals, cost queries, audit exploration, quota management, and security monitoring.

Key Files​

FilePurpose
main.goEntry point: HTTP server, API routes, auth middleware

Architecture​

The UI binary is a single HTTP server that:

  • Serves embedded static assets (HTML/JS/CSS) for the web dashboard
  • Exposes REST API endpoints for workflow operations
  • Connects to Temporal for workflow queries and signals
  • Reads from PostgreSQL for audit logs, registry data, and immunity state

API Endpoints​

PathDescription
/api/runsList workflows
/api/runFetch run detail
/api/executeStart a single-agent run
/api/supervisor/startStart a multi-agent run
/api/knowledge-bases*Knowledge Base CRUD/upload/embed
/api/run-templates*Run template list/create/load
/api/toolsList tools and pending approvals
/api/approveApprove/reject tool executions
/api/answerAnswer agent questions
/api/costCost dashboard data
/api/quota/*Quota status, reset, override
/api/audit/*Audit log queries and chain verification
/api/security/alertsSecurity alert metrics
/api/immune/*Immunity quarantine management

Web Pages​

PageURL
Run operationshttp://localhost:8080/
Tool browserhttp://localhost:8080/tools
Cost dashboardhttp://localhost:8080/cost
Audit explorerhttp://localhost:8080/audit
Security alertshttp://localhost:8080/security
Knowledge Baseshttp://localhost:8080/knowledge-bases
Agents control planehttp://localhost:8080/agents

Dependencies on Shared Packages​

agent, audit, config, health, llm, mcp, observability, quota, registry, temporal, tenant, tools

Configuration​

See docs/manual/config-env.md. Key variables:

Env VarRequiredDefaultDescription
CRUVERO_UI_AUTHNononeAuth mode: none or keycloak
CRUVERO_UI_READONLYNofalseDisable approve/replay
CRUVERO_UI_ADMIN_TOKENNo—Token for quota mutation endpoints
CRUVERO_UI_CORSNofalseEnable CORS

Development​

Run Locally​

go run ./cmd/ui --addr :8080

Run Tests​

go test ./cmd/ui/...