Skip to content

Commit 11983e5

Browse files
tylergibbs1claude
andcommitted
Add todo tracking and cost tracking sections to README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 77b615f commit 11983e5

1 file changed

Lines changed: 50 additions & 1 deletion

File tree

README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
A TypeScript agent framework for Azure OpenAI. Build multi-agent systems with tools, handoffs, guardrails, streaming, structured output, and more.
1414

15-
`agents` `tools` `streaming` `structured output` `handoffs` `subagents` `guardrails` `hooks` `tracing` `sessions` `abort signals`
15+
`agents` `tools` `streaming` `structured output` `handoffs` `subagents` `guardrails` `hooks` `tracing` `sessions` `abort signals` `todo tracking` `cost tracking`
1616

1717
## Install
1818

@@ -331,6 +331,55 @@ try {
331331
}
332332
```
333333

334+
### Todo Tracking
335+
336+
Track task progress during agent execution:
337+
338+
```ts
339+
import { todoTool, TodoList } from "stratus-sdk";
340+
341+
const todos = new TodoList();
342+
todos.onUpdate((items) => {
343+
for (const item of items) {
344+
const icon = item.status === "completed" ? "+" : item.status === "in_progress" ? ">" : "-";
345+
console.log(`${icon} ${item.content}`);
346+
}
347+
});
348+
349+
const agent = new Agent({
350+
name: "planner",
351+
instructions: "Break tasks into steps and track progress with todo_write.",
352+
model,
353+
tools: [todoTool(todos)],
354+
});
355+
356+
await run(agent, "Set up a new TypeScript project");
357+
```
358+
359+
### Usage & Cost Tracking
360+
361+
Track token usage and estimate costs:
362+
363+
```ts
364+
import { createCostEstimator } from "stratus-sdk";
365+
366+
const estimator = createCostEstimator({
367+
inputTokenCostPer1k: 0.01,
368+
outputTokenCostPer1k: 0.03,
369+
});
370+
371+
const result = await run(agent, "Hello", { costEstimator: estimator });
372+
console.log(result.usage.totalTokens); // token counts
373+
console.log(result.totalCostUsd); // estimated cost
374+
console.log(result.numTurns); // model call count
375+
376+
// Set budget limits
377+
const result = await run(agent, "Hello", {
378+
costEstimator: estimator,
379+
maxBudgetUsd: 0.50, // throws MaxBudgetExceededError if exceeded
380+
});
381+
```
382+
334383
### Tool Choice & Tool Use Behavior
335384

336385
Control how the model uses tools:

0 commit comments

Comments
 (0)