org.llm4s.assistant
Members list
Type members
Classlikes
Interactive assistant agent that wraps the existing Agent functionality in a user-friendly conversational loop with session management using functional programming principles.
Interactive assistant agent that wraps the existing Agent functionality in a user-friendly conversational loop with session management using functional programming principles.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Immutable configuration for console interface
Immutable configuration for console interface
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ConsoleConfig.type
Handles console-based user interface using functional programming principles
Handles console-based user interface using functional programming principles
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
MessageType.type
Information about a saved session file.
Information about a saved session file.
Contains metadata about a persisted session including file location and statistics about the conversation.
Value parameters
- created
-
Timestamp when the session was created
- filePath
-
Path to the session JSON file
- fileSize
-
Size of the session file in bytes
- id
-
Unique session identifier
- messageCount
-
Number of messages in the conversation
- title
-
Human-readable session title
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
SessionInfo.type
Manages session persistence for the interactive assistant.
Manages session persistence for the interactive assistant.
SessionManager handles saving and loading conversation sessions to disk, enabling users to resume previous conversations and maintain context across multiple interactions.
== Key Features ==
- '''Session Save''': Persists AgentState as JSON with markdown companion
- '''Session Load''': Restores sessions with tool registry reconstruction
- '''Session Listing''': Shows recent sessions sorted by modification time
- '''Filename Sanitization''': Safely handles special characters in titles
== Storage Format == Sessions are stored as two files:
{title}.json- Machine-readable session state for loading{title}.md- Human-readable markdown for viewing/sharing
== Usage Example ==
val manager = new SessionManager(DirectoryPath("/path/to/sessions"), agent)
// Save current session
val info = manager.saveSession(sessionState, Some("My Conversation"))
// List recent sessions
val sessions = manager.listRecentSessions(limit = 5)
// Load a previous session
val loaded = manager.loadSession("My Conversation", tools)
Value parameters
- agent
-
Agent instance for markdown formatting
- sessionDir
-
Directory path where sessions are stored
Attributes
- See also
-
SessionState for the state being persisted
SessionInfo for session metadata returned after save
- Supertypes
-
class Objecttrait Matchableclass Any
Represents the state of an interactive assistant session.
Represents the state of an interactive assistant session.
Encapsulates the agent state, session identity, and metadata for persistence and session management.
Value parameters
- agentState
-
Optional underlying agent state with conversation history
- created
-
Timestamp when the session was created
- sessionDir
-
Directory path for session file storage
- sessionId
-
Unique identifier for this session
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
SessionState.type
Summary of a session for listing and display purposes.
Summary of a session for listing and display purposes.
Lightweight representation of a session containing only essential information for session selection UI.
Value parameters
- created
-
Timestamp when the session was created
- filename
-
Base filename of the session file
- id
-
Unique session identifier
- title
-
Human-readable session title
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
SessionSummary.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ShowInstances.type