Chat Memory¶
Memory providers store conversation history for AI agents. Select one with the memory.kind property.
Available Providers¶
| Name | Description |
|---|---|
infinispan | Distributed storage using Infinispan |
redis | Persistent storage using Redis |
message-window | In-memory storage with configurable message window size |
Message Window¶
In-memory sliding window that retains the last N messages. Simple and fast — no external infrastructure needed.
forage.myAgent.agent.features=memory
forage.myAgent.agent.memory.kind=message-window
forage.myAgent.agent.memory.max.messages=20
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
forage.memory.message-window.max.messages | Maximum number of messages to retain in memory | integer | 10 |
Redis¶
Persistent conversation storage using Redis. Conversations survive application restarts.
forage.myAgent.agent.features=memory
forage.myAgent.agent.memory.kind=redis
forage.myAgent.agent.memory.redis.host=localhost
forage.myAgent.agent.memory.redis.port=6379
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
forage.redis.host | Redis server hostname or IP address | string | localhost | Yes |
forage.redis.port | Redis server port number | integer | 6379 | Yes |
forage.redis.database | Redis database number to connect to | integer | 0 |
Security
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
forage.redis.password | Redis authentication password (optional) | password |
Advanced
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
forage.redis.timeout | Connection timeout in milliseconds | integer | 2000 | |
forage.redis.pool.max-total | Maximum number of connections in the pool | integer | 10 | |
forage.redis.pool.max-idle | Maximum number of idle connections in the pool | integer | 5 | |
forage.redis.pool.min-idle | Minimum number of idle connections in the pool | integer | 1 | |
forage.redis.pool.test-on-borrow | Test connections when borrowing from pool | boolean | true | |
forage.redis.pool.test-on-return | Test connections when returning to pool | boolean | true | |
forage.redis.pool.test-while-idle | Test idle connections periodically | boolean | true | |
forage.redis.pool.max-wait-millis | Maximum time to wait for a connection from the pool in milliseconds | integer | 2000 |
Infinispan¶
Distributed conversation storage using Infinispan. Suitable for clustered deployments.
forage.myAgent.agent.features=memory
forage.myAgent.agent.memory.kind=infinispan
forage.myAgent.agent.memory.infinispan.host=localhost
forage.myAgent.agent.memory.infinispan.port=11222
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
forage.infinispan.server-list | Comma-separated list of Infinispan server addresses in format 'host1:port1,host2:port2' | string | localhost:11222 | Yes |
forage.infinispan.cache-name | Name of the cache for storing chat messages | string | chat-memory | Yes |
Security
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
forage.infinispan.username | Username for authentication (optional) | string | ||
forage.infinispan.password | Password for authentication (optional) | password | ||
forage.infinispan.realm | Security realm for authentication | string | default | |
forage.infinispan.sasl-mechanism | SASL mechanism for authentication | string | DIGEST-MD5 |
Advanced
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
forage.infinispan.connection-timeout | Connection timeout in milliseconds | integer | 60000 | |
forage.infinispan.socket-timeout | Socket timeout in milliseconds | integer | 60000 | |
forage.infinispan.max-retries | Maximum number of connection retries | integer | 3 | |
forage.infinispan.pool.max-active | Maximum number of active connections per server | integer | 20 | |
forage.infinispan.pool.min-idle | Minimum number of idle connections per server | integer | 1 | |
forage.infinispan.pool.max-wait | Maximum time to wait for a connection in milliseconds | integer | 3000 |