Ergonomic session facade backed by Jidoka.Harness.Session.
Jidoka.Harness.Session is the durable data contract. This module is the
developer-facing API for starting, running, resuming, and inspecting sessions
without reaching into the lower-level harness namespace for common workflows.
Summary
Functions
Waits for a request handle returned by chat_async/3.
Runs one turn for a session and returns final assistant text.
Starts one session chat turn asynchronously.
Fetches a persisted session from a configured session store.
Lists persisted sessions from a configured session store.
Lists pending human-review requests from a session or session store.
Returns a data-only replay view for a session.
Resumes the latest hibernated snapshot for a session.
Runs one turn for a session and returns the full harness result.
Starts a new session for an agent, spec, or plan.
Starts a new session with an explicit session id.
Writes one memory entry through the configured memory store.
Types
@type agent_input() :: module() | Jidoka.Harness.plan_input()
@type async_result() :: {:ok, Jidoka.Chat.Request.t()} | {:error, term()}
@type chat_result() :: {:ok, t(), String.t()} | {:hibernate, t(), Jidoka.Runtime.AgentSnapshot.t()} | {:error, term()}
@type opts() :: keyword()
@type request_input() :: Jidoka.Harness.request_input()
@type run_result() :: Jidoka.Harness.session_run_result()
@type session_input() :: Jidoka.Harness.session_input()
@type t() :: Jidoka.Harness.Session.t()
Functions
@spec await(Jidoka.Chat.Request.t(), opts()) :: chat_result()
Waits for a request handle returned by chat_async/3.
@spec chat(session_input(), String.t(), opts()) :: chat_result()
Runs one turn for a session and returns final assistant text.
The updated session is returned with the text so caller-managed sessions do not lose durable state when no store is configured.
@spec chat_async(session_input(), String.t(), opts()) :: async_result()
Starts one session chat turn asynchronously.
Pass stream: true to stream request-scoped Jidoka.Event values to the
caller mailbox while the request is running.
@spec get(Jidoka.Harness.Store.store(), String.t()) :: {:ok, t()} | {:error, term()}
Fetches a persisted session from a configured session store.
@spec list(Jidoka.Harness.Store.store()) :: {:ok, [t()]} | {:error, term()}
Lists persisted sessions from a configured session store.
@spec pending_reviews(t() | Jidoka.Harness.Store.store()) :: {:ok, [Jidoka.Review.Request.t()]} | {:error, term()}
Lists pending human-review requests from a session or session store.
@spec replay(t()) :: {:ok, Jidoka.Harness.Replay.t()} | {:error, term()}
Returns a data-only replay view for a session.
@spec resume(session_input(), opts()) :: run_result()
Resumes the latest hibernated snapshot for a session.
@spec run(session_input(), request_input(), opts()) :: run_result()
Runs one turn for a session and returns the full harness result.
@spec start(agent_input(), opts() | String.t()) :: {:ok, t()} | {:error, term()}
Starts a new session for an agent, spec, or plan.
The returned value is a Jidoka.Harness.Session struct. A DSL agent module is
accepted directly:
{:ok, session} = Jidoka.Session.start(MyApp.SupportAgent, "support-123")Pass store: ... to persist the session immediately.
@spec start(agent_input(), String.t(), opts()) :: {:ok, t()} | {:error, term()}
Starts a new session with an explicit session id.
@spec write_memory(t(), String.t(), opts()) :: {:ok, Jidoka.Memory.WriteResult.t()} | {:error, term()}
Writes one memory entry through the configured memory store.