SuperAPI AI Directory

dym-harness-sdk-quickstart

Agents & models

View repository

Updated 10-18 01:21

About this skill

Skill: dym-harness-sdk-quickstart — build a pre-assembled agent

When to use

  • You want an agent "fully equipped" (shell, file, web, subagent, todo, memory, session, offload context) in 1 line, without writing the agent loop yourself.
  • You want to see what the harness assembles BEFORE spending money calling the model.
  • Produces: a strands.Agent REGULAR (not a separate wrapper class) — everything the SDK can do is still doable after building.

Steps

  1. Isolated venv, Python ≥ 3.10 (macOS's system Python 3.9 can't install it):
    python3.13 -m venv .venv-strands && .venv-strands/bin/pip install -q strands-harness
    # provider khác Bedrock: strands-harness[anthropic] | [openai] | [gemini] | [ollama] | [litellm]
    
  2. Build the agent WITHOUT calling the model (measured 2026-09-28, rc 0):
    from strands_harness import create_harness
    a = create_harness(session=False, memory=False)
    print(sorted(a.tool_names))
    # ['edit','programmatic_tool_caller','read','retrieve_context','retrieve_offloaded_content',
    #  'shell','strands_manage_background_task','subagent','todo_write','web_fetch','write']
    
  3. Actually run (costs money): a("Find the slowest test in this repo"). Default model = Bedrock Opus 5 → needs AWS credentials; change with model="anthropic/claude-fable-5" (string provider/name).
  4. Main parameters (create_harness, keyword-only): model · effort (auto|off|minimal..max) · instructions (merged AFTER the harness contract) · tools · mcp_servers · builtin_tools · session (default ./.agent/sessions) · memory (default ./.agent/memory) · skills · builtin_plugins · interventions · **agent_kwargs (explicit SDK values ALWAYS WIN over the harness defaults).
  5. Enable trace: set OTEL_TRACES_EXPORTER=otlp (or console) before building; if not set, telemetry is off.

Rules

  • Measured pitfalls: model has no native web search (Bedrock) → the harness just prints a warning then drops the tool web_search, no error. If you need search then builtin_tools={'web_search': 'exa'}.
  • Measured pitfalls: session/memory is ON by default and writes to ./.agent/ of the cwd — for experiments turn it off (session=False, memory=False) so you don't dirty the repo.
  • Tools with the same name across 5 sources (consumer · builtin · MCP · plugin · subagent) → raise immediately at build time; MCP tools only know their name after connecting so they slip past this check.
  • Memory extract runs in the background: short-running scripts must call shutdown, otherwise data may be lost.
  • Production stuff: the harness is at 0.x and enables by default the ContextManager of strands.experimental — no semver commitment.