MemoGrafterAgent
close()
Release database, Redis, and queue resources owned by the agent.
What it does
Release database, Redis, and queue resources owned by the agent.
When to use it
Call during graceful shutdown, preferably in a
finally block or process-shutdown hook.Signature
TypeScript
close(): Promise<void>Behavior
Waits for owned resource shutdown and releases database, cache, and queue connections. It does not delete memory.
Side effects and completion
The instance must not be used for new operations after it is closed.
Example
example.ts
await agent.close();