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 thestore section to your aegra.json:
Options
| Option | Type | Required | Description |
|---|---|---|---|
dims | integer | Yes | Embedding vector dimensions (must match your model) |
embed | string | Yes | Embedding model in format provider:model-id |
fields | list[str] | No | JSON fields to embed (default: ["$"] for entire document) |
Fields configuration
Thefields option controls which parts of your documents get embedded:
| Value | Behavior |
|---|---|
["$"] (default) | Embed the entire document as one unit |
["text", "summary"] | Embed only these top-level fields |
["metadata.title", "content.text"] | JSON path notation for nested fields |
index parameter.
Supported embedding providers
The format isprovider: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.
| Provider | Model | Dimensions | Config value |
|---|---|---|---|
| OpenAI | text-embedding-3-small | 1536 | openai:text-embedding-3-small |
| OpenAI | text-embedding-3-large | 3072 | openai:text-embedding-3-large |
| AWS Bedrock | amazon.titan-embed-text-v2:0 | 1024 | bedrock:amazon.titan-embed-text-v2:0 |
| Cohere | embed-english-v3.0 | 1024 | cohere:embed-english-v3.0 |
.env:
Usage
Storing items
Semantic search
Database requirements
Semantic store requires PostgreSQL with the pgvector extension. Use the recommended Docker image:Verification
After starting with semantic store configured, you should see this log:Backward compatibility
If nostore.index configuration is provided, Aegra operates in basic key-value mode. Existing deployments continue to work without changes.
Troubleshooting
pgvector extension not found
pgvector extension not found
Make sure you’re using a PostgreSQL image with pgvector installed:
pgvector/pgvector:pg18.Invalid embedding model
Invalid embedding model
Verify the
embed format is correct (provider:model-id) and the corresponding API key is set in your .env.Dimension mismatch
Dimension mismatch
The
dims value must match your embedding model’s output dimensions exactly. For example, text-embedding-3-small outputs 1536-dimensional vectors.