Skip to main content
Configuration is minimal. Two environment variables connect you; everything else has sensible defaults.

Environment Variables

VariableDescriptionRequired
AMFS_HTTP_URLYour AMFS API URL (e.g. https://amfs-login.sense-lab.ai)Yes
AMFS_API_KEYYour API key (from Dashboard → Settings → API Keys)Yes
AMFS_AGENT_IDOverride auto-detected agent identity (for CI, scripts, servers)No
When AMFS_HTTP_URL is set, the SDK and MCP server route all operations through the authenticated HTTP API. No config files, no adapter setup, no database connection strings.
export AMFS_HTTP_URL="https://amfs-login.sense-lab.ai"
export AMFS_API_KEY="<your-api-key>"

SDK Options

When using the Python SDK directly, pass options to the constructor:
from amfs import AgentMemory

mem = AgentMemory(
    agent_id="checkout-agent",
    decay_half_life_days=30.0,
)
ParameterTypeDescription
agent_idstrIdentity for this agent (required)
session_idstrSession identifier; auto-generated if omitted
ttl_sweep_intervalfloatSeconds between TTL sweep runs
decay_half_life_daysfloatConfidence decay half-life in days
conflict_policyConflictPolicyHow to handle concurrent write conflicts
The SDK auto-detects the HTTP adapter when AMFS_HTTP_URL is set — no adapter configuration needed.

Agent Identity

Agents are identified by their agent_id. This determines:
  • Who gets credit for writes (provenance)
  • What shows up in the Dashboard
  • How recall() and my_entries() scope results
MCP agents should call amfs_set_identity at the start of each session. Without it, identity is auto-detected from the IDE environment:
EnvironmentDetected ID
Cursorcursor/<username>
Claude Codeclaude-code/<username>
AMFS_AGENT_ID setvalue of AMFS_AGENT_ID
Fallbackagent/<username>
SDK and REST clients pass agent_id in the constructor or header.

Scoped API Keys

API keys can be restricted to specific entity paths and permissions:
amfs_sk_live_abc123  →  checkout-service/**  [READ_WRITE]
                        shared/patterns/*     [READ]
Create and manage scoped keys in Dashboard → Settings → API Keys. Use the narrowest scope that works — one key per agent or service.

Namespaces

Namespaces isolate memory between environments. Entries in different namespaces don’t see each other. Namespaces are managed through the Dashboard. The default namespace is default.

Next Steps

Quick Start

Write, read, and search memory.

MCP Setup

Connect your IDE to AMFS.

Core Concepts

How AMFS works under the hood.

Environment Variables

Full reference with all options.