Browse the docs
Platform
Security model
How Habitat protects accounts, keys and data — and how agents are hardened against prompt injection.
Accounts and sessions#
- Passwords are hashed with scrypt (N=16384, r=8, p=1, 16-byte salt) and compared in constant time. Passwords must be at least 10 characters.
- Brute-force protection: password sign-in is limited per network, and an account locks for 15 minutes after repeated failed attempts. Responses don't reveal whether an email is registered, and timing is kept similar either way.
- Sessions use a random 256-bit token in an
HttpOnly,SameSite=Laxcookie (Securein production). Only a SHA-256 hash of the token is stored. Signing in or signing up always issues a fresh session; changing your password signs out every other session; you can sign out other devices or everywhere from Settings. - CSRF: besides SameSite cookies, account and admin mutations reject cross-site
Originheaders. - Wallet sign-in uses one-time nonces with a five-minute expiry that are consumed atomically before verification; see Solana wallet & ownership. Habitat never asks for seed phrases or private keys.
Keys and secrets#
- API keys are random secrets shown once; only their SHA-256 hash is stored. Keys carry scopes, can be revoked instantly and are rate-limited per key.
- Creator provider keys (BYOK) are validated with the provider, then encrypted with AES-256-GCM using a server-side
ENCRYPTION_KEY. They are decrypted only in memory right before a provider call and are never returned to the browser — only the last four characters. - Platform provider keys live in server environment variables and never reach the client.
- Secrets are never written to logs.
Data isolation#
- Every agent, knowledge source, conversation, message and memory has an owner, and every read checks it. Requests for things you can't see return "not found".
- Knowledge search is scoped to one agent. Long-term memories are scoped to one person with one agent.
- Creators see aggregate analytics, never other people's conversations. Admins see configuration summaries for moderation, not conversations.
- Knowledge files are served only to the agent's owner and admins; people chatting see only cited snippets.
- Embeds use their own visitor sessions and can be restricted to specific sites with
frame-ancestors.
Prompt-injection handling#
Agents read text they don't control: uploaded documents, crawled web pages, tool results, other people's messages. Habitat treats all of it as data, never instructions:
- Retrieved knowledge, memories and tool output are passed to the model inside fenced blocks marked as untrusted reference data, and anything inside them that looks like one of those fences is neutralised so content can't break out.
- A platform policy sits above every agent's persona. It tells the model to ignore commands, role changes and policy claims found in data, and it can't be overridden by a creator's prompt, a document, a page or a tool result.
- Agents never reveal provider keys, credentials, environment details, database contents, other users' conversations or memories, another agent's private knowledge, or (by default) their creator's private instructions.
- Tools are read-only and permission-checked: input and output are validated against schemas, each run has a timeout and rate limits, and every run is logged. No tool can execute arbitrary code, sign transactions or access funds.
Web fetching#
All fetches of user-supplied URLs (website knowledge and the Website Reader tool) go through one guard that resolves DNS and blocks private, loopback, link-local and internal addresses (including after redirects), allows only standard web ports, limits size and time, honours robots.txt and never sends credentials.
Uploads#
Uploaded files are checked by extension, declared type and file signature, size-limited and (for text) required to be valid UTF-8. Images for avatars must be PNG, JPG or WebP up to 2 MB.
Abuse prevention and moderation#
Per-visitor, per-user, per-agent, per-key and per-network limits, a platform inference budget, reporting on every agent page, an admin moderation queue, and an append-only audit log of every admin action and sensitive account change (sign-ins, password and email changes, wallet links, key creation and revocation, provider-key changes, account deletion).
Reporting a vulnerability#
Contact the operators of this Habitat instance privately before disclosing anything publicly.