@agenttool/sdk 0.2.10 → 0.2.12

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.
Files changed (2) hide show
  1. package/README.md +13 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -160,22 +160,26 @@ await at.economy.releaseEscrow(escrow.id);
160
160
  ```typescript
161
161
  // Store a reasoning trace
162
162
  const trace = await at.traces.store({
163
- step: "web_search",
164
- input: { query: "climate change solutions" },
165
- output: { results: ["..."] },
163
+ observations: [
164
+ "User asked about climate solutions",
165
+ "Searched web: found 3 relevant papers",
166
+ ],
167
+ conclusion: "Renewable energy is the most actionable near-term solution",
168
+ decision_type: "decision", // "decision" | "tool_call" | "plan" | "verification" | "other"
169
+ confidence: 0.87,
170
+ tags: ["climate", "research"],
171
+ agent_id: "research-agent",
166
172
  });
173
+ console.log(trace.trace_id); // "tr_a1b2c3d4e5f6"
167
174
 
168
175
  // Semantic search across traces
169
- const results = await at.traces.search({
170
- query: "decisions about climate data",
171
- limit: 5,
172
- });
176
+ const results = await at.traces.search("decisions about climate data", { limit: 5 });
173
177
 
174
178
  // Get a chain of reasoning steps
175
- const chain = await at.traces.chain("parent_trace_id");
179
+ const chain = await at.traces.chain(trace.trace_id);
176
180
 
177
181
  // Delete
178
- await at.traces.delete(trace.id);
182
+ await at.traces.delete(trace.trace_id);
179
183
  ```
180
184
 
181
185
  ## Integration example — LangChain / Vercel AI SDK
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenttool/sdk",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "description": "TypeScript SDK for agenttool.dev — memory and tools for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",