Expand description
Reusable agentic loop extracted from nitpicker: an LLM agent that reads files (read_file / glob / grep / git) and fans out parallel subagents, with provider-agnostic LLM clients and optional config-file-driven setup.
The fastest way in is the prelude plus AgentBuilder:
use nitpicker_agent::prelude::*;
use std::path::Path;
let client = client_from_env(LLMProvider::Anthropic { base_url: None, api_key_env: None })?;
let result = AgentBuilder::new("explorer", "claude-sonnet-5-5", "You explore codebases.", client)
.subagent_system_prompt("You are a focused file-reading worker. Report findings concisely.")
.run("Map the module layout of this repo.", &file_agent_tools(), Path::new("."))
.await?;
println!("{}", result.text);Modules§
- agent
- codex
- ChatGPT/Codex subscription auth for OpenAI reviewers.
- compact
- config
- llm
- openrouter
- prelude
- Curated entrypoints for driving a file-reading agent with subagents.
- prompts
- provider
- session
- telemetry
- Span contract shared by every instrumented seam in this crate.
- tools
Structs§
- Agent
Builder - Ergonomic constructor for
AgentConfig. Required inputs are passed toAgentBuilder::new; every other field defaults to the same values the nitpicker review path uses, and is overridable via the chainable setters. UseAgentBuilder::buildfor a raw config orAgentBuilder::runto execute in one call.
Functions§
- client_
from_ env - Build a retry-wrapped client for a provider, reading its API key from the environment.
- file_
agent_ tools - The file/git toolset plus
spawn_subagent— the “reads files and spawns subagents” kit.