Agent must discover and load relevant skills before acting on any task,
re-running discovery when domain shifts. Agent must also produce a
numbered plan before executing, and revise it if steps fail.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fall back to the default path silently if the file does not exist.
Only fatal on a missing/invalid config if the path was explicitly
provided as a CLI argument.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Env file is optional; existing environment variables take precedence.
Supports KEY=VALUE format with # comments and blank lines ignored.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extract renderDisplay() to word-wrap each line at the viewport width
before setting content. Re-wrap on terminal resize. Fixes tool output
and long bot responses being truncated at the viewport edge.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
BeadState duplicated what execute_code already provides via tool scripts.
Removed it entirely. Added SystemPrompt field to agent.Config, prepended
as a system message each loop iteration. Built-in prompt covers
execute_code usage, sandbox behavior, and skill discovery.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drop ollie/mcp, ollie/tools, ollie/ollama packages. Config now only
carries hooks. main.go wires a single execute_code tool directly to
the agent loop — no MCP discovery or dispatch needed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main.go now uses backend.New() for LLM selection (OLLIE_BACKEND env),
agent.Loop for observe/decide/act/update/terminate, and ollie/exec for
built-in execute_code. Multi-turn sessions persist across user inputs.
MCP tools route through mcpExecutor; unknown tools fall back to built-in.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements the core agent loop with two state backends:
- Session: ephemeral in-memory, lives for one process lifetime
- BeadState: bead-backed via 9beads tool scripts (claim/read/complete)
Loop is backend-agnostic; takes a ToolExecutor and emits OutputMsgs.
MaxSteps defaults to 1 for simple prompts; callers set higher for tasks.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extracts execute_code into a shared ollie/exec package so anvillm-mcp
and ollie's agent loop can both use it. Includes sandboxed execution,
dangerous-pattern validation with per-Executor rate limiting, 9P tool
reading, and pipeline construction.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>