Add direct API backend for agent execution

When api_base_url is configured, agents call the LLM directly via
OpenAI-compatible API (vllm, llama.cpp, etc.) instead of shelling
out to claude CLI. Implements the full tool loop: send prompt, if
tool_calls execute them and send results back, repeat until text.

This enables running agents against local/remote models like
Qwen-27B on a RunPod B200, with no dependency on claude CLI.

Config fields: api_base_url, api_key, api_model.
Falls back to claude CLI when api_base_url is not set.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kent Overstreet 2026-03-18 23:05:14 -04:00
parent 1b48e57f34
commit a29b6d4c5d
6 changed files with 145 additions and 1 deletions

View file

@ -16,6 +16,7 @@
// transcript — shared JSONL transcript parsing
pub mod transcript;
pub mod api;
pub mod llm;
pub mod prompts;
pub mod defs;