Skip to main content

Connection

These are the only variables most users need:
VariableDescription
AMFS_HTTP_URLYour AMFS API URL (e.g. https://amfs-login.sense-lab.ai)
AMFS_API_KEYYour API key (from Dashboard → Settings → API Keys)
When AMFS_HTTP_URL is set, all memory operations route through the authenticated HTTP API.

Agent Identity

VariableDescriptionDefault
AMFS_AGENT_IDOverride auto-detected agent identity (for CI, scripts, servers)Auto-detected
AMFS_NAMESPACEMemory namespace for isolationdefault
Identity is auto-detected from the IDE environment (Cursor, Claude Code). Set AMFS_AGENT_ID explicitly in headless environments like CI or deploy scripts.

MCP Server

VariableDescriptionDefault
AMFS_TRANSPORTTransport protocol: stdio or httpstdio
AMFS_HOSTMCP HTTP server bind host0.0.0.0
AMFS_PORTMCP HTTP server bind port8000
AMFS_PATHMCP HTTP server URL path/mcp
AMFS_TTL_SWEEP_INTERVALSeconds between TTL sweep runs

Pro Features

VariableDescriptionDefault
AMFS_TRACE_SIGNING_KEYHMAC key for immutable trace integrity (traces are signed and Merkle-chained)
AMFS_OTEL_ENDPOINTOpenTelemetry collector endpoint (gRPC)http://localhost:4317
AMFS_OTEL_SERVICE_NAMEService name for OTel spansamfs
AMFS_AUTO_EXTRACTEnable automatic entity/relationship extraction from tracesfalse
AMFS_EXTRACTION_MODELLLM model for extractiongpt-4o-mini
AMFS_EXTRACTION_PROVIDERLLM provider (openai, anthropic)openai
AMFS_CORTEX_LLM_MODELLLM model for narrative digest compilationgpt-4o-mini
AMFS_ML_MODEL_DIRDirectory for learned ranking model checkpoints

Auto-Detection (Read-Only)

These are set by IDEs and read by AMFS for agent identity detection. You don’t set these yourself.
VariableSet ByUsed For
CURSOR_SESSION_IDCursorDetecting Cursor environment
VSCODE_PIDVS Code / CursorDetecting VS Code/Cursor environment
CLAUDE_CODE_SESSIONClaude CodeDetecting Claude Code environment

Self-Hosted Only

These variables are for self-hosted AMFS deployments. You don’t need them on the managed platform.
VariableDescriptionDefault
AMFS_POSTGRES_DSNPostgres connection string
AMFS_DATA_DIRFilesystem data directory.amfs
AMFS_S3_BUCKETS3 bucket name
AMFS_S3_PREFIXS3 object key prefixamfs/
AMFS_S3_ENDPOINTCustom S3 endpoint (ACS, MinIO, R2)
AWS_DEFAULT_REGIONAWS regionus-east-1
AWS_ACCESS_KEY_IDAWS access key
AWS_SECRET_ACCESS_KEYAWS secret key
AMFS_HTTP_HOSTHTTP server bind host0.0.0.0
AMFS_HTTP_PORTHTTP server bind port8080
AMFS_API_KEYSComma-separated API keys (self-hosted auth)
AMFS_CORS_ORIGINSCORS allowed origins*
AMFS_CONNECTOR_{NAME}_SECRETHMAC secret for webhook connector verification
AMFS_CORTEX_DEBOUNCE_MSDigest recompilation debounce (ms)3000
AMFS_PRO_URLPro API URL for hybrid deployments
AMFS_PRO_API_KEYAPI key for the Pro API
AMFS_API_URLDashboard: AMFS server URL (server-side)http://localhost:8080
NEXT_PUBLIC_AMFS_API_URLDashboard: AMFS server URL (client-side)
AMFS_ROOTDashboard: path to .amfs directory
AMFS_DEMODashboard: force demo modefalse
AMFS_TEST_PG_DSNPostgres DSN for integration tests