ollama/cmd
ParthSareen dd74829c27 x: add experimental agent loop with tool approval
Add `--experimental` / `--beta` flag to enable an agent loop that allows
LLMs to use tools (bash, web_search) with interactive user approval.

Features:
- Built-in tools: bash command execution, web search via Ollama API
- Interactive approval UI with arrow key navigation
- Auto-allowlist for safe commands (pwd, git status, npm run, etc.)
- Denylist for dangerous patterns (rm -rf, sudo, credential access)
- Prefix-based allowlist for approved directories (cat src/ approves cat src/*)
- Warning box for commands targeting paths outside project directory

Architecture:
- x/tools/: Tool registry, bash executor, web search client
- x/agent/: Approval manager with TUI selector
- x/cmd/: Agent loop orchestration

The readline change fixes a stdin race condition where background goroutine
consumption caused double-keypress issues in the approval UI.
2026-01-05 21:53:46 -08:00
..
bench cmd/bench: fix binary name in README (#13276) 2025-12-10 14:16:58 -08:00
runner Runner for Ollama engine 2025-02-13 17:09:26 -08:00
cmd.go x: add experimental agent loop with tool approval 2026-01-05 21:53:46 -08:00
cmd_test.go add REQUIRES command to Modelfile (#13361) 2025-12-18 13:21:29 -08:00
interactive.go x: add experimental agent loop with tool approval 2026-01-05 21:53:46 -08:00
interactive_test.go server: add webp image input support (#10653) 2025-05-12 20:41:42 -07:00
start.go nolintlint 2024-06-04 11:13:30 -07:00
start_darwin.go mac: handle "keep" named apps (#11031) 2025-06-09 16:29:57 -07:00
start_default.go lint 2024-08-01 17:06:06 -07:00
start_windows.go spawn desktop quickly (#11011) 2025-06-08 09:34:52 -07:00
warn_thinking_test.go add thinking support to the api and cli (#10584) 2025-05-28 19:38:52 -07:00