Skip to main content

Crate nitpicker_agent

Crate nitpicker_agent 

Source
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", "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
tools

Structs§

AgentBuilder
Ergonomic constructor for AgentConfig. Required inputs are passed to AgentBuilder::new; every other field defaults to the same values the nitpicker review path uses, and is overridable via the chainable setters. Use AgentBuilder::build for a raw config or AgentBuilder::run to 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.