@nvrland/pi-agent-core 0.65.2-1 → 0.65.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @mariozechner/pi-agent-core
|
|
2
2
|
|
|
3
|
-
Stateful agent with tool execution and event streaming. Built on `@
|
|
3
|
+
Stateful agent with tool execution and event streaming. Built on `@mariozechner/pi-ai`.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @
|
|
8
|
+
npm install @mariozechner/pi-agent-core
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { Agent } from "@
|
|
15
|
-
import { getModel } from "@
|
|
14
|
+
import { Agent } from "@mariozechner/pi-agent-core";
|
|
15
|
+
import { getModel } from "@mariozechner/pi-ai";
|
|
16
16
|
|
|
17
17
|
const agent = new Agent({
|
|
18
18
|
initialState: {
|
|
@@ -332,7 +332,7 @@ Follow-up messages are checked only when there are no more tool calls and no ste
|
|
|
332
332
|
Extend `AgentMessage` via declaration merging:
|
|
333
333
|
|
|
334
334
|
```typescript
|
|
335
|
-
declare module "@
|
|
335
|
+
declare module "@mariozechner/pi-agent-core" {
|
|
336
336
|
interface CustomAgentMessages {
|
|
337
337
|
notification: { role: "notification"; text: string; timestamp: number };
|
|
338
338
|
}
|
|
@@ -404,7 +404,7 @@ Thrown errors are caught by the agent and reported to the LLM as tool errors wit
|
|
|
404
404
|
For browser apps that proxy through a backend:
|
|
405
405
|
|
|
406
406
|
```typescript
|
|
407
|
-
import { Agent, streamProxy } from "@
|
|
407
|
+
import { Agent, streamProxy } from "@mariozechner/pi-agent-core";
|
|
408
408
|
|
|
409
409
|
const agent = new Agent({
|
|
410
410
|
streamFn: (model, context, options) =>
|
|
@@ -421,7 +421,7 @@ const agent = new Agent({
|
|
|
421
421
|
For direct control without the Agent class:
|
|
422
422
|
|
|
423
423
|
```typescript
|
|
424
|
-
import { agentLoop, agentLoopContinue } from "@
|
|
424
|
+
import { agentLoop, agentLoopContinue } from "@mariozechner/pi-agent-core";
|
|
425
425
|
|
|
426
426
|
const context: AgentContext = {
|
|
427
427
|
systemPrompt: "You are helpful.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nvrland/pi-agent-core",
|
|
3
|
-
"version": "0.65.2
|
|
3
|
+
"version": "0.65.2",
|
|
4
4
|
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
],
|
|
26
26
|
"author": "Mario Zechner",
|
|
27
27
|
"license": "MIT",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/badlogic/pi-mono.git",
|
|
31
|
+
"directory": "packages/agent"
|
|
32
|
+
},
|
|
28
33
|
"engines": {
|
|
29
34
|
"node": ">=20.0.0"
|
|
30
35
|
},
|
|
@@ -37,6 +42,6 @@
|
|
|
37
42
|
"upstream": "@mariozechner/pi-agent-core",
|
|
38
43
|
"upstreamVersion": "0.65.2",
|
|
39
44
|
"patches": "https://github.com/leadszapp/never/issues/41",
|
|
40
|
-
"generatedAt": "2026-04-08T16:
|
|
45
|
+
"generatedAt": "2026-04-08T16:25:40.752Z"
|
|
41
46
|
}
|
|
42
47
|
}
|