@agentified/fe-client 0.0.4 → 0.0.5-beta.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 +15 -4
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @agentified/fe-client
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Run agent tools in the browser. Stream everything.
|
|
4
|
+
|
|
5
|
+
Frontend client for [Agentified](../../../README.md) — connects to an AG-UI agent backend, handles streaming events, manages [frontend tool execution](../../../docs/concepts/frontend-tools.md), and exposes full inspector state.
|
|
4
6
|
|
|
5
7
|
## Install
|
|
6
8
|
|
|
@@ -42,8 +44,8 @@ await client.sendMessage("Show me the dashboard");
|
|
|
42
44
|
interface AgentifiedClientConfig {
|
|
43
45
|
agentUrl: string; // AG-UI agent backend URL
|
|
44
46
|
headers?: Record<string, string>; // custom HTTP headers
|
|
45
|
-
contextWindowSize?: number; // for
|
|
46
|
-
maxEventLogSize?: number; //
|
|
47
|
+
contextWindowSize?: number; // reserved for future use
|
|
48
|
+
maxEventLogSize?: number; // reserved for future use
|
|
47
49
|
}
|
|
48
50
|
```
|
|
49
51
|
|
|
@@ -73,10 +75,12 @@ Lower-level: runs the agent with full message history and optional context.
|
|
|
73
75
|
```typescript
|
|
74
76
|
await client.run({
|
|
75
77
|
messages: [{ role: "user", content: "Hello" }],
|
|
76
|
-
context: { page: "/dashboard" },
|
|
78
|
+
context: [{ description: "Current page", value: "/dashboard" }],
|
|
77
79
|
});
|
|
78
80
|
```
|
|
79
81
|
|
|
82
|
+
`context` is `Context[]` from `@ag-ui/client`.
|
|
83
|
+
|
|
80
84
|
### `client.registerToolHandler(name, handler)`
|
|
81
85
|
|
|
82
86
|
Registers a frontend tool handler. When the agent calls this tool, the handler runs client-side.
|
|
@@ -155,6 +159,13 @@ The client handles frontend tools automatically:
|
|
|
155
159
|
## Links
|
|
156
160
|
|
|
157
161
|
- [Root README](../../../README.md)
|
|
162
|
+
- [Documentation](../../../docs/)
|
|
163
|
+
- [Frontend Tools concept](../../../docs/concepts/frontend-tools.md)
|
|
164
|
+
- [Mastra guide](../../../docs/guides/mastra.md) — Full-stack example
|
|
158
165
|
- [React Bindings](../react/README.md) — React wrapper with Provider/hooks
|
|
159
166
|
- [TypeScript SDK](../sdk/README.md)
|
|
160
167
|
- [agentified-core](../../core/README.md)
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
[MIT](../../../LICENSE.md#mit-license)
|