Skip to content

Latest commit

 

History

History
119 lines (85 loc) · 4.69 KB

File metadata and controls

119 lines (85 loc) · 4.69 KB

Memory

Context and history storage in Ho Launcher. No cross-session episodic or semantic memory beyond conversation files, LLM service history (launcher/vibe), and run event logs.

Agent Conversation Store

File-backed multi-turn history for agent mode (backend/src/agent/conversation_store.rs).

Property Value
Storage {app_data_dir}/conversations/{convId}.json
ID format conv-{unix_nanos}
Per exchange query, final_answer, status, steps_summary, optional run_id
Context messages Trimmed user/assistant pairs for next agent run
Sent to agent Yes — prior_context converted to rig history in execute_agent
Updated after run ConversationStore::record_run in agent/commands.rs spawn cleanup
Listed in UI conversation_list → RunHistoryPanel
Cleared via agent_conversation_clear

max_conversation_history from LLM settings controls pair limit (default_max_pairs).

LLM Conversation History

In-memory history in LLMService (backend/src/llm/service.rs, backend/src/llm/types/conversation.rs).

Property Value
Default max history 3 pairs (6 messages)
Constant DEFAULT_MAX_CONVERSATION_HISTORY
Trim behavior Keeps at most max_history * 2 non-system messages; system messages retained
Configurable in UI 0, 1, 2, 3, 5, 10 pairs (LLMSection.tsx)
Used by Launcher/vibe complete() paths only — not agent runs
Cleared via llm_clear_conversation_history command

Run Event Log

Durable per-run history (backend/src/runtime/store.rs).

Property Value
Run snapshot {app_data_dir}/runs/{runId}.json
Event log {app_data_dir}/events/{runId}.jsonl (append-only)
Query commands run_get, run_list, run_list_events
UI source runTimelineStore via live run-event + syncActiveRunEvents

Event types include: run.started, run.updated, run.completed, run.failed, run.cancelled, run.blocked, tool.requested, tool.approval_required, tool.started, tool.completed, tool.failed, tool.denied, message.completed, message.delta (transient only), state.updated, mcp.*.

message.delta is emitted to UI but not persisted (is_transient_run_event).

Graph Session State

Persisted graph-flow context (backend/src/runtime/graph_session.rs).

Property Value
Storage {app_data_dir}/sessions/{runId}.graph.json
Purpose Resume agent graph after approval; stores run context, preamble, resume flags
Cleared On run completion via service cleanup

Pending Agent Run (CLI worker)

Payload for detached CLI execution (backend/src/agent/pending_run.rs).

Property Value
Storage {app_data_dir}/pending-runs/{runId}.json
Contents AgentRunContext, AgentSettings, maxHistoryPairs
Written On agent start (always) and used by agent run-worker
Cleared When worker completes or run is cancelled

Cross-process IPC marker files:

Directory Purpose
cancel-requests/{runId} Request cancellation while worker is detached
resume-requests/{runId} Signal approval resolution to resume worker

Approval Records

Persisted in {app_data_dir}/approvals.json (approvals/store.rs).

Field Notes
Status pending, approved, denied
Scope Per tool call step within a run

On startup, useBlockedRunRecovery rehydrates blocked runs and pending approval UI from persisted state. User must still approve or reject.

Agent Session State

In-memory coordination only (backend/src/agent/commands.rs, AgentManager).

Map Contents
cancel_tokens Cancellation tokens per run
resume_notifiers Notify channels to resume graph after approval

Session ID format: agent-{unix_nanos}. Same ID used as run ID.

Context Limits

Limit Value Source
LLM max tokens 4000 constants.rs
LLM request timeout 60s constants.rs
Agent max turns maxSteps (default 25) AgentSettings → AgentRunContext.max_turns
Subagent max turns max(maxSteps / 2, 3) execute.rs
Max delegation depth 2 (default) AgentSettings.maxDelegationDepth
Attached file context Plain-text extensions only constants.rs → file_context

Agent binds all scoped MCP tools (@server mentions + guardrail filter; no tool-count cap).

Not Implemented

  • Cross-session episodic or semantic memory
  • Memory scope per agent (run, agent, farm)
  • Thread overflow → episodic summary
  • remember / recall / forget tools
  • Searchable run/event export UI