Skip to content

Commit 1780d87

Browse files
committed
date
1 parent 21ba9e5 commit 1780d87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/changelog/agents/2025-03-17-npm-i-agents.mdx renamed to src/content/changelog/agents/2025-03-18-npm-i-agents.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Install the latest version of the `agents` SDK to build multi-agent
44
products:
55
- agents
66
- workers
7-
date: 2025-03-17T14:00:00Z
7+
date: 2025-03-18T14:00:00Z
88
---
99

1010
import { Badge, MetaInfo, Render, TypeScriptExample } from "~/components"
@@ -59,7 +59,6 @@ We've added a new [`@callable()`](/agents/api-reference/agents-api/) decorator f
5959
// server.ts
6060
import { Agent, callable } from 'agents';
6161

62-
// TODO: replace this with a real example
6362
class MyAgent extends Agent {
6463
@callable()
6564
async getHistory(limit: number = 10): Promise<string[]> {
@@ -74,8 +73,9 @@ const { call } = useAgent({ agent: "rpc" });
7473
const fetchUserHistory = async () => {
7574
try {
7675
setLoading(true);
76+
// Call methods directly on the Agent
7777
const result = await call("getHistory");
78-
addToast(`Regular RPC result: ${result}`, "success");
78+
addToast(`RPC result: ${result}`, "success");
7979
} catch (error) {
8080
addToast(`Error: ${error}`, "error");
8181
} finally {

0 commit comments

Comments
 (0)