Skip to content

Documentation / @agentick/core / SessionManagementOptions

Interface: SessionManagementOptions ​

Defined in: core/src/app/types.ts:407

Session management configuration.

Controls how the App manages session lifecycles including persistence, limits, and auto-cleanup.

Properties ​

idleTimeout? ​

optional idleTimeout: number

Defined in: core/src/app/types.ts:445

Milliseconds of inactivity before evicting a session from memory. Activity is tracked via send(), render(), queue(), and channel publish. Set to 0 or undefined to disable idle eviction.


maxActive? ​

optional maxActive: number

Defined in: core/src/app/types.ts:438

Maximum number of active (in-memory) sessions. When exceeded, the least-recently used session is evicted from memory. Evicted sessions can be restored from store via app.session(id).

Default ​

ts
unlimited

store? ​

optional store: StoreConfig

Defined in: core/src/app/types.ts:430

Storage adapter for session snapshots.

Can be:

  • A file path string for SQLite storage (e.g., './sessions.db')
  • ':memory:' for in-memory SQLite
  • A { type: 'sqlite', ... } config object
  • A custom SessionStore implementation

When configured, snapshots auto-save after each execution and auto-restore on app.session(id).

Examples ​

typescript
sessions: { store: './data/sessions.db' }
typescript
sessions: { store: new RedisSessionStore(redis) }

Released under the ISC License.