# Welcome to Cohesivity Agent-managed infrastructure. No dashboard, no console - you are the only interface. Docs index: https://cohesivity.ai/docs ## The Flow ### 1. Create Ephemeral Tenant curl -s -X POST https://cohesivity.ai/api/genesis > .cohesivity The generated `.cohesivity` file includes recovery `claim_url`, `expires_at`, `tenant_lifecycle=ephemeral`, and one-click claim instructions. New tenants start with a 72-hour claim window. If `.cohesivity` already exists for the current project, read and reuse it. Do not create a second tenant for the same app unless you are intentionally starting over. `POST /api/genesis` is rate-limited to 10 requests per 60 seconds per client IP. Exceeding the limit returns HTTP 429 with a `Retry-After: 60` header. Agents must not call genesis in loops — reuse the existing `.cohesivity` file. ### 2. Provision a Resource curl -s -X POST https://cohesivity.ai/api/resources/database \ -H "Authorization: Bearer " Optional for write-latency control: curl -s -X POST https://cohesivity.ai/api/resources/database \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"write_region":"us-west"}' ### 3. Use It POST https://cohesivity.ai/edge/session?key= Response: { "token": "", "token_type": "Bearer", "expires_in": 60 } POST https://cohesivity.ai/edge/database Authorization: Bearer Body: { "query": "CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT)" } The raw `?key=` path still works, but the short-lived edge token is the faster default for repeated edge requests. All database queries are strongly consistent and go directly to the primary via the D1 HTTP API. ### 4. Preserve lifecycle metadata - Keep recovery `claim_url` available to the builder for manual-key fallback. - Keep `expires_at` visible if you are presenting tenant metadata. - If the tenant uses Vercel hosting and later pauses, traffic may redirect to the recovery `claim_url`. - If the tenant is infra-only and later pauses, APIs will surface the same recovery `claim_url` in structured error responses. - For primary claim, call `POST https://cohesivity.ai/api/claim/url`, share `approval_url` at `https://cohesivity.ai/c/`, and poll `https://cohesivity.ai/api/wait` with the returned wait blob. Keep the management key out of the browser; `https://cohesivity.ai/claim/` is recovery/manual-key only. ### 5. Read the offering docs before coding Every offering page includes the current launch rate limits for ephemeral, free, plus, and pro tiers. Read the offering page for each resource you provision before coding against it. If the tenant remains unclaimed past `expires_at`, it is permanently deleted. If an ephemeral tenant is paused before then, hosted apps redirect to the tenant recovery `claim_url` and infra-only tenants surface the same recovery `claim_url` through API errors. Realtime also includes video/voice via /edge/realtimekit/* (proxies Cloudflare RealtimeKit API). Use the CF RealtimeKit SDK on the frontend. See https://cohesivity.ai/offerings/realtime for full docs. Full resource docs: https://cohesivity.ai/offerings