nitpicker-agent
The reusable agentic core extracted from nitpicker:
an LLM agent that reads files (read_file / glob / grep / read-only git) and fans out
parallel subagents, with provider-agnostic LLM clients and optional config-file-driven setup.
It carries none of nitpicker's CLI, review/debate, or PR machinery — just the loop, the tools, and the providers.
Quick start
use *;
use Path;
async
See examples/file_agent.rs for a runnable version.
What you control
- Top-level prompt + task:
AgentBuilder::new(name, model, system_prompt, client)and theinitial_messagepassed to.run(...). - Tools: any
HashMap<String, Arc<dyn Tool>>.file_agent_tools()gives the file/git toolset plusspawn_subagent;all_tools()omits subagents; add your ownToolimpls. - Subagents:
subagent_system_prompt(...)overrides the prompt spawned subagents run with; the override propagates through nested spawns. Depth is capped at 2. - Clients:
client_from_env(LLMProvider::…)for Anthropic / OpenAI / Gemini / OpenRouter via env-var API keys, or build anyArc<dyn LLMClientDyn>yourself. Config-file-driven construction is available via theconfigandprovidermodules.
Features
azure—auth = "azure-ad"for Azure AI Foundry (pulls in the Azure SDK; raises MSRV to 1.88).antigravity— compiles in the Gemini-proxy client hook + config validation (the proxy server itself lives in thenitpickerbinary).
Breaking changes
0.2.0
- Replaced
AgentResulttoken fields (total_input_tokens,total_output_tokens,total_tokens) andusage()method withusage: TokenUsage, which includescached_input_tokensandcache_creation_input_tokens. TokenUsage::input_tokensnow includes provider cache reads across all providers.- Added
max_tokens: Option<u64>toAgentConfig(defaults toNone, using provider per-model limits; Anthropic defaults to 8192).AgentBuilder::max_tokenstakesNonZeroU64. AlloyClient::newnow takesVec<AlloySlot>(client,model,max_tokens) to scope output caps per pooled model.
License
MIT