An agent core for Elixir apps: pi-agent-core's loop (Rho.Loop), omp/pi JSONL sessions (Rho.Session), compaction, tools, and model sign-in (subscription OAuth or API keys, Rho.Auth) on req_llm.

A host starts Rho.Supervisor in its own supervision tree, then a loop per session with start_loop/1. What a host can (or on a phone, must) provide is in Rho.Config.

Summary

Functions

The system prompt a loop uses when neither it nor config :rho, :system_prompt sets one.

Starts a loop under Rho.Supervisor's loop supervisor. opts are Rho.Loop.start_link/1's; without :session, a new session in Rho.Session.dir/0 on opts[:model] (default Rho.Config.default_model/0), in the data dir.

Functions

default_system_prompt()

@spec default_system_prompt() :: String.t()

The system prompt a loop uses when neither it nor config :rho, :system_prompt sets one.

start_loop(opts \\ [])

@spec start_loop(keyword()) :: DynamicSupervisor.on_start_child()

Starts a loop under Rho.Supervisor's loop supervisor. opts are Rho.Loop.start_link/1's; without :session, a new session in Rho.Session.dir/0 on opts[:model] (default Rho.Config.default_model/0), in the data dir.