JSON Schema
https://compozy.dev/schemas/memory.json
{
"type": "object",
"required": ["id", "vector"],
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the memory"
},
"storage": {
"type": "object",
"properties": {
"use": {
"type": "string",
"description": "Storage implementation reference"
},
"config": {
"type": "object",
"description": "Storage-specific configuration"
}
},
"required": ["use", "config"]
},
"vector": {
"type": "object",
"properties": {
"use": {
"type": "string",
"description": "Vector store implementation reference"
},
"dimensions": {
"type": "number",
"description": "Vector dimensions for embeddings"
},
"config": {
"type": "object",
"description": "Vector store configuration"
}
},
"required": ["use", "dimensions", "config"]
},
"embedder": {
"type": "object",
"properties": {
"use": {
"type": "string",
"description": "Embedder implementation reference"
},
"config": {
"type": "object",
"description": "Embedder-specific configuration"
}
},
"required": ["use", "config"]
},
"options": {
"type": "object",
"properties": {
"lastMessages": {
"type": "number",
"description": "Number of recent messages to include"
},
"semanticRecall": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"default": true
},
"maxResults": {
"type": "number",
"default": 5
}
}
},
"workingMemory": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"default": false
},
"template": {
"type": "string",
"description": "XML template for structured memory"
}
}
}
}
}
}
}
Parameters
Memory configuration for the workflow.
Unique identifier for the memory.
Storage backend configuration. Defaults to in-memory if not specified. See Storage Types for available options.
Storage implementation reference (e.g., "compozy/storage:postgres")
Storage-specific configuration options. Common fields:
url: Connection URL
token: Authentication token
path: File path (for SQLite)
Vector storage configuration for semantic search. See Vector Types for available options.
Vector store implementation reference (e.g., "compozy/vector:pg-vector")
Vector dimensions for embeddings (e.g., 1536 for OpenAI embeddings)
Vector store configuration options. Common fields:
url: Connection URL
apiKey: API key for managed services
path: Local path for file-based stores
Embedder configuration for vector search. See Embedder Types for available options.
Embedder implementation reference (e.g., "compozy/embedder:openai")
Embedder-specific configuration. Common fields:
model: Model name or identifier
apiKey: API key for hosted services
project: Project ID (for cloud services)
Memory behavior configuration.
Number of recent messages to include in context
Vector search configuration options:
enabled: Enable/disable semantic search
maxResults: Maximum number of results to return
Working memory configuration:
enabled: Enable/disable working memory
template: XML template for structured memory
Memory References
memory.<id>.current_thread
Current conversation thread data. Example:{
"thread_id": "thread_123",
"messages": [
{
"role": "user",
"content": "Hello!",
"timestamp": "2024-03-20T10:30:00Z"
}
],
"metadata": {
"created_at": "2024-03-20T10:30:00Z",
"updated_at": "2024-03-20T10:30:00Z"
}
}
memory.<id>.last_messages
Recent message history based on lastMessages configuration. Example:[
{
"role": "user",
"content": "What's the weather?",
"timestamp": "2024-03-20T10:29:00Z"
},
{
"role": "assistant",
"content": "It's sunny today.",
"timestamp": "2024-03-20T10:29:30Z"
}
]
memory.<id>.semantic_search
Semantic search results. Example:[
{
"content": "Previous relevant conversation",
"similarity": 0.92,
"timestamp": "2024-03-19T15:45:00Z",
"metadata": {
"thread_id": "thread_122"
}
}
]