Skip to content

Releases

Harness v0.6.2

Choose a tag to compare

@sausheong sausheong released this 03 Oct 11:48

Patch release; no API changes.

Updated dependencies:

  • github.com/anthropics/anthropic-sdk-go v1.35.0 → v1.78.0
  • google.golang.org/genai v1.49.0 → v1.72.0
  • github.com/modelcontextprotocol/go-sdk v1.5.0 → v1.8.0

Applications that also import these modules will be raised to at least these versions by Go's minimum version selection.

Also includes v0.6.1: when an MCP tool returns its result only as structuredContent (no text block), the MCP adapter passes the JSON to the agent instead of an empty result. Text still wins when present.

Requires Go 1.26, as introduced in v0.5.0.

Validation: Linux and Intel macOS CI passed the qualify gate.

Harness v0.6.0

Choose a tag to compare

@sausheong sausheong released this 28 Sep 14:15

New:

  • tools/web: ExaSearchTool (exa_search), backed by the Exa Search API. Returns ranked results with query-relevant highlights from each page, with optional search type (auto, fast, instant, deep-lite), category, include/exclude domain, and published-date filters. Requires an Exa API key (ExaSearchTool{APIKey: ...}); requests use the shared SSRF-safe search client.

Requires Go 1.26, as introduced in v0.5.0.

Validation: Linux and Intel macOS CI passed the qualify gate.

Harness v0.5.0

Choose a tag to compare

@sausheong sausheong released this 27 Sep 17:40

Breaking: Harness now requires Go 1.26. The module declares go 1.26.0, required by the Stagehand SDK. With the default GOTOOLCHAIN=auto, older local toolchains download 1.26 automatically; CI images or Dockerfiles pinned to Go 1.25 must be updated.

New:

  • tools/stagehand: a natural-language browser tool built on the Stagehand Go SDK. Actions: navigate, act, observe, extract (JSON, optional schema), get_text, screenshot, close, with persistent named sessions. Runs on local Chrome by default, or Browserbase when Config.BrowserbaseAPIKey is set. Stagehand's internal inference runs through your harness LLMProvider via NewGenerateFunc, sharing the agent's usage observers and admission guards.
  • PDF attachments are sent to Anthropic as document blocks.
  • Opus 5.5 gets adaptive low-effort thinking when reasoning is off.
  • WebFetchTool output cap raised to ~1M tokens.

Dependency updates: invopop/jsonschema v0.13.0 → v0.14.0, golang.org/x/mod v0.33.0 → v0.38.0.

Validation: full test suite and vet passed locally on Go 1.26.0, tools/stagehand passed race tests and a live local-Chrome run; Linux and Intel macOS CI passed the qualify gate.

Harness v0.4.2

Choose a tag to compare

@sausheong sausheong released this 11 Sep 15:52

Fixes required by Hand v0.3.4:

  • Preserve OpenAI-compatible finish reasons and trailing usage.
  • Reject empty and output-truncated answers rather than reporting completion; the agent loop retries generic empty responses once without increasing the output allowance or replaying tools.
  • Preserve conversation history when a summary is truncated.
  • Emit complete tool-call arguments before execution so interfaces can display command previews.

Validation: affected packages passed local race tests; Linux and Intel macOS CI passed build, vet, the full race/coverage test gate and repeated lifecycle checks.

v0.4.1

Choose a tag to compare

@sausheong sausheong released this 10 Sep 08:34

Fix duplicate tool-call emission on repeated streaming finish frames, preserve protocol cancellation causes through steering, and avoid preventive compaction when history is too short. Runtime, OpenAI adapter, and compaction tests pass.

Harness v0.4.0

Choose a tag to compare

@sausheong sausheong released this 09 Sep 17:15

Harness v0.4.0 adds explicit container execution, durable session graphs and recovery, request-level usage and budgets, and stronger cancellation and process cleanup.

Upgrade notes

  • Anthropic Usage.InputTokens includes cache-read and cache-creation tokens. Do not add those subsets again or count request events and terminal aggregates twice. Unknown usage is not zero cost. See USAGE.md.
  • New sessions use a version-1 identity header. Legacy sessions remain readable without mutation; explicit migration retains original backups. See SESSION_FORMAT.md.
  • Back up sessions, attachments, configuration and the prior consumer binary before migration. To roll back, restore compatible pre-migration state; do not assume v0.3.9 can read rewritten state.
  • Container execution fails closed when unavailable. Provider requests and explicitly trusted host-side MCP/extensions remain distinct from the tool container boundary.

Qualification

All four release PR/push checks passed before merge. Hosted Linux and Intel macOS each passed 1,114 test records and 80 lifecycle repetition records with zero skipped tests or gate errors. The tag targets tested commit 5d4632ffe3fdfeb171bb217a45ae75bef056811e. Raw results, platform identity and immutable fixture image IDs are retained in workflow artifacts.

This release does not claim coding-quality superiority to Pi or completion of Hand's original evaluation plan.

Harness v0.3.9

Choose a tag to compare

@sausheong sausheong released this 07 Sep 06:05

Changes

Consolidates v0.3.7–v0.3.9 (all landed within the same working session);
v0.3.7 and v0.3.8 were not individually released.

  • Replace the Qwen provider with litellm and openrouter — both
    thin OpenAI-compatible constructors, no new request/stream code.
  • Add Runtime.DynamicIdentityHint: caller-set text resent fresh every
    turn's system prompt, for facts (like an active model name) that need
    to win against a model's own prior in-conversation statements.
  • Add a regression test proving a mid-session model switch actually
    changes the request sent to the LLM, not just the system prompt text.
  • Add a local provider (providers/local, NewLocalProvider) for
    locally-served models — Ollama, LM Studio, llama.cpp's server, vLLM —
    no API key, defaults to Ollama's endpoint. (Briefly shipped as
    providers/ollama in v0.3.8, renamed before anything else depended
    on that name.)
  • Generalize Gemini context-window detection by tier.

Full Changelog: v0.3.6...v0.3.9

Harness v0.3.6

Choose a tag to compare

@sausheong sausheong released this 16 Aug 19:44

Changes

  • Preserve native Anthropic thinking and output configuration when Harness is used as a protocol proxy.
  • Preserve explicit zero temperature separately from an omitted temperature.
  • Add regression coverage for adaptive, enabled, and disabled thinking modes.

v0.3.2

Choose a tag to compare

@sausheong sausheong released this 27 Jun 06:35

Accumulated changes since v0.3.1 — headlined by a token-accounting correctness fix, plus a batch of security, provider-correctness, and runtime hardening.

Headline

Run-total token usage on terminal EventDone

Runtime.Run previously emitted only the last turn's token usage on its terminal EventDone, so multi-turn runs under-reported tokens to any consumer metering AgentEvent.Usage. It now accumulates usage across all turns (summing input, output, and both cache fields via a pure, non-mutating addUsage helper) and emits the run total. RunTurn is unchanged (one turn per call). The calibrator still uses per-turn figures. Behavior preserved for usage-less providers (stays nil) and single-turn runs.

Security / SSRF hardening

  • SafeHTTPClient with an IP-pinning transport; web_fetch and all web_search backends now pin a validated IP.
  • isPrivateIP blocks 0.0.0.0/8, CGNAT, and reserved ranges; dual-stack fallback dials all validated IPs.
  • Browser tool blocks private-IP resolution via host-resolver-rules.
  • Bash allowlist mode: reject real newline/CR and redirection; treat background & as a command separator (S1 bypass closed).

Provider correctness

  • Anthropic: surface in-band stream errors; Builder accumulation.
  • Gemini: emit a single EventDone with final usage; recognize 429/5xx as retryable via typed APIError.
  • OpenAI / Qwen: index-order tool emission for prompt-cache determinism; strings.Builder for tool-arg accumulation; Qwen requests usage stats.
  • Retry classifier scoped to bounded 429/529 forms.

Runtime & tools

  • Single-turn RunTurn API; bounded-synchronous KG recall and KG ingest on exchange completion.
  • Recover from pre-first-token stream errors; surface and recover from model refusals.
  • Atomic file writes (write_file/edit_file 0600, preserve mode); read_file/edit_file size caps to prevent OOM; honor ctx cancellation.
  • Calibrator recomputes estimate at EventDone (stale-estimate fix); session persistence ordering and degraded-persistence warnings.
  • Token estimation: count attached images; 1M context window for Fable 5 / Mythos 5 / Opus 4.6+ / Sonnet 4.6.
  • Configurable per-tool-result truncation cap; MCP Ping on Client.

See docs/ and package-level docs for details.

v0.1.0 — first tagged release

Choose a tag to compare

@sausheong sausheong released this 08 May 06:04

First tagged release of Harness, a reusable Go agentic platform for building LLM agents.

What's in v0.1.0

A complete, in-process, library-shaped agent harness covering 11 of the 13 standard agent-harness components:

  • Streaming agent loop (runtime.Runtime.Run) — single goroutine, <-chan AgentEvent for everything (text deltas, tool calls, tool results, done/error/aborted).
  • Four LLM providers under one llm.LLMProvider interface: Anthropic (with prompt caching), OpenAI / OpenAI-compatible / local Ollama, Google Gemini, Alibaba Qwen.
  • Tool registry & permissions with concurrency-safe partitioning (Tool.IsConcurrencySafe + LoopConfig.MaxToolConcurrency, default 10) and tool.PermissionChecker gating both at dispatch and at tool-list-assembly time.
  • Context compaction (compaction.Manager) — summarize-and-splice at clean user-message boundaries; tool-result pruning at request time; structured 9-section summary inside <analysis> + <summary> tags.
  • Cacheable system prompt assembly via llm.SystemPromptPart — splits the static cacheable prefix from the per-turn dynamic suffix; the request build is a pure function so the non-streaming retry path keeps the cache prefix valid byte-for-byte.
  • Sub-agents via runtime.SubagentResolver + tool.TaskTool, capped at depth 3 by default.
  • Lifecycle hooks (runtime.LifecycleHooks on LoopConfig.Hooks) — five typed Go callbacks: OnUserPromptSubmit, OnSessionStart, BeforeToolUse (gating, same shape as PermissionChecker), AfterToolUse, OnStop (with reason ∈ {completed, max_turns, error, aborted}).
  • MCP integration (tools/mcp package) — adapts external MCP servers' tools as tool.Tools namespaced as mcp__<server>__<tool>. Stdio + Streamable HTTP transports via the official github.com/modelcontextprotocol/go-sdk v1.5.0+. HTTP knobs include Headers (auth) and HTTPClient (mTLS, OAuth via golang.org/x/oauth2, custom RoundTripper). First-class AgentSpec.MCPServers for declarative wiring; Runtime.Close() releases sessions.
  • Skills (runtime.SkillProvider) — auto-registers a load_skill tool; index goes in the cacheable system-prompt prefix, body loads on demand. The support-agent example shows the //go:embed kb/*.md pattern.
  • Sessions — append-only session.Session in memory by default, optional session.Store for JSONL persistence and cross-process resume.

Examples

Four runnable agents in examples/:

Example What it shows
minimal/ Smallest useful agent — file + bash + web tools, REPL, ~80 lines
data-agent/ BYO custom tools hitting Singapore's open-data APIs
lta-agent/ Same shape as data-agent, demonstrates parallel tool dispatch
support-agent/ Skills + Permission + LifecycleHooks (audit log) wired together

Documentation

  • README.md — packages, Quick Start, components, design notes
  • developer.md — step-by-step guide with composition + per-Run diagrams

Install

go get github.com/sausheong/harness@v0.1.0

Requires Go 1.25.1+.

Non-goals

Harness is a library, not a product. No CLI, no UI, no channel adapters, no shell-command hooks, no skill marketplace. You own the binary; harness owns the loop. See the README's Non-goals section for the full list.

Stability

The v0.x line follows Go module semver: minor bumps may break API, patch bumps are bug-fix only.

License

MIT.