### Quick Start Source: https://github.com/kyrodb/smriti/blob/main/README.md Installs dependencies, copies environment file, and starts the Uvicorn server. ```bash pip install -r requirements.txt cp .env.production.example .env uvicorn src.main:app --reload --port 8000 ``` -------------------------------- ### Customer Bootstrap - Create Tenant Source: https://github.com/kyrodb/smriti/blob/main/docs/API_GUIDE.md Example JSON payload for creating a tenant. ```json { "customer_id": "acme-dev", "organization_name": "Acme Dev", "email": "platform@acme.dev", "subscription_tier": "free" } ``` -------------------------------- ### Example KyroDB Server Configuration Source: https://github.com/kyrodb/smriti/blob/main/docs/KYRODB_SETUP.md YAML configuration for the KyroDB server, specifying host, port, and HNSW parameters. ```yaml server: host: "127.0.0.1" port: 50051 hnsw: dimension: 384 distance: cosine max_elements: 200000 ``` -------------------------------- ### Customer Bootstrap - Create Tenant API Key Source: https://github.com/kyrodb/smriti/blob/main/docs/API_GUIDE.md Example JSON payload for creating a tenant API key. ```json { "name": "codex", "expires_in_days": 30 } ``` -------------------------------- ### Trace API - Finalize Trace Source: https://github.com/kyrodb/smriti/blob/main/docs/API_GUIDE.md Example JSON payload for marking a trace as finalized. ```json { "final_step_idx": 7, "outcome": "failure", "summary_json": { "result": "deployment blocked by missing image tag" } } ``` -------------------------------- ### Trace API - Append Trace Steps Source: https://github.com/kyrodb/smriti/blob/main/docs/API_GUIDE.md Example JSON payload for appending one or more immutable trace steps. ```json { "trace_id": "deploy-prod-001", "agent_id": "codex", "session_id": "session-42", "task_id": "deploy-production", "steps": [ { "step_idx": 0, "ts": "2026-04-17T12:00:00Z", "observation_json": {"terminal": "Preparing deploy"}, "tool_call_json": {"tool": "shell", "cmd": "kubectl apply -f deployment.yaml"}, "tool_result_json": {"exit_code": 1, "stderr": "ImagePullBackOff"}, "state_snapshot_json": {"cluster": "production"}, "error_signature": "kubernetes:image-pull-back-off", "privacy_tags": ["terminal"], "source_trust": 0.98 } ] } ``` -------------------------------- ### KyroDB Environment Variables Source: https://github.com/kyrodb/smriti/blob/main/docs/KYRODB_SETUP.md Environment variables for configuring KyroDB integration within Smriti, including enablement, host/port for text and image clients, and request timeout. ```bash KYRODB_ENABLED=false KYRODB_TEXT_HOST=127.0.0.1 KYRODB_TEXT_PORT=50051 KYRODB_IMAGE_HOST=127.0.0.1 KYRODB_IMAGE_PORT=50052 KYRODB_REQUEST_TIMEOUT_SECONDS=30 KYRODB_ENABLE_TLS=false ``` -------------------------------- ### Bootstrap A Tenant - Create Customer Source: https://github.com/kyrodb/smriti/blob/main/README.md Creates a new customer with specified details. ```bash curl -X POST http://localhost:8000/api/customers \ -H "X-Admin-API-Key: your-admin-key" \ -H "Content-Type: application/json" \ -d '{ "customer_id": "acme-dev", "organization_name": "Acme Dev", "email": "platform@acme.dev", "subscription_tier": "free" }' ``` -------------------------------- ### Bootstrap A Tenant - Create API Key Source: https://github.com/kyrodb/smriti/blob/main/README.md Creates an API key for a given customer. ```bash curl -X POST http://localhost:8000/api/customers/acme-dev/api-keys \ -H "X-Admin-API-Key: your-admin-key" \ -H "Content-Type: application/json" \ -d '{"name": "codex"}' ``` -------------------------------- ### Development Commands Source: https://github.com/kyrodb/smriti/blob/main/README.md Commands for running tests, formatting code, and linting. ```bash pytest tests/ -v black src/ tests/ ruff check src/ tests/ mypy src/ ``` -------------------------------- ### Append A Trace Source: https://github.com/kyrodb/smriti/blob/main/README.md Appends a new trace entry with step details. ```bash curl -X POST http://localhost:8000/api/v2/trace/append \ -H "X-API-Key: em_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "trace_id": "deploy-prod-001", "agent_id": "codex", "session_id": "session-42", "task_id": "deploy-production", "steps": [ { "step_idx": 0, "ts": "2026-04-17T12:00:00Z", "tool_call_json": {"tool": "shell", "cmd": "kubectl apply -f deployment.yaml"}, "tool_result_json": {"exit_code": 1, "stderr": "ImagePullBackOff"}, "state_snapshot_json": {"cluster": "production", "service": "payments"}, "error_signature": "kubernetes:image-pull-back-off", "privacy_tags": ["terminal"], "source_trust": 0.98 } ] }' ``` -------------------------------- ### Finalize A Trace Source: https://github.com/kyrodb/smriti/blob/main/README.md Finalizes a trace with its outcome and summary. ```bash curl -X POST http://localhost:8000/api/v2/trace/deploy-prod-001/finalize \ -H "X-API-Key: em_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "final_step_idx": 0, "outcome": "failure", "summary_json": {"result": "image missing in registry"} }' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.