Skip to main content

LangChain Integration

Aegis Memory provides a LangChain-compatible memory class that enables semantic search and cross-session persistence.

Installation

Basic Usage

Use AegisMemory within any LangChain chain:

Async (LangGraph / FastAPI)

For async orchestration (LangGraph async nodes, FastAPI endpoints), use AsyncAegisClient:
The async client keeps API parity for add/query/vote/session/feature workflows while remaining event-loop friendly.

Features

Semantic Retrieval

Automatically performs semantic search to retrieve relevant context

Cross-Session

Memories persist across sessions and application restarts

Scoped Access

Control visibility with agent-private, agent-shared, or global scopes

Message Support

Return messages or formatted strings based on your needs

Advanced Configuration

With LangChain Agents

Next Steps

Smart Memory

Automatic extraction for conversations

ACE Patterns

Self-improvement patterns