Basic Operations
This guide shows the current minimal flow for the real server API.
Authenticate
TOKEN=$(curl -s -X POST http://127.0.0.1:3000/v1/dashboard/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"admin"}' | jq -r '.token')
Create A Stream
STREAM_ID=$(uuidgen | tr '[:upper:]' '[:lower:]')
Ingest Text
curl -s -X POST "http://127.0.0.1:3000/v1/users/user_123/streams/$STREAM_ID/events" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"org_id": "default",
"content": "User writes Rust code with async patterns",
"content_type": "text"
}'
Retrieve
curl -s -X POST "http://127.0.0.1:3000/v1/users/user_123/streams/$STREAM_ID/retrieve" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"org_id": "default",
"query": "What language and style does the user prefer?",
"limit": 5,
"graph_depth": 1
}'
Add A Manual Graph Edge
curl -s -X POST "http://127.0.0.1:3000/v1/users/user_123/graph/edges" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source_id": "11111111-1111-1111-1111-111111111111",
"target_id": "22222222-2222-2222-2222-222222222222",
"relation": "Supports",
"weight": 0.8
}'
Inspect Pending Work
curl -s http://127.0.0.1:3000/v1/status/pending \
-H "Authorization: Bearer $TOKEN"
Use The Dashboard
- UI:
http://127.0.0.1:3100/dashboard - API redirect:
http://127.0.0.1:3000/dashboard
The dashboard is useful for memory inspection, graph exploration, organization knowledge, and cluster health.