MemMachine Configuration
MemMachine’s configuration is managed through acfg.yml file, which allows for fine-tuning various aspects of the system. The new configuration structure, introduced in v0.2, emphasizes modularity and centralized resource definitions, making it easier to manage and scale your memory solutions.
All configuration items are organized under top-level keys in the cfg.yml file. References between components are made using string IDs, promoting reusability and clarity.
To see a complete example of a potential cfg.yml file, check out GPU-based Sample Config File.
Configuration Sections
Logging
Logging
Manages the path and level of application logging.Parameters:
- Parameters
- With Comments
| Parameter | Description | Default |
|---|---|---|
path | The file path to write logs to. If empty, logs are sent to stdout. | MemMachine.log |
level | The minimum level of messages to log. | info |
Episode Store
Episode Store
Configuration for the database storing raw episode data.Parameters:
- Parameter
- With Comment
| Parameter | Description | Default |
|---|---|---|
database | The ID of a database defined in resources.databases for episode storage. | Required |
Episodic Memory
Episodic Memory
Configuration for the episodic memory service, which handles event-based memories.Parameter Descriptions:
- Parameters
- With Comments
| Parameter | Description | Default |
|---|---|---|
long_term_memory.vector_graph_store | The ID of a database defined in resources.databases for long-term storage. | Required |
long_term_memory.embedder | The ID of an embedder defined in resources.embedders for creating embeddings. | Required |
long_term_memory.reranker | The ID of a reranker defined in resources.rerankers for search result re-ranking. | Required |
short_term_memory.llm_model | The ID of a language model defined in resources.language_models for summarization. | Required |
short_term_memory.message_capacity | The maximum character capacity for short-term memory. | 64000 |
Semantic Memory
Semantic Memory
Configuration for the semantic memory service, which handles declarative, knowledge-based memories.Parameters:
- Parameters
- With Comments
| Parameter | Description | Default |
|---|---|---|
llm_model | The ID of a language model defined in resources.language_models for semantic processing. | Required |
embedding_model | The ID of an embedder defined in resources.embedders for creating embeddings. | Required |
database | The ID of a database defined in resources.databases for semantic storage. | Required |
Session Manager
Session Manager
Configuration for the session management database.Parameters:
- Parameter
- With Comment
| Parameter | Description | Default |
|---|---|---|
database | The ID of a database defined in resources.databases for session data storage. | Required |
Prompt
Prompt
Manages the default prompts used for various memory types.Parameter Description:
- Parameter
- With Comment
| Parameter | Description | Default |
|---|---|---|
profile_prompt | List of predefined prompt IDs for semantic user profile memory. | ["profile_prompt", "writing_assistant_prompt"] |
Resources
Resources
This section centralizes the definitions of various external resources, which can then be referenced by ID in other parts of the configuration.Parameter Descriptions:
Parameter Descriptions:
Parameters for each language model ID (
Parameter Descriptions:
Databases
Defines connections to various database backends (Neo4j, PostgreSQL, SQLite).- Parameters
- With Comments
| Parameter | Description | Default |
|---|---|---|
provider | The database provider type: neo4j, postgres, or sqlite. | Required |
config | A dictionary containing provider-specific configuration. | Required |
config.host | Hostname for the database (e.g., localhost). | Depends on provider |
config.port | Port number for the database connection. | Depends on provider |
config.user | Username for database authentication. | Depends on provider |
config.db_name | Database name (for postgres). | Depends on provider |
config.password | Password for database authentication. | Depends on provider |
config.uri | The URI for the given database. | Depends on provider |
config.path | The path for the given database. | Depends on provider |
config.username | Username for internal graph store authentication. | Depends on provider |
my_storage_id | The specific configuration for the system’s internal graph store. | Required |
sqlite_test | The configuration for the SQLite database used for testing. | Required |
Embedders
Defines various embedding models, which can be used to generate vector representations of text.- Parameters
- With Comments
| Parameter | Description | Default |
|---|---|---|
Embedder ID | The embedder ID: openai_embedder, aws_embedder_id, ollama_embedder. | Required |
provider | The embedder provider type: openai, amazon-bedrock. | Required |
config | A dictionary containing provider-specific configuration. | Required |
config.model | Model name (e.g., text-embedding-3-small for OpenAI, nomic-embed-text for Ollama). | Depends on provider |
config.api_key | API key for OpenAI. | Required for OpenAI |
config.base_url | Base URL for OpenAI. | Required for OpenAI |
config.dimensions | Defines the length of the vector generated for the input text. | Required for OpenAI |
config.region | AWS region for Bedrock. | Required for Bedrock |
config.aws_access_key_id | AWS access key ID for Bedrock. | Required for Bedrock |
config.aws_secret_access_key | AWS secret access key for Bedrock. | Required for Bedrock |
config.model_id | Bedrock model ID. | Required for Bedrock |
similarity_metric | Defines the mathematical method used to compare two vectors for relevance (e.g., cosine). | Required for Bedrock |
Language Models
Defines various language models for tasks like summarization and generation.- Parameters
- With Comments
openai_model, aws_model, ollama_model):| Parameter | Description | Default |
|---|---|---|
provider | The language model provider type: openai-responses, openai-chat-completions, amazon-bedrock. | Required |
config | A dictionary containing provider-specific configuration. | Required |
config.model | Model name (e.g., gpt-4o-mini for OpenAI). | Depends on provider |
config.api_key | API key for OpenAI. | Required for OpenAI |
config.base_url | The base URL for the model | Depends on provider |
config.region | AWS region for Bedrock. | Required for Bedrock |
config.aws_access_key_id | AWS access key ID for Bedrock. | Required for Bedrock |
config.aws_secret_access_key | AWS secret access key for Bedrock. | Required for Bedrock |
config.model_id | Bedrock model ID. | Required for Bedrock |
Rerankers
Defines various reranking strategies used to reorder search results for improved relevance.- Parameters
- With Comments
| Parameter | Description | Default |
|---|---|---|
my_reranker_id | The reranker and reranker types you specify. | Required |
provider | The reranker provider type: bm25, amazon-bedrock, cross-encoder, embedder, identity, rrf-hybrid. | Required |
config | A dictionary containing provider-specific configuration. | Required |
config.reranker_ids | List of reranker IDs to combine for rrf-hybrid. | Required for rrf-hybrid |
config.model_name | Model name for cross-encoder. | Depends on provider |
config.embedder_id | ID of an embedder for embedder reranker. | Required for embedder |
config.region | AWS region for Bedrock. | Required for Bedrock |
config.aws_access_key_id | AWS access key ID for Bedrock. | Required for Bedrock |
config.aws_secret_access_key | AWS secret access key for Bedrock. | Required for Bedrock |
config.model_id | Bedrock model ID. | Required for Bedrock. |
Proxy Configuration
If you are deploying MemMachine behind a corporate proxy, you may need to configure it to route traffic through your proxy server and trust custom Certificate Authorities (CAs).Docker Compose
To configure proxies in a Docker Compose setup, add theHTTP_PROXY, HTTPS_PROXY, and SSL_CERT_FILE environment variables to your service definitions. You may also need to mount a custom CA certificate if your proxy performs SSL inspection.
Add the following to your docker-compose.yml for the memmachine service:
Standard Installation (Pip/Source)
If you are running MemMachine directly on your host machine (e.g., usingpip or from source), simply export the standard environment variables before starting the application.
Linux/MacOS:

