phi-agent 0.1.0

phi-agent — General-purpose AI Agent framework (builder factory, renderer, config, session management)
Documentation
//! phi-agent: General-purpose AI Agent framework
//!
//! Built on agent-base and agent-works, providing builder factory, renderer,
//! config resolution, session management, and other infrastructure.
//! **Does not bundle any tools** — tools are injected by consumers.

pub mod agent;
pub mod cli;
pub mod config;
pub mod event_log;
pub mod prompt;
pub mod render;
pub mod session;

// ── Common agent-base types ──
// Only re-export the types consumers use most often.
// For the full type set, import directly from agent-base.
pub use agent_base::{
    AgentBuilder, AgentError, AgentResult, AgentRuntime, ApprovalHandler, ConsecutiveFailureRecovery,
    LlmClient, OpenAiClient, ReasoningConfig, ReasoningEffort, RunOutcome, RuntimeEvent, SafetyConfig,
    SessionId, Tool, ToolContext, ToolControlFlow, ToolOutput, TurnFactMiddleware,
    TurnToolLimitMiddleware, UpdatePlanTool, PlanItem, PlanStepStatus,
};

// ── agent-works ──
pub use agent_works::focus::{Context as FocusContext, Focus, FocusError, FocusInput, FocusOutput};

// ── phi-agent types ──
pub use agent::{base_agent_builder, PhiAgent, PhiAgentConfig};
pub use cli::{ApprovalMode, AutoApprovalHandler};
pub use config::{resolve_llm_config, LlmConfig};
pub use event_log::{event_to_jsonl, event_to_value, save_turn_log};
pub use prompt::build_system_prompt;
pub use render::{create_renderer, create_stdout_renderer, EventRenderer, JsonStreamRenderer, NullRenderer, OutputFormat};
pub use session::SessionContext;