Skip to content

Source Strands Harness Docs

Reese Hodge edited this page Oct 1, 2026 · 1 revision

Source: Strands harness docs

The documentation for Strands harness — @strands-agents/harness in TypeScript, strands-harness in Python — read in full on 2026-10-01: all 21 pages under /docs/user-guide/harness/.

We do not use it. Component-Agent-Runtime is built directly on the Strands Harness SDK, @strands-agents/sdk, whose docs live on Source-Strands-Harness-SDK-Docs. This page exists so the coming architecture review weighs the harness from its documentation rather than from its name. It records facts and their bearing on our constitution; it does not decide adoption — that belongs to Decision-Strands-SDK.

Three products now share the word "harness": this one, the SDK above, and AWS's unrelated AgentCore Harness (Source-AgentCore-Platform-2026). See Gotchas.

What it is

A factory that assembles SDK building blocks into one agent with benchmarked defaults and a tuned system prompt. The docs call it "a thin composition layer, not a framework of its own".

import { createHarness } from '@strands-agents/harness'

const agent = await createHarness() // async in TypeScript
await agent.invoke('...')
  • It returns a plain Strands Agent. There is no harness type wrapping it, so every SDK feature stays reachable and the agent can be modified after construction (agent.systemPrompt += ...).
  • The factory resolves options into SDK objects, assembles built-in tools, plugins and subagents, then constructs the Agent. Built-in tools are ordinary registered tools; todos and environment are ordinary plugins; sessions and memory use the SDK's own managers.
  • Unknown options pass straight through to the Agent constructor, and an explicit passthrough value wins over the default it corresponds to. HarnessAgentOptions extends the SDK's AgentConfig, minus the fields the harness manages. Passing systemPrompt therefore replaces the harness contract entirely; passing memoryManager replaces memory.
  • Exported building blocks: HARNESS_CONTRACT and buildSystemPrompt in both languages; resolve_memory and resolve_interventions in Python only.
  • A strands CLI (@strands-agents/cli) runs the same defaults interactively and /exports a ready-to-import project.

Every default, and what it would mean here

Every built-in is on unless explicitly narrowed or turned off. Columns two and three are the documentation; column four is our reading against the constitution.

Option Default What it does Bearing on Max Height
model bedrock/global.anthropic.claude-opus-5 provider/name string, bare Bedrock id, or a Model instance We run Haiku 4.5 on cost grounds (Decision-LLM-Model-Selection). Not overriding it silently changes the model. P2.
effort auto Reasoning on at the provider's recommended level; off disables it More model tokens per turn. P2. Ignored for a Model instance.
system prompt HARNESS_CONTRACT plus instructions Contract: explore first, act, confirm before anything irreversible, verify before finishing. instructions is appended after it A task-agent contract competing with a persona. P3 — see Concept-Personality-Gate.
builtinTools shell, read, write, edit, web_fetch, web_search, programmatic_tool_caller, subagent Shell and file tools route through the SDK sandbox, local host by default A guest-facing character holding a host shell and file write. No principle anticipated this; P11's least-privilege rule is written for IAM, but its blast-radius rationale applies.
web_fetch summarizer Small model of the main provider's family Answers the prompt over a fetched page; 15-minute content cache; HTTP(S) only A second model call per fetch. P2.
web_search On Switches on provider-native search Bedrock Converse has none: a no-op with a warning by default, a construction failure if listed explicitly.
web_search: 'exa' Off Hosted Exa search, keyless free tier, EXA_API_KEY lifts the rate limit Every guest query leaves AWS for a third party; the key would be a new application secret under P11.
programmatic_tool_caller On Model-written Python runs in Monty, a separate worker with memory, time and recursion limits Isolates the code, not the tools it calls — shell still runs on the host.
subagent (generalist) On, runs in the background Full harness agent inheriting model, caching, tools, plugins, interventions and sandbox Extra model calls per delegated task. P2.
caching auto On Bedrock, configures cache points and cached tool definitions Does not change whether our prompt clears the cache floor — #49.
contextManager auto Summarizes older turns; offloads bulky tool results behind a retrieve_context tool Summarization cost is not stated on these pages.
session On, random id, ./.agent/sessions SDK session manager over local files Local files on a container target — see below.
memory On, ./.agent/memory Searched and injected every turn; search_memory tool; background extraction every few turns on a small model Background model calls (P2) and guest facts in local files.
skills ./.agent/skills Agent Skills (SKILL.md), loaded on demand; no-op if absent None unless the directory exists.
builtinPlugins todos, environment todos adds todo_write; environment injects platform, date, working directory and the project's AGENTS.md (about 16 KB cap) every user turn Injects whatever the container's working directory holds.
interventions None Approval gates: ask, smart, a natural-language policy, a .cedar file, or SDK handlers smart and natural-language policies have a model judge every tool call — P2, and P5's rationale, though P5 itself governs personality scoring.
backgroundTasks { agentic: ['*'] } The model may background any compatible tool —
mcpServers None JSON file or mapping; each server continues on error by default A failed server yields no tools rather than a crash.

Turned off, it is the SDK again

Max Height is a persona character for guests, behind an unauthenticated HTTP endpoint (#55), on a $10/month ceiling (Concept-Budget-Ceiling). The harness is shaped for a general-purpose task agent. Nearly every default is either:

  • a cost multiplier — Opus, reasoning, the generalist, the web_fetch summarizer, background memory extraction; or
  • a capability a guest-facing character must not hold — shell, write, edit, programmatic_tool_caller.

Turning them off — an explicit model, effort: 'off', builtinTools: [], builtinPlugins: [], memory: false, session: false, skills: null, and a systemPrompt passthrough — leaves the plain SDK Agent that createMaxHeightAgent() already builds, plus a 0.x dependency.

What the harness composes is reachable without it. Context management with offloading, Bedrock cache points, interventions and SessionManager are SDK features; see Source-Strands-Harness-SDK-Docs.

Production: the ./.agent defaults are local files

The harness's own production page warns that sessions and memory default to directories under ./.agent, and tells container and serverless deployments to point both at durable storage — a mounted volume, a store passed through memory: { stores }, or a session manager. AgentCore Runtime hosts agents on a microVM (Source-AgentCore-Platform-2026), so this applies to us, and it applies equally to anything built on the SDK's SessionManager with FileStorage.

Memory extraction is background and turn-triggered, so a short run can end with facts unwritten. The docs say to scope the agent (await using agent = ...) or call await agent.shutdown() at the shutdown boundary.

Session semantics that bind the SDK too

The checkpoints page documents the SDK's session managers, so these hold whether or not the harness is adopted:

  • Single writer, last write wins. The built-in managers take no distributed lock. The only guard is in-process: a second invoke on the same Agent throws ConcurrentInvocationError. Across agents or processes, overlapping invocations on one session id overwrite each other's turns, and neither call errors. Creation is check-then-write, so two simultaneous cold starts on a new id both succeed and the later write wins. The docs' remedy: one writer per session id, or your own lock. Our /invocations builds a fresh Agent per request and takes sessionId from the request body (#55), so the in-process guard never engages; with a SessionManager attached, two tabs sharing an id would race exactly this way.
  • Backends. First-party: LocalFileStorage (atomic temp-file-and-rename), S3Storage, InMemoryStorage. A custom backend implements four async methods: write, read, delete, list. No first-party SQLite or PostgreSQL; Redis/Valkey only as a community Python package. AgentCore Memory is listed as a third-party AgentCoreMemorySessionManager, documented for Python only (bedrock-agentcore[strands-agents]). A TypeScript counterpart appears to exist — npm bedrock-agentcore 0.4.5 exports ./memory/strands and peers on @strands-agents/sdk >=1.5.0 — but its API was not read here.
  • Deletion removes the session's whole root directory, or every object under its S3 prefix, which needs s3:DeleteObject.
  • The session directory is a trusted data store: restrict it to the agent process. The SDK does not block symlinks inside it.
  • A custom session manager should be given storage as well; without it, offloaded tool results are embedded in every snapshot instead of stored once.
  • The harness sanitizes ids to lowercase alphanumerics, hyphens and underscores, so Refactor Parser and refactor-parser are one session.
  • Sessions are not memory. A session replays one conversation when its id is resumed; memory distills facts recalled across every conversation.

Versioning: a 0.x product whose patches add capability

  • Versions are 0.MINOR.PATCH. Minor releases break; there are no majors before 1.0, and 1.0 is "a separate decision made on customer signal".
  • Patch releases add features, including new built-in tools and plugins. The docs list "adding new built-in tools or plugins" as not breaking, since "opting out is a configuration change". Because built-ins default on, pinning to a minor (@strands-agents/harness@~0.1.0, as the docs advise) does not freeze what the agent can do. Only an explicit builtinTools and builtinPlugins list does.
  • That advice also breaks P6, which forbids ^ and ~ on pre-1.0 dependencies. An exact pin freezes capability until the next bump — but our grouped Dependabot version updates would make that bump, and new default-on built-ins would arrive inside a routine "Bump the dependencies group" PR. See Concept-Supply-Chain-Discipline.
  • System prompt text, tool descriptions and undocumented tuning may change in any release — for a persona, a reason to re-run the golden set after every bump.
  • Anything under @strands-agents/harness/internal is not a versioned surface.
  • Each release pins an SDK version range. Raising the SDK minimum within one SDK major ships as a harness patch; an SDK major that forces change ships as a harness minor.
  • Python and TypeScript are versioned independently; release tags are harness-typescript/v* and harness-python/v*.
  • The docs and the package disagree on Node. The quickstart says Node.js 20+, but the published 0.1.1 declares engines.node >=22.0.0, as does the SDK beneath it. Trust the package. We run Node 24, so neither binds us.
  • On npm: 0.1.0 published 2026-09-21, 0.1.1 on 2026-09-22 (latest as of 2026-10-01). It depends on @strands-agents/sdk >=1.19.0 <2.0.0, so it accepts our pinned 1.19.0.
  • Its footprint is not thin: tsx, esbuild, @pydantic/monty 0.0.23 and six OpenTelemetry packages, plus optional peers on the OpenAI, Google GenAI, Anthropic and Bedrock-token-generator SDKs. Each is a P6 review.

Provenance

Read 2026-10-01. Every strandsagents.com docs page has a raw-markdown twin at <page>/index.md, advertised by a <link rel="alternate" type="text/markdown"> tag. The twins were used here because an HTML-to-markdown fetch of the landing page dropped its entire "What the default harness does" list. The page set was enumerated from https://strandsagents.com/sitemap-0.xml. Package facts come from the npm registry (npm view @strands-agents/harness@0.1.1) and the harness-typescript/v0.1.1 release in strands-agents/harness-sdk.

See also: Source-Strands-Harness-SDK-Docs, Decision-Strands-SDK, Concept-Budget-Ceiling, Index.

Clone this wiki locally