Skip to main content

Crate pixie_pi

Crate pixie_pi 

Source
Expand description

pixie-pi — an AI coding agent library.

This crate exposes the reusable core of pixie-pi: the LLM abstraction (ai), the agent loop (agent), the persistent session (session), the built-in tools (tools), system-prompt assembly (prompt), skill discovery (skills), config paths (config), and a Claude Code stream-json compatibility layer (compat).

The pixie-pi binary (src/main.rs) is a thin wrapper over this library — it only owns CLI parsing, the interactive REPL, and terminal rendering.

Re-exports§

pub use ai::Api;
pub use ai::Message;
pub use ai::Model;
pub use ai::ThinkingLevel;
pub use ai::Usage;
pub use ai::UserMessage;
pub use session::AgentSession;
pub use agent::agent_loop::agent_loop;
pub use agent::agent_loop::AgentLoopConfig;
pub use agent::context::AgentContext;
pub use agent::context::AgentEvent;
pub use agent::tool::allow_all_gate;
pub use agent::tool::AgentTool;
pub use agent::tool::ExecutionMode;
pub use agent::tool::ToolGate;
pub use agent::tool::ToolResult;

Modules§

agent
Agent loop + tool abstraction (packages/agent).
ai
LLM abstraction layer (packages/ai). Types + the Anthropic Messages API streaming provider.
compat
Claude Code stream-json compatibility layer.
config
Configuration paths and environment variables.
prelude
A curated prelude for the most common types.
prompt
System prompt builder for the coding agent.
session
Agent session: holds the live transcript, model, tools, and credentials, drives the agent loop, and persists the transcript as JSONL.
skills
Skill discovery and parsing — Claude Code–compatible.
tools
Coding-agent tools (packages/coding-agent). The seven built-in tools plus preset tool sets.