Production-grade Harness Agent built on top of LangChain Deep Agents.
Project description
生产级的 Agent 运行时 —— 在 Deep Agents 之上构建,并把 Harness 理论工程化落地。
Highlights · Overview · Core Technology · Features · Quick Start · Contents
English · 中文
Harness Agent is a production-grade agent runtime built on the Harness 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
HarnessAgentultimately delegates todeepagents.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 | A peer inbox for agent-to-agent messaging |
| ⌨️ | 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— exposescall,stream,stream_events,aget_history, andcancel.- Checkpointing via LangGraph
AsyncSqliteSaver(or a harness-memory saver) for resumable chats.
Model routing & providers
ChatModelFactoryresolves 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.
Tools & skills
- Built-in tools: browser (harness-browser), web search, files, sub-agents, and MCP tools.
- Skills come from the Deep Agents skills middleware; manage them per agent via the CLI.
Multi-agent & collaboration
- Multiple isolated agents per process via
AgentManager+registry. - Teams peer inbox for agent-to-agent messaging.
- ACP stdio server so external IDE / terminal AIs can invoke your agent.
Safety
SecurityPolicywith 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]
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="")
📑 Contents
- Highlights
- Overview
- Core Technology
- Features
- Quick Start
- Reference
- Project Info
📖 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
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Run
make allbefore submitting - Open a Pull Request
Module boundaries and coding conventions: AGENTS.md.
🔗 Related projects
| 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orcakit_harness_agent-0.8.3.tar.gz.
File metadata
- Download URL: orcakit_harness_agent-0.8.3.tar.gz
- Upload date:
- Size: 803.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97bfa1e49f832ff9ee07e188240d5194e59ec11e00d30e98b6307b9a302a3e4c
|
|
| MD5 |
be4dce167dbf24b5da1cd251ed737542
|
|
| BLAKE2b-256 |
6d7ec3d933ca9f3cc5eef1c34054cbaa173cfb3f93dbc6a4e5b36f787b81bd8c
|
File details
Details for the file orcakit_harness_agent-0.8.3-py3-none-any.whl.
File metadata
- Download URL: orcakit_harness_agent-0.8.3-py3-none-any.whl
- Upload date:
- Size: 967.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c306cf0cab13d9b7f31f2094938c2a9400775ba5f37c1a34b487d9ae163e9ff8
|
|
| MD5 |
c8d8dcb5deceea004bb8e9e2a0607077
|
|
| BLAKE2b-256 |
8a8889be22f598c6a05dbee4e592c31c632d6e2c89de2e49db9efabaef8b0c89
|