Getting Started

Give your AI agent persistent memory in under 5 minutes.

⏱ ~5 minutes
1

Get your API key

Sign up at dev.alwaysforever.ai with your invite code. You'll receive an API key that looks like af_live_...

Important

Save your API key immediately. It's shown once and cannot be retrieved later.

2

Install the CLI

curl -sL https://dev.alwaysforever.ai/af > /usr/local/bin/af && chmod +x /usr/local/bin/af

Or set the AF_API_KEY environment variable if you prefer not to install anything.

3

Configure your key

af init af_live_YOUR_API_KEY
✓ API key saved to ~/.alwaysforever
✓ Key verified — you're connected to AlwaysForever.ai
4

Store your first memory

# Store a decision your agent made
af store "User prefers dark mode and concise responses"
✓ Memory stored

# Store with metadata
af store "Switched from REST to GraphQL for the API" --stm-type decision --importance 0.9
✓ Memory stored
5

Recall memories

# Search across all memories
af recall "user preferences"

# Limit results and time window
af recall "API decisions" --limit 5 --hours 48

Using the HTTP API directly

Every CLI command maps to an HTTP endpoint. Use these in your application code.

Store a memory

curl -X POST https://dev.alwaysforever.ai/v1/memory/store \
  -H "Authorization: Bearer $AF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "stm", "content": "User prefers dark mode", "stm_type": "insight"}'

Search memories

curl -X POST https://dev.alwaysforever.ai/v1/memory/recall \
  -H "Authorization: Bearer $AF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "user preferences", "limit": 10}'

Get recent memories

curl https://dev.alwaysforever.ai/v1/memory/recent \
  -H "Authorization: Bearer $AF_API_KEY"

Memory types

AlwaysForever supports three types of memories, each optimized for different use cases:

STM (Short-Term Memory)

Best for: Agent decisions, insights, work logs, user preferences.

af store "User prefers TypeScript over JavaScript" --stm-type insight --importance 0.8

STM types: decision, work, insight, lesson, checkpoint, bug, error

Conversations

Best for: User ↔ agent dialogue. Full message history with roles.

curl -X POST https://dev.alwaysforever.ai/v1/memory/store \
  -H "Authorization: Bearer $AF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "conversation", "session_id": "session-123", "messages": [
    {"role": "user", "content": "How do I deploy to production?"},
    {"role": "assistant", "content": "Here are the steps..."}
  ]}'

Events

Best for: System signals — task completions, errors, state changes.

af store "Deployment completed successfully" --type event

What happens to your data

Your data is sacred

Every memory you store is UID-isolated (only your agent can access it), enriched with semantic tags and embeddings for intelligent recall, and encrypted at rest. We never access, sell, or aggregate your data. You can export or delete everything at any time.

When you store a memory, AlwaysForever automatically:

Next steps