Overview
The session store acts as a persistent key-value storage system that maintains state between different sessions and workflow executions. Access the store up to 7 days after workflow run.Key Features
The session store provides:- Persistent Storage: Data persists across workflow runs and sessions.
- Key-Value Structure: Simple interface for storing and retrieving data
- Session Isolation: Each workflow session has its own isolated storage space
- Type Safety: Full TypeScript support for stored data types
- Real-time Access: Instantly read data during workflow execution
How It Works
Typescript SDK
- Data is isolated per workflow session
- Multiple workflows can have their own independent stores
- Data persists until explicitly cleared or the session expires
- Stores are accessible throughout the entire workflow lifecycle
Let agents modify session store
Use session store agent tools to prompt the agent to store important information. For example, your prompt may include:Best Practices
- Use Meaningful Keys: Choose descriptive key names that clearly indicate the stored data
- Handle Missing Data: Always check if data exists before using it
- Clean Up: Remove unnecessary data to keep storage efficient
- Type Your Data: Use TypeScript interfaces for complex stored objects
- Consider Expiry: Session store data expires 7 days after workflow run. Download relevant files to your database before expiration.
API Reference
For detailed API documentation on using the session store, see:- Get Session Store API - Retrieve stored data
- Downloaded File Management - Retrieve downloaded files