Security model
How AgenticMind protects secrets, isolates code, enforces node permissions, guards its API, and what to change before exposing a server.
AgenticMind is designed to run on your own machine with real API keys and real data. Its security model rests on a few rules applied everywhere.
Secrets are references
- Configs store
{"$secret": "NAME"}, never values. A literal value in a secret field is a validation error (SECRET_LITERAL_VALUE). - Values resolve at run time from the environment (
.env, which wins) or the workspace store (Settings → Secrets). - The workspace store encrypts with AES-256-GCM, with the secret name as associated data. The key comes from
AGENTICMIND_SECRET_KEYor<data>/secret.key(generated with mode 600). Back up the key with the database, or stored secrets cannot be read. No endpoint ever returns a value; forms show only whether a name is set. - A node may resolve only secrets referenced in its own config (or delegated through handles wired into it), and only with the
credentialspermission (SECRET_NOT_PERMITTED,SECRET_ACCESS_DENIED). - Resolved values are scrubbed from traces, errors and stored outputs; sensitive keys (
api_key,password,access_token…) are redacted in summaries. - Exports, GitHub commits and deployment files contain secret names only; tests assert no value appears in any exported file.
Node permissions and trust
Every node declares permissions up front: network, filesystem, database, subprocess, credentials, artifacts, memory. Nodes get capabilities only through these: project files (artifacts), memory (memory), a storage folder (filesystem), secrets (credentials). Agent tools must need a subset of the Agent’s permissions.
Trust is assigned from the providing distribution, never self-declared:
| Trust | Who | Runs |
|---|---|---|
core |
Built-in agenticmind-nodes-* packages |
In-process |
community / private |
Installed node packages | Isolated worker processes, after an admin approves exactly the requested permissions |
verified |
Reserved until package signing exists | — |
Third-party code is never imported into the platform process. See Node packages.
Sandboxed code
Code nodes and the Code Interpreter run in a fresh Docker container by default: no network, read-only filesystem, memory/CPU/process limits, all capabilities dropped, unprivileged user. The operator, not the graph, chooses the backend. process mode is for trusted code only and is not a security boundary. See Code execution.
Network protections (SSRF)
- Web Fetch requires an explicit domain allow-list, blocks private and cloud-metadata addresses, and re-checks every redirect. (It does not defend against DNS rebinding between check and connect.)
- S3 Loader refuses endpoints resolving to link-local or metadata addresses.
- MCP HTTP targets may be localhost but not link-local/metadata;
/api/mcpchecks Host headers against an allow-list.
Databases
Read-only twice: a sqlglot policy (one SELECT, known allowed tables, no denied functions, row cap) and read-only connections where the engine supports them. Use a read-only database role anyway. See Databases.
The API guard
- Sign-in is off by default (single local user), and every dev server and
compose.yamllistens on localhost only. The API logs a warning at start-up while sign-in is off. - One ASGI middleware covers every
/apiroute, so new routes are protected by default. - Cross-site write guard (always on, even with sign-in off):
POST/PUT/PATCH/DELETErequests carrying anOriginorReferermust come from the page’s own host orAGENTICMIND_CORS_ORIGINS. A web page in your browser cannot drive your local API. - Uploads: type allow-list (no SVG), size limit, served as attachments with
nosniff. Archives have zip-bomb limits.
Accounts (when sign-in is required)
Set AGENTICMIND_AUTH=required:
- local accounts; the first account (created on the setup screen) is an admin; admins add people; roles
adminandmember; - passwords hashed with scrypt and a per-password salt; unknown usernames take the same time as wrong passwords;
- 5 failed sign-ins per username or address in 15 minutes →
429withRetry-After; - sessions: random 256-bit token in an
HttpOnly,SameSite=Laxcookie (named per port,am_session_<port>), only its SHA-256 stored, 14-day sliding expiry; password change or Sign out other browsers revokes other sessions; AGENTICMIND_COOKIE_SECURE=1behind HTTPS.
Exposing a server: checklist
AGENTICMIND_AUTH=requiredand create the admin account.- Serve over HTTPS and set
AGENTICMIND_COOKIE_SECURE=1. AGENTICMIND_BIND=0.0.0.0only after the steps above.- Set
AGENTICMIND_MCP_TOKENandAGENTICMIND_METRICS_TOKENif those endpoints are reachable. - Keep
AGENTICMIND_SANDBOX=docker; keepAGENTICMIND_LOCAL_DEPLOYoff unless every member may run containers. - Use PostgreSQL and back up the database together with the secrets key.
Known gaps
No SSO/OIDC, MFA, password-reset email, personal API tokens, per-project permissions or audit log yet. The login rate limiter is per process. Declared node permissions other than credentials are not OS-enforced for core nodes; isolation for plugins on Windows relies on the separate process, scrubbed environment and secret scoping.

