Skip to main content

Harness Agent Banner

Production-grade agent runtime built on the Harness theory — a thin, production-ready façade over Deep Agents.

Python 3.11+ License: MIT PyPI Code Style: Ruff GitHub stars

Highlights · Overview · Core Technology · Features · Quick Start · Contents

English · 中文


Harness Agent is a production-grade agent runtime built on the harness engineering theory. At its core it is a thin, battle-tested encapsulation and engineering layer around Deep Agents — we take the elegant create_deep_agent primitive from Deep Agents and package it with everything you need to run agents in production: multi-provider model routing, persistent memory, browser/search tools, a multi-agent registry, pluggable storage backends, and a terminal CLI.

💜 A tribute to Deep Agents. Harness Agent stands on the shoulders of Deep Agents (by the LangChain team). Our HarnessAgent ultimately delegates to deepagents.create_deep_agent, and everything else — model routing, backends, tiered memory, the agent registry, CLI, and ACP — is the engineering we added on top. Deep Agents gives us the agentic foundation; Harness gives it a home for production.

✨ Highlights

Feature Description
🧩 Built on Deep Agents A faithful, production-focused facade over deepagents.create_deep_agent — kudos to the Deep Agents project
🔀 Model routing ChatModelFactory with OpenAI, Anthropic, AWS Bedrock, and 17 editable provider presets
🧠 Persistent memory harness-memory middleware with tiered L0→L3 distillation
🛠️ Rich toolset Browser automation, web search, file ops, sub-agents, and MCP tools out of the box
🗂️ Multi-agent registry AgentManager runs many isolated agents in one process
💾 Pluggable backends Local disk, S3, COS, or PostgreSQL as the agent workspace
🔌 ACP integration A stdio ACP server so IDE / terminal AIs can drive your agent
🔒 Safety built-in Tool guardrails, filesystem permissions, and PII redaction
💬 Teams Peer inbox; peer_invoke_mode selects sync / async / both
⌨️ Terminal CLI Interactive chat, provider/skill config, and agent management

📌 Overview

Harness Agent is a library (not an app) that turns Deep Agents into a deployable runtime. A single HarnessAgentManager owns a registry of agents; each agent wires together a model, a set of tools/skills, a memory backend, and a LangGraph checkpoint — all assembled through the harness layering discipline (L0 I/O helpers → L1 workspace facade → L2 business logic → L3 assembly).

Harness Agent's design goal: let you build a production-grade agent from Deep Agents in a few lines of code, while keeping model choice, memory, storage, and safety swappable without rewriting your agent.

🧠 Core Technology

Layer Technology
Language Python 3.11+
Agent core Deep Agents (create_deep_agent)
Graph runtime LangGraph + SQLite checkpoint
Model routing ChatModelFactory (OpenAI / Anthropic / Bedrock + 17 presets)
Memory harness-memory middleware
Browser / search harness-browser + web search
Workspaces BackendWorkspace: local / S3 / COS / PostgreSQL
ACP agent-client-protocol
Build / quality hatchling · ruff · mypy · pytest

🤔 Features

Agent runtime

  • HarnessAgentManager — a registry that creates, lists, and streams many agents in one process.
  • HarnessAgent — exposes call, stream, stream_events, aget_history, aappend_messages, and cancel.
  • Checkpointing via LangGraph AsyncSqliteSaver (or a harness-memory saver) for resumable chats.

Model routing & providers

  • ChatModelFactory resolves a model name to the right client.
  • First-class providers: OpenAI (incl. OpenAI-compatible via base_url), Anthropic, and AWS Bedrock (optional [bedrock] extra).
  • 17 user-editable provider presets, including Hunyuan, Kimi, GLM, DeepSeek, MiniMax, and Moonshot.

Memory (tiered)

  • Each turn is captured as L0 raw events, then distilled asynchronously into L2 atoms (AtomCards) and L3 entity pages.
  • Powered by the harness-memory middleware; memory travels with the workspace.
  • Recall is frozen once per user turn and appended to the model-facing user message, keeping the system prompt stable. Checkpoints preserve recall snapshots for exact replay while chat history and capture retain the original user text. See recall and prompt caching.

Tools & skills

  • Built-in tools: browser (harness-browser), web search, files, ask_user_question for respond-only human decisions, optional Seedream/Seedance media generation, sub-agents, and MCP tools. Set ask_user_enabled=False for unattended agents.
  • Skills come from the Deep Agents skills middleware; manage them per agent via the CLI.
  • Optional system_files_path (e.g. .octop) keeps skills, sessions, .env, and sqlite under a workspace subdir while persona markdown stays at the root.

Enable provider-neutral generate_image and generate_video tools with Volcengine Ark:

from harness_agent import HarnessAgentConfig, MediaGenerationConfig

config = HarnessAgentConfig(
    # ...providers/default_model...
    media_generation=MediaGenerationConfig(api_key_env="ARK_API_KEY"),
)

Generated files are stored under generated/images/ and generated/videos/ in the agent workspace. The tools are deferred by default and become visible through the configured tool-search strategy only when needed. Expected provider failures return a structured, model-visible error envelope with retry guidance instead of terminating the agent stream.

Multi-agent & collaboration

  • Multiple isolated agents per process via AgentManager + registry.
  • Teams peer inbox for agent-to-agent messaging. peer_invoke_mode selects the ask_agent surface (sync / async / both); request-scoped overrides may tighten it but cannot add background dispatch.
  • ACP stdio server so external IDE / terminal AIs can invoke your agent.

Safety

  • SecurityPolicy with tool guardrails, filesystem permissions (FilesystemPermission), and PII redaction middleware.

CLI

harness-agent provides: init, chat, agent, config (e.g. config provider add), skill, and update.

🚀 Quick Start

Prerequisites

  • Python 3.11+
  • A model provider API key (OpenAI / Anthropic / Bedrock / compatible)

1. Install

# Core SDK — agent runtime, model routing, tools, skills, backends
pip install orcakit-harness-agent

# With the terminal CLI — interactive chat, config, skill management
pip install orcakit-harness-agent[cli]

# Multiple extras — comma-separated inside one pair of brackets (quote for the shell):
pip install 'orcakit-harness-agent[object-storage,desktop]'
pip install 'orcakit-harness-agent[cli,all]'

Optional dependency extras (install only what you need; missing extras fail at use-time with an install hint):

Extra What it adds
cli Terminal CLI (harness-agent)
bedrock AWS Bedrock provider
object-storage Tencent COS + Alibaba OSS + Huawei OBS SDKs
desktop Desktop screenshot / input (mss, pynput, pillow)
web-search-all All web-search backends (Tavily / Brave / Google)
remote-backends Postgres / upstream S3 via deepagents-backends (Python ≥3.12)
observability Langfuse
acp ACP agent runner
all All library feature extras above (excludes cli; use [cli,all] for both)

2. Initialize & configure

harness-agent init
harness-agent config provider add   # choose a provider and paste your key

3. Chat

harness-agent chat

Programmatic use

from harness_agent import HarnessAgentManager, HarnessAgentConfig, ProviderConfig, ChatRequest

manager = HarnessAgentManager()
agent: HarnessAgentConfig = manager.create_agent(
    name="assistant",
    provider=ProviderConfig(name="openai", api_key="sk-..."),
    model="gpt-4o",
)
request = ChatRequest(message="Summarize the Harness theory in one paragraph.")
async for chunk in agent.stream(request):
    print(chunk.delta, end="")

Progressive tool loading

Large, low-frequency tool sets can be hidden until the model needs them. The default client mode registers an ordinary tool_search function, so it works with any Chat Completions-compatible model that supports function calling. A deferred tool remains visible by its real name and short description, while its parameter schema is replaced by a lightweight reference. A search result is appended to the conversation, the matched full schemas replace their references on the next model step, and the loaded set persists for the thread. The selected tool is still called by its real name through the normal DeepAgents ToolNode, security guard, and interrupt policy.

from harness_agent import HarnessAgentConfig, ProviderConfig

provider = ProviderConfig(
    id="openai",
    base_url="https://openai-compatible.example/v1",
    api_key="sk-...",
    protocol="openai",
)

config = HarnessAgentConfig(
    providers=[provider],
    default_model="openai/your-function-calling-model",
    tools=[generate_image, generate_video, generate_3d_asset],
    deferred_tools=frozenset(
        {"generate_image", "generate_video", "generate_3d_asset"},
    ),
    defer_mcp_tools=True,
    tool_search_mode="client",  # default; no Responses API required
)

Set tool_search_mode="native" to use OpenAI Responses hosted tool_search or Anthropic hosted defer_loading / tool_reference. Native mode additionally requires ModelConfig.native_tool_search=True; unsupported routed models use the configured tool_search_fallback. Set the mode to eager to disable progressive loading.

📑 Contents

📖 CLI reference

Command Description
harness-agent init Bootstrap a workspace and config
harness-agent chat Interactive chat with an agent
harness-agent agent Create, list, and manage agents
harness-agent config Provider / model configuration (config provider add)
harness-agent skill Enable / disable per-agent skills
harness-agent update Check for and install updates

📁 Project layout

src/harness_agent/
  agent.py          facade over deepagents.create_deep_agent
  manager.py        AgentManager — multi-agent registry
  config/           configs, provider & model presets
  llm/factory.py    ChatModelFactory — model routing
  backends/         BackendWorkspace — local / S3 / COS / Postgres
  builtin/          tools + skills + seed files
  middleware/       model_router, skill_filter, tool_guard, memory, pii, ...
  memory/           MemoryRuntime (harness-memory wrapper)
  protocols/        langgraph / openai / mcp streaming
  acp/             ACP stdio server
  teams/           peer inbox
  cli/             terminal CLI

🛠️ Development

Prerequisites: Python 3.11+, uv

make install          # pip install -e ".[cli,dev]"
make all              # lint + typecheck + test

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Run make all before submitting
  4. Open a Pull Request against main

Module boundaries and coding conventions: AGENTS.md.

See CONTRIBUTING.md for branching, PR, and release details (release/* → main auto-publishes to PyPI).

Project Description
deepagents The agentic foundation Harness Agent wraps — ❤️ tribute
harness-memory Memory system behind the tiered recall
harness-browser CDP browser automation used by the agent
harness-gateway Multi-platform IM channel bridge
Octop The self-hosted assistant that composes the Harness stack

📄 License

This project is licensed under the MIT License.

Metadata

Release files for orcakit-harness-agent 1.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for orcakit-harness-agent 1.0.12
File Size Uploaded
orcakit_harness_agent-1.0.12.tar.gz 1.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for orcakit-harness-agent 1.0.12
File Interpreter ABI Platform
orcakit_harness_agent-1.0.12-py3-none-any.whl Python 3 none any Details

Total release size: 2.7 MB

Release files / orcakit_harness_agent-1.0.12.tar.gz

Download URL orcakit_harness_agent-1.0.12.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
f47153eae38a99cc1c4f9256da66f5097a04071b891c454d0a1debf7dddc7741
BLAKE2b-256 checksum
How to use checksums
c9658810983d51d161c39056c6cb8b09dd0102c12eba901da1c52dfd1daa1ad5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / orcakit_harness_agent-1.0.12-py3-none-any.whl

Download URL orcakit_harness_agent-1.0.12-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
420a6d4f37ba7318f62d44aee1bf05417d990fc4f6b30d480d55b6d1033f4d7b
BLAKE2b-256 checksum
How to use checksums
a8bd92de2bef920dce06cc31c0d5c7fa140f23f52c86f79d64fac88fff0fc73d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release history Release notifications | RSS feed

1.0.14

2 release files

1.0.13

2 release files

This release

1.0.12 This release

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.27

2 release files

0.9.26

2 release files

0.9.25

2 release files

0.9.24

2 release files

0.9.23

2 release files

0.9.22

2 release files

0.9.21

2 release files

0.9.20

2 release files

0.9.17

2 release files

0.9.16

2 release files

0.9.15

2 release files

0.9.14

2 release files

0.9.13

2 release files

0.9.12

2 release files

0.9.11

2 release files

0.9.10

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page