Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/tinyagents-graph/src/todos/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,23 +365,23 @@ mod tool_tests {
let tool = TodoTool::new(store());
let description = Tool::description(&tool);
assert!(
description.contains("only after its work has actually run"),
description.contains("only after its work has run"),
"an item is completed after its result exists: {description}"
);
assert!(
description.contains("bookkeeping, not work"),
"writing the list is not the work: {description}"
);
assert!(
description.contains("immediately carry out the next step"),
description.contains("do the next step"),
"the model advances after bookkeeping: {description}"
);
assert!(
description.contains("unless this update completes the final item"),
description.contains("unless the list is finished"),
"a terminal completion does not require a nonexistent next step: {description}"
);
assert!(
description.contains("next model turn"),
description.contains("next turn"),
"sequential providers may advance on their next turn: {description}"
);
}
Expand Down
18 changes: 9 additions & 9 deletions crates/tinyagents-graph/src/todos/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ use tinytools::{Tool, ToolPolicy, ToolResult, ToolRunContext, ToolSideEffects};

const TODO_TOOL_NAME: &str = "todo";

const TODO_DESCRIPTION: &str = "Your todo list for this thread. Pass the complete list every \
time; it replaces what was there. Use it for work with 3+ steps: write the steps up front, \
keep exactly one `in_progress`, mark each `completed` only after its work has actually run \
and its result is in this conversation. Writing the list is bookkeeping, not work: after \
updating it, immediately carry out the next step, unless this update completes the final item. \
Providers that cannot issue parallel tool calls may make that call in the next model turn, and \
one update per response is enough. Omit \
`todos` to read the current list. The list is bound \
automatically to the current thread — do not pass a thread id.";
/// Paid on every request of every agent that carries the tool, so each rule
/// is stated once, tersely. The rules themselves are load-bearing: see the
/// `description_states_…` test for the failure each one prevents.
const TODO_DESCRIPTION: &str = "This thread's todo list, for work with 3+ steps. Pass the \
complete list each time (it replaces the old one); omit `todos` to read it. Keep one item \
`in_progress`; mark an item `completed` only after its work has run and its result is in \
the conversation. Writing the list is bookkeeping, not work: in the same response (or your \
next turn, if you cannot call tools in parallel) do the next step, unless the list is \
finished.";

Comment thread
coderabbitai[bot] marked this conversation as resolved.
/// The `todo` harness [`Tool`], backed by a [`Store`](tinyagents_harness::store::Store).
pub struct TodoTool {
Expand Down
Loading