Skip to content

Task tracking and environment

Two of Strands harness’s defaults are plugins rather than tools: todos and environment. Both are enabled by default through builtin_plugins and shape how the agent works without being things the model calls the way it calls shell or read.

The todos plugin gives the agent a todo_write tool and keeps the current task list in view. When the agent writes a list, the plugin re-surfaces it to the model before each step, so on a longer task the agent keeps its plan in front of it without restating it.

The list lives in agent state, not durable history: it is injected fresh before each step and never written into the conversation, so a constantly-changing plan does not stack stale copies in the transcript. Each item has a content (the task, imperative), an activeForm (shown while it is in progress), and a status of pending, in_progress, or completed. The agent is guided to keep one item in progress at a time and clear the list when the work is done.

The environment plugin injects a small block of working-environment context before each user turn:

  • The platform and the current date.
  • The working directory.
  • The project’s AGENTS.md, included in full up to a cap (about 16 KB); a longer file is truncated with a marker, and the agent can read the rest on demand.
  • Links (not contents) to other AGENTS.md and README.md files found a couple of levels down, so the block stays small and the agent reads them only as needed.

Everything is read through the agent’s sandbox, so the platform, directory, and files describe where the agent actually runs. The date is injected each turn (rather than baked into the system prompt) precisely so it does not change the cached prompt prefix; the rest is discovered once and reused.

builtin_plugins selects these by name, defaulting to ["todos", "environment"]. Pass a subset to keep one, or an empty list to turn both off:

from strands_harness import create_harness
agent = create_harness(builtin_plugins=["todos"]) # keep todos, drop environment; [] for none

For the plugin system these build on, see the Strands Harness SDK’s plugins documentation.