Skip to main content
Bot platform adapters now ship in the praisonai-bot package. praisonai bot serve still works exactly as documented here; for a standalone install see praisonai-bot Migration.
The user returns after idle time; session reset clears stale history so the agent starts fresh. Session reset policies automatically clear bot conversation history after inactivity or at a scheduled time, preventing unbounded context growth.

Quick Start

1

Idle reset after 30 minutes

2

Daily reset at 04:00

3

Combined idle + daily


How It Works

Reset checks run in BotSessionManager._load_history() before reusing existing history: Idle timestamps are tracked per user. Idle timeout uses monotonic time; daily reset uses wall-clock hour.

Reset Modes


Configuration Options

Configure under each channel’s session.reset block in gateway.yaml or bot.yaml.

Common Patterns

Customer support — drop stale conversations when the customer leaves:
Daily briefing bot — fresh start each midnight:
Compliance bot — idle timeout plus nightly sweep:

Best Practices

Session Reset Policy (this feature) clears a user’s conversation history based on idle or scheduled time — configured per channel in YAML.Session Reaper (session_ttl on BotConfig) prunes the in-memory session record of stale users. They solve different problems; use both for long-running bots.
Combine session.max_history with reset policies to cap context size and cost. Reset clears history entirely; max_history trims retained turns during an active session; session.compaction summarises older turns instead of dropping them. See Bot Session Compaction.
Users can always send /new for an immediate reset. Manual reset works alongside automatic policies — see Bot Commands.

Messaging Bots

Multi-platform bot setup and YAML config

Bot Commands

Built-in /new, /help, and /status commands

Sessions

Agent-level session management

Session Persistence

Persisting session state to disk

Bot Session Compaction

Summarise old turns instead of dropping them