Repository navigation
pi-python v0.1.0
Initial public release.
Added
pi-agent-core
- Core runtime (Phase 1):
Agentwith steering/follow-up queues, abort,subscribe()event barrier;agent_loopwith pi-compatible event protocol, parallel/sequential tool execution,terminatesemantics. - LangChain adapter:
StreamFnoverastream()for OpenAI / Anthropic / DeepSeek / anyinit_chat_modelprovider; mock stream for tests (no API keys needed). - Production hardening (Phase 2/2.5):
- Cross-provider message replay (
transform_messages: tool-call id normalization, thinking downgrade, image stripping). - Usage & cost tracking with
CostCalculator. - Thinking/reasoning: provider param mapping, streamed
thinking_deltaevents, Anthropic signature replay, DeepSeek-stylereasoning_content. - Stream-level retries with exponential backoff + jitter,
Retry-Afteraware. - Runaway protection:
max_turns/tool_timeout. - Guardrail hooks:
before_llm_call(withContextBudget),after_llm_call,on_agent_end. - Observability:
on_payload/on_responsehooks;run_id/turn_idon every event. - Granular stream events:
text_start/end,thinking_start/end,toolcall_start/end. - Structured output:
response_schema(Pydantic model or JSON schema). - Tool-result images: Anthropic native blocks, user-message fallback elsewhere.
- OpenAI-compatible gateways via
Model.base_url.
- Cross-provider message replay (
- Tool ecosystem (P6):
- 7 built-in coding tools:
read,bash,edit,write,grep,find,ls. - Group factories:
create_coding_tools()/create_read_only_tools(). - LangChain
BaseTool→AgentTooladapter (from_langchain_tool).
- 7 built-in coding tools:
pi-agent-harness
- Session tree (H1):
SessionRepowith filesystem storage,uuid7IDs, branch/fork semantics, message append/list. - AgentHarness runtime (H2): orchestration layer over
Agent, queue rollback, abort aggregation, event-based idle wait. - Compaction & tree navigation (H3): token-based compaction with branch summaries,
navigate_treefor branch exploration. - Skills, templates & env (H4): skill discovery, prompt templates, system prompt injection,
LocalExecutionEnvfor sandboxed execution.