Constructor
| Option | Type | Description |
|---|---|---|
cacheKeyPrefix | string | Key prefix for cache entries (default: "illa:sdk:ctx") |
cacheEntryOptions | CacheEntryOptions | Default TTL settings forwarded to the cache |
defaultToolsConfig | ToolAutorouterRequest | Default tool routing config returned when no data is stored |
Methods
getContext(chatId): Promise<{ messages, toolsConfig }>clearContext(chatId): Promise<void>setMessages(chatId, messages): Promise<void>appendMessages(chatId, messages): Promise<void>setToolsConfig(chatId, toolsConfig): Promise<void>deleteContext(chatId): Promise<void>
clearContextresets message history and tools config to defaults for a chat but keeps the chat ID registered. UsedeleteContextto remove everything including the cache entry.- The manager deep‑clones stored data to avoid accidental mutation by callers.