> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aegismemory.com/llms.txt
> Use this file to discover all available pages before exploring further.

# What is Aegis Memory?

> The secure context engineering layer for AI agents

# Aegis Memory

**Aegis Memory** is an open-source, self-hostable context engineering layer for production AI agents. It provides content security, integrity verification, and trust hierarchy — plus persistent, semantic memory that survives context window resets.

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/quickstart/installation">
    Get running in 5 minutes
  </Card>

  <Card title="Why Aegis?" icon="lightbulb" href="/introduction/why-aegis">
    Understand the problem we solve
  </Card>

  <Card title="Core Concepts" icon="book" href="/introduction/concepts">
    Learn the fundamentals
  </Card>

  <Card title="Tutorials" icon="graduation-cap" href="/tutorials">
    Build real-world examples
  </Card>
</CardGroup>

## The Problem

Every AI agent framework promises memory. Few deliver.

```python theme={null}
# What happens today
agent.chat("I'm John, a Python developer")
# ... context window resets ...
agent.chat("What's my name?")  # "I don't know your name"
```

After analyzing 200+ production agent deployments, we found **40-80% fail due to memory coordination issues**—not model capability.

| Problem               | Reality                                    |
| --------------------- | ------------------------------------------ |
| Context loss mid-task | Agents forget what they learned            |
| No shared state       | Multi-agent teams can't coordinate         |
| Memory bloat          | Everything saved, nothing useful retrieved |
| Session boundaries    | Long tasks restart from zero               |

## The Solution

Aegis Memory provides:

<Steps>
  <Step title="Content Security">
    4-stage pipeline: input validation, PII scanning, injection detection, LLM classification
  </Step>

  <Step title="Integrity & Trust">
    HMAC-SHA256 tamper detection, OWASP 4-tier trust hierarchy, cryptographic agent binding
  </Step>

  <Step title="Context Quality">
    ACE patterns — self-improving agents that learn what works (voting, reflections, playbooks)
  </Step>

  <Step title="Multi-Agent Coordination">
    Scoped memory sharing with structured handoffs and access boundaries
  </Step>
</Steps>

## Quick Example

```python theme={null}
from aegis_memory import AegisClient

client = AegisClient(api_key="your-key")

# Store a memory
client.add(
    content="User prefers dark mode and Python",
    agent_id="assistant",
    user_id="john_123"
)

# Later, retrieve relevant context
memories = client.query(
    "What are John's preferences?",
    user_id="john_123"
)
# Returns: "User prefers dark mode and Python"
```

## Framework Integrations

Aegis works with your existing agent stack:

<CardGroup cols={3}>
  <Card title="CrewAI" icon="users" href="/integrations/crewai">
    Multi-agent teams
  </Card>

  <Card title="LangChain" icon="link" href="/integrations/langchain">
    Chains & agents
  </Card>

  <Card title="LangGraph" icon="diagram-project" href="/integrations/langgraph">
    Stateful workflows
  </Card>
</CardGroup>

## Open Source

Aegis Memory is fully open source under the Apache 2.0 license.

<Card title="GitHub Repository" icon="github" href="https://github.com/quantifylabs/aegis-memory">
  Star us on GitHub
</Card>
