Skip to main content
The ObjectiveTools collection exposes the conversation Objective: the agent’s evolving, one-line understanding of what the user is trying to achieve. There is one collection per thread, bound to a single thread_id, so the tool targets the right conversation without thread_id being an LLM-facing parameter. Source: backend/app/tools/objective.py. Shared conventions (the @workspace_tool decorator, the injected action_and_reasoning argument, and the JSON envelope returned by every tool) are documented in Tools.

set_objective

Sets or updates the agent’s concise understanding of the user’s goal. Description shown to the agent:
Set or update the Objective — your concise understanding of what the user is trying to achieve. Call it on the first substantive turn and whenever your understanding of the goal changes.
Arguments The agent also receives the required injected action_and_reasoning argument described in Tools; it is not a member of this tool’s args schema. Returns: a confirmation string of the form objective set: <text>, wrapped in the standard success envelope. Implementation: the tool body calls repo.upsert_objective(thread_id, text). There is exactly one objective row per thread (an ON CONFLICT DO UPDATE on thread_id), so each call replaces the previous objective rather than appending. The objective is user-owned: the agent proposes and refines it via set_objective, while the user can edit it directly through the workspace API, and both paths converge on upsert_objective. The objective is snapshotted at the start of every turn into workspace_snapshots, so its full evolution over the conversation is recoverable. Source: backend/app/tools/objective.py