Skip to main content

Edge Quickstart

This walks you from a clean git clone to a working governed Claude Code session. The wrapper here is the developer/demo path — not enterprise enforcement. For fleet rollout see Architecture and the managed-settings boundary.

What success looks like​

When you finish this guide, you will have a live audit trail in your local dashboard:

PASS edge_session_setup
PASS edge_pretooluse_deny
PASS edge_approval_flow
PASS edge_posttooluse_artifact
PASS edge_evidence_export

Prerequisites​

ToolVersionNotes
DockerCompose v2 pluginDocker Desktop (macOS/Windows) or native engine (Linux).
GNU MakeanyDrives make dev-up / make build.
Go1.24+Local binary builds.
Node.js18+Dashboard build.
openssl, curl, jq, bashany recentMint a local API key and run the E2E script.
Claude CodeoptionalOnly for the real-Claude demo at the end.

Windows users: use Git Bash or WSL. The E2E script assumes POSIX shell semantics. Every make line has a raw docker compose / go build fallback.

1. Clone and seed config​

git clone https://github.com/cordum-io/cordum.git
cd cordum

# The Compose stack reads CORDUM_API_KEY from .env at startup, so the same
# value must be in .env *and* exported in your shell.
[ -f .env ] || cp .env.example .env
export CORDUM_API_KEY=$(openssl rand -hex 32)
# Portable edit of .env
sed "s|^CORDUM_API_KEY=.*|CORDUM_API_KEY=${CORDUM_API_KEY}|" .env > .env.tmp && mv .env.tmp .env

export CORDUM_TENANT_ID=default
export CORDUM_GATEWAY=https://localhost:8081
export CORDUM_TLS_CA="$(pwd)/certs/ca/ca.crt" # consumed by cordum-agentd

2. Bring up the stack and build the Edge binaries​

make dev-up
# Equivalent: docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build

# Wait for services to become healthy (approx 30s)
./tools/scripts/quickstart.sh --skip-build --skip-smoke

# Build the Edge binaries (hook, agentd, and ctl)
for s in cordum-hook cordum-agentd cordumctl; do make build SERVICE=$s; done
# Equivalent: go build -o bin/cordum-hook ./cmd/cordum-hook (etc.)

3. Install the demo Edge policy pack​

Without this pack, /api/v1/edge/evaluate runs against a default-allow policy and the deny/approval rules will not fire.

export CORDUM_TLS_CA="$(pwd)/certs/ca/ca.crt"
./bin/cordumctl pack install ./examples/cordum-edge-pack

The pack ships policy overlays only (no pool overlay), so it registers as INACTIVE — that is expected; the policy fragments are still applied.

4. Run the fake-hook end-to-end test​

CORDUM_INTEGRATION=1 bash tools/scripts/edge_fake_hook_e2e.sh

Those PASS lines confirm the cordum-hook → cordum-agentd → Gateway → Safety Kernel path is wired correctly.

If the script prints SKIP edge_fake_hook_e2e, you forgot export CORDUM_INTEGRATION=1. It skips by default so it never flaps CI runs that lack a stack.

5. Open the dashboard​

http://localhost:8082

Navigate to Edge Sessions. You should see one session row from the fake-hook script with a PreToolUse deny, an approval + retry, a PostToolUse artifact, and an evidence-export link. Click in to see the timeline and event inspector — it shows decisions, approval refs, and artifact pointer metadata, and deliberately does not render raw payloads, prompts, or command output.

6. Run real Claude Code through Cordum​

This is the recommended way to evaluate Cordum Edge. It requires Claude Code on PATH (or pass --claude-path).

export CORDUM_PRINCIPAL_ID=demo-user
./bin/cordumctl edge claude

Inside Claude, try:

PromptExpected outcome
read .envDenied before the tool runs.
edit README.md (or a guarded path)REQUIRE_APPROVAL. Approve in the dashboard, then retry in Claude.
Safe action (ls, grep in a non-guarded path)Allowed quietly.

When done, exit Claude (Ctrl-D); the wrapper tears down agentd and the temp settings directory.

7. Cleanup​

make dev-down # stop containers, keep volumes
docker compose down -v # full reset (drops Redis + evidence/audit chain)

make dev-down only runs docker compose down; pass -v to docker compose directly, not to make dev-down.

Troubleshooting​

SymptomLikely causeFix
SKIP edge_fake_hook_e2eCORDUM_INTEGRATION unsetexport CORDUM_INTEGRATION=1, re-run.
FAIL edge_pretooluse_deny: ... != denyDemo pack not installedRe-run step 3.
POST /api/v1/edge/sessions → 401Wrong/missing API keyExport the same key the stack started with (grep ^CORDUM_API_KEY= .env).
POST /api/v1/edge/sessions → 404Gateway image predates Edgedocker compose down -v && make dev-up.
curl: (60) SSL certificate problemSelf-signed dev certUse --cacert ./certs/ca/ca.crt.
claude: command not foundClaude Code not on PATH--claude-path /path/to/claude or install Claude Code.

For local diagnostics:

./bin/cordumctl edge doctor # observe-only health checks
./bin/cordumctl edge doctor --json # machine-readable

See the CLI reference and Configuration for the full surface.