Load Session
Loads an existing session to retrieve conversation state and configure artifact services.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
Inputs
- Session ID - (string) A unique identifier for the specific conversation thread to retrieve.
- App Name - (string) Identifies which agent application this conversation belongs to.
- User ID - (string) Links the conversation to a particular user.
Options
- Session Service - Session storage backend. Options:
- Memory - Temporary storage
- Database - Persistent storage in a database
- Robomotion - Managed by Robomotion API (default)
- Database URL - (string) The database connection URL, required if Session Service is set to Database.
- Artifact Service - Artifact storage backend. Options:
- Memory - Temporary storage
- GCS - Google Cloud Storage for persistent storage
- Robomotion - Managed by Robomotion API (default)
- GCS Bucket - (string) The name of the GCS bucket, required if Artifact Service is set to GCS.
- GCS Service Account - (Credentials) Service account credentials for GCS access, required if Artifact Service is set to GCS.
Outputs
- State - (object) The state data associated with this session, containing conversation context and variables.
How It Works
The Load Session node retrieves an existing conversation session:
- Input Validation - Verifies that Session ID is provided
- Auto-Detection - Detects if running in Robomotion environment for auto-configuration
- Service Selection - Connects to the appropriate session service (Memory, Database, or Robomotion)
- Session Retrieval - Loads the session using the Session ID, App Name, and User ID
- Artifact Configuration - Sets up the artifact service for the loaded session
- State Output - Returns the session's state data
Common Use Cases
- Resuming Conversations - Continue a previous conversation with an agent
- State Recovery - Retrieve conversation context and data from a previous session
- Multi-Turn Dialogues - Load session state for ongoing back-and-forth interactions
- User History - Access a user's previous interactions and preferences
- Workflow Continuation - Resume a workflow from where it left off
- Session Migration - Load sessions created in different workflows or environments
Error Handling
The node will return errors in the following cases:
- Missing required fields:
- "Session ID is required"
- "App Name is required" (for Memory and Database services)
- "User ID is required" (for Memory and Database services)
- "Database URL is required when using database session service"
- "GCS bucket is required when using GCS artifact service"
- "GCS service account is required when using GCS artifact service"
- Session not found - The specified session does not exist
- Service unavailable - Cannot connect to the storage backend
- Authentication failure - Invalid credentials for database or GCS
- Robomotion context error - "Robomotion Session Service can only work with Agents and Application robots"
- Permission errors - Insufficient permissions to access the session
Usage Notes
- Session ID Required - Unlike Create Session, Load Session always requires a Session ID
- Service Consistency - Load the session using the same service type it was created with
- Auto-Detection - When using Robomotion services, App Name and User ID may be auto-detected from context
- State Availability - The loaded state contains all variables and context from the session's history
- Artifact Access - After loading, you can access artifacts stored in the session using artifact nodes
- Service Configuration - Both session and artifact services must be configured to match the session's storage
- GCS Credentials - For GCS artifact service, provide valid service account credentials
Service Compatibility
Ensure you load sessions with the correct service configuration:
- Memory sessions - Use Session Service: Memory
- Database sessions - Use Session Service: Database with the same Database URL
- Robomotion sessions - Use Session Service: Robomotion
Example Usage
Loading a session from Memory:
- Session ID:
"session-abc123" - App Name:
"customer-support" - User ID:
"user-12345" - Session Service: Memory
- Artifact Service: Memory
Loading a session from Robomotion:
- Session ID:
"session-xyz789" - App Name:
"sales-assistant"(or auto-detected) - User ID:
"user-67890"(or auto-detected) - Session Service: Robomotion
- Artifact Service: Robomotion
Loading a session from Database with GCS artifacts:
- Session ID:
"session-def456" - App Name:
"data-analyzer" - User ID:
"user-11111" - Session Service: Database
- Database URL:
"postgresql://user:pass@localhost:5432/agents" - Artifact Service: GCS
- GCS Bucket:
"my-artifacts-bucket" - GCS Service Account: (credentials from vault)
Best Practices
- Session ID Persistence - Store Session IDs in a database or user context to retrieve conversations later
- Error Handling - Enable Continue On Error if the session might not exist
- Service Matching - Always use the same service configuration as when the session was created
- State Validation - Check that the loaded state contains expected keys before using it
- Artifact Cleanup - Consider cleaning up old artifacts when loading sessions to manage storage