class

Enkaidu::Session

Inherits Enkaidu::Session::Macros < Enkaidu::Session::McpServers < Enkaidu::Session::SystemPrompts < Enkaidu::Session::Prompts < Enkaidu::Session::AutoLoad < Enkaidu::Session::Lifecycle < Enkaidu::Session::Toolsets < Reference < Object

The Session class manages connection setup, logging, and the processing of different types of events for user queries via the command line app

Constructors

new(renderer : Enkaidu::SessionRenderer, opts : Enkaidu::SessionOptions, unique_model_name : String | Nil = nil)
Source
new(fork_from : Session, keep_tools = true, keep_prompts = true, keep_history = true, system_prompt_name = nil, exclude_last_turn = false)

Create a new session "forked" from a given Session to create a duplicate session.

Source

Instance methods

allow_global_state?

Return based on session override

Source
allow_sub_agents?

Return based on session override

Source
allow_tool_discovery?

Return based on session override

Source
append_conversations(to : Session, which : LLM::Conversation)
Source
ask(query, attach : LLM::ChatInclusions | Nil = nil, response_json_schema : LLM::ResponseSchema | Nil = nil, render_query = false)

Query LLM using a prompt and optional attachments

Source
debug?(*args, **options)
Source
debug?(*args, **options, &)
Source
exclude_past_reasoning?

Return based on session override, or model settings

Source
queue_query(query)
Source
readonly?(*args, **options)
Source
readonly?(*args, **options, &)
Source
recorder
Source
renderer
Source
streaming?(*args, **options)
Source
streaming?(*args, **options, &)
Source
take_pending_queries
Source
transfer_tail_chats(to : Session, num = 1, filter_by_role : String | Nil = nil)
Source
usage(*args, **options)
Source
usage(*args, **options, &)
Source

Nested types