@ag-ui/client 0.0.34 → 0.0.35
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 +51 -0
- package/package.json +6 -5
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @ag-ui/client
|
|
2
|
+
|
|
3
|
+
Client SDK for connecting to **Agent-User Interaction (AG-UI) Protocol** servers.
|
|
4
|
+
|
|
5
|
+
`@ag-ui/client` provides agent implementations that handle the full lifecycle of AG-UI communication: connecting to servers, processing streaming events, managing state mutations, and providing reactive subscriber hooks.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @ag-ui/client
|
|
11
|
+
pnpm add @ag-ui/client
|
|
12
|
+
yarn add @ag-ui/client
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- 🔗 **HTTP connectivity** – `HttpAgent` for direct server connections with SSE/protobuf support
|
|
18
|
+
- 🏗️ **Custom agents** – `AbstractAgent` base class for building your own transport layer
|
|
19
|
+
- 📡 **Event streaming** – Full AG-UI event processing with validation and transformation
|
|
20
|
+
- 🔄 **State management** – Automatic message/state tracking with reactive updates
|
|
21
|
+
- 🪝 **Subscriber system** – Middleware-style hooks for logging, persistence, and custom logic
|
|
22
|
+
|
|
23
|
+
## Quick example
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { HttpAgent } from "@ag-ui/client";
|
|
27
|
+
|
|
28
|
+
const agent = new HttpAgent({
|
|
29
|
+
url: "https://api.example.com/agent",
|
|
30
|
+
headers: { Authorization: "Bearer token" },
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const result = await agent.runAgent({
|
|
34
|
+
messages: [{ role: "user", content: "Hello!" }],
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
console.log(result.newMessages);
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Documentation
|
|
41
|
+
|
|
42
|
+
- Concepts & architecture: [`docs/concepts`](https://docs.ag-ui.com/concepts/architecture)
|
|
43
|
+
- Full API reference: [`docs/sdk/js/client`](https://docs.ag-ui.com/sdk/js/client/overview)
|
|
44
|
+
|
|
45
|
+
## Contributing
|
|
46
|
+
|
|
47
|
+
Bug reports and pull requests are welcome! Please read our [contributing guide](https://docs.ag-ui.com/development/contributing) first.
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT © 2025 AG-UI Protocol Contributors
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ag-ui/client",
|
|
3
3
|
"author": "Markus Ecker <markus.ecker@gmail.com>",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.35",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"files": [
|
|
14
|
-
"dist/**"
|
|
14
|
+
"dist/**",
|
|
15
|
+
"README.md"
|
|
15
16
|
],
|
|
16
17
|
"dependencies": {
|
|
17
18
|
"@types/uuid": "^10.0.0",
|
|
@@ -20,9 +21,9 @@
|
|
|
20
21
|
"untruncate-json": "^0.0.1",
|
|
21
22
|
"uuid": "^11.1.0",
|
|
22
23
|
"zod": "^3.22.4",
|
|
23
|
-
"@ag-ui/
|
|
24
|
-
"@ag-ui/
|
|
25
|
-
"@ag-ui/
|
|
24
|
+
"@ag-ui/proto": "0.0.35",
|
|
25
|
+
"@ag-ui/encoder": "0.0.35",
|
|
26
|
+
"@ag-ui/core": "0.0.35"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@types/jest": "^29.5.14",
|