Skip to main content

pixie_pi/
lib.rs

1//! pixie-pi — an AI coding agent library.
2//!
3//! This crate exposes the reusable core of pixie-pi: the LLM abstraction
4//! (`ai`), the agent loop (`agent`), the persistent session (`session`), the
5//! built-in tools (`tools`), system-prompt assembly (`prompt`), skill discovery
6//! (`skills`), config paths (`config`), and a Claude Code `stream-json`
7//! compatibility layer (`compat`).
8//!
9//! The `pixie-pi` binary (`src/main.rs`) is a thin wrapper over this library —
10//! it only owns CLI parsing, the interactive REPL, and terminal rendering.
11
12pub mod ai;
13pub mod agent;
14pub mod compat;
15pub mod config;
16pub mod prompt;
17pub mod session;
18pub mod skills;
19pub mod tools;
20
21// Ergonomic re-exports at the crate root so downstream users can write
22// `use pixie_pi::{AgentSession, Message, Model, agent_loop};` etc.
23pub use ai::{Api, Message, Model, ThinkingLevel, Usage, UserMessage};
24pub use session::AgentSession;
25pub use agent::agent_loop::{agent_loop, AgentLoopConfig};
26pub use agent::context::{AgentContext, AgentEvent};
27pub use agent::tool::{allow_all_gate, AgentTool, ExecutionMode, ToolGate, ToolResult};
28
29/// A curated prelude for the most common types.
30pub mod prelude {
31    pub use crate::{
32        agent_loop, AgentLoopConfig, AgentSession, AgentTool, Message, Model, Usage,
33    };
34}