Skip to main content
Aegra supports semantic similarity search through the LangGraph Store API using PostgreSQL with pgvector. This lets agents store and retrieve information based on meaning rather than exact keyword matches.

Use cases

  • Conversational memory — Agents recall past interactions semantically
  • RAG applications — Store and retrieve knowledge documents by similarity
  • Personalization — Remember user preferences and retrieve them contextually
  • Multi-tenant search — Namespaced semantic search per user or tenant

Configuration

Add the store section to your aegra.json:

Options

Fields configuration

The fields option controls which parts of your documents get embedded: Documents missing specified fields are still stored but won’t have embeddings for those fields. You can also override which fields to embed at put time using the index parameter.

Supported embedding providers

The format is provider:model-id. The provider is determined by splitting on the first colon, so bedrock:amazon.titan-embed-text-v2:0 is parsed as provider bedrock with model amazon.titan-embed-text-v2:0. Set the appropriate API key in your .env:

Usage

Storing items

Database requirements

Semantic store requires PostgreSQL with the pgvector extension. Use the recommended Docker image:
Aegra automatically creates the necessary tables and indexes during startup.

Verification

After starting with semantic store configured, you should see this log:

Backward compatibility

If no store.index configuration is provided, Aegra operates in basic key-value mode. Existing deployments continue to work without changes.

Troubleshooting

Make sure you’re using a PostgreSQL image with pgvector installed: pgvector/pgvector:pg18.
Verify the embed format is correct (provider:model-id) and the corresponding API key is set in your .env.
The dims value must match your embedding model’s output dimensions exactly. For example, text-embedding-3-small outputs 1536-dimensional vectors.