diff --git a/packages/agent/CHANGELOG.md b/packages/agent/CHANGELOG.md index 660039c1..38dccec2 100644 --- a/packages/agent/CHANGELOG.md +++ b/packages/agent/CHANGELOG.md @@ -167,7 +167,7 @@ - **`UserMessageWithAttachments` and `Attachment` types removed**: Attachment handling is now the responsibility of the `convertToLlm` function. -- **Agent loop moved from `@mariozechner/pi-ai`**: The `agentLoop`, `agentLoopContinue`, and related types have moved to this package. Import from `@mariozechner/pi-agent` instead. +- **Agent loop moved from `@mariozechner/pi-ai`**: The `agentLoop`, `agentLoopContinue`, and related types have moved to this package. Import from `@mariozechner/pi-agent-core` instead. ### Added diff --git a/packages/agent/README.md b/packages/agent/README.md index 4254c3a4..7cd48fec 100644 --- a/packages/agent/README.md +++ b/packages/agent/README.md @@ -1,17 +1,17 @@ -# @mariozechner/pi-agent +# @mariozechner/pi-agent-core Stateful agent with tool execution and event streaming. Built on `@mariozechner/pi-ai`. ## Installation ```bash -npm install @mariozechner/pi-agent +npm install @mariozechner/pi-agent-core ``` ## Quick Start ```typescript -import { Agent } from "@mariozechner/pi-agent"; +import { Agent } from "@mariozechner/pi-agent-core"; import { getModel } from "@mariozechner/pi-ai"; const agent = new Agent({ @@ -293,7 +293,7 @@ Follow-up messages are checked only when there are no more tool calls and no ste Extend `AgentMessage` via declaration merging: ```typescript -declare module "@mariozechner/pi-agent" { +declare module "@mariozechner/pi-agent-core" { interface CustomAgentMessages { notification: { role: "notification"; text: string; timestamp: number }; } @@ -365,7 +365,7 @@ Thrown errors are caught by the agent and reported to the LLM as tool errors wit For browser apps that proxy through a backend: ```typescript -import { Agent, streamProxy } from "@mariozechner/pi-agent"; +import { Agent, streamProxy } from "@mariozechner/pi-agent-core"; const agent = new Agent({ streamFn: (model, context, options) => @@ -382,7 +382,7 @@ const agent = new Agent({ For direct control without the Agent class: ```typescript -import { agentLoop, agentLoopContinue } from "@mariozechner/pi-agent"; +import { agentLoop, agentLoopContinue } from "@mariozechner/pi-agent-core"; const context: AgentContext = { systemPrompt: "You are helpful.",