Skip to main content

Production-grade Harness Agent built on top of LangChain Deep Agents.

Project description

Harness Agent Banner

Harness Agent

Production-grade AI agent platform built on LangChain Deep Agents.

PyPI CI Python 3.11+ License: MIT

English · 中文


Highlights

  • Deep Agent Architecture — Built on LangGraph with hierarchical agent routing, tool orchestration, and stateful conversation management
  • Multi-Agent ManagementAgentManager registry with metadata/tags, per-thread cancel, and id-based stream routing
  • Multi-Model Support — OpenAI, Anthropic, AWS Bedrock, and any OpenAI-compatible endpoint out of the box; 17 provider presets in a user-editable JSON template
  • Built-in Tool Ecosystem — Browser automation, desktop screenshots, web search (Tavily/Brave/Google/Kimi), and extensible skill system
  • Production Ready — Checkpoint persistence, configurable backends (SQLite, S3, COS, PostgreSQL), and structured logging
  • Terminal-First CLI — Rich interactive chat interface with skill management, config wizard, and workspace initialization

Overview

Harness Agent is an open-source AI agent framework that provides a complete runtime for building, deploying, and managing autonomous AI agents. It wraps LangChain Deep Agents with batteries-included tooling: multi-provider model routing, persistent memory via harness-memory, browser automation via harness-browser, and a terminal CLI for interactive use.

The project is a single Python package with an optional CLI extra:

Install Description
pip install orcakit-harness-agent Core SDK — agent runtime, model routing, tools, skills, backends
pip install orcakit-harness-agent[cli] Adds the terminal CLI — interactive chat, config, skill management

Core Technology

Layer Technology Purpose
Agent Runtime LangGraph + Deep Agents Stateful graph execution with hierarchical agent routing
Model Providers LangChain model integrations Unified interface for OpenAI, Anthropic, Bedrock, and custom endpoints
Memory harness-memory Hierarchical recall with FTS search and pluggable backends
Browser harness-browser CDP-based browser automation with profile-persistent login
Checkpointing LangGraph Checkpoint + SQLite/Postgres Conversation state persistence across sessions
CLI Framework Click + Rich + Textual Terminal UI with streaming output and rich formatting

Features

Agent Runtime

  • Hierarchical agent routing with configurable delegation
  • AgentManager — in-memory registry for creating and managing multiple agents by agent_id
  • Stateful conversation management with checkpoint persistence
  • Per-thread stream cancellation via manager.cancel(agent_id, thread_id)
  • Middleware pipeline for request/response interception
  • Configurable system prompts and persona management

Model Routing

  • OpenAI — GPT-4o, GPT-4, GPT-3.5, and any compatible endpoint
  • Anthropic — Claude 4 Sonnet, Claude 4 Opus, Claude 3.5 family
  • AWS Bedrock — Claude, Titan, and other Bedrock models
  • Custom — Any OpenAI-compatible API via base URL configuration

Built-in Tools

  • Browser Automation — Navigate, click, type, screenshot via harness-browser
  • Desktop Screenshot — Full-screen capture for visual context
  • Web Search — Tavily, Brave, Google, Kimi (auto-detect or explicit selection)
  • Extensible Skills — Custom tool registration with typed schemas

Storage Backends

  • SQLite — Zero-config local persistence (default)
  • Tencent Cloud COS — Object storage for attachments and artifacts
  • Remote Backends — S3, PostgreSQL, Azure, GCS, MongoDB, Redis via deepagents-backends

CLI

  • Interactive streaming chat with rich markdown rendering
  • Workspace initialization (harness-agent init)
  • Provider configuration wizard (harness-agent config provider add)
  • Skill management and discovery

Quick Start

# Install the CLI (includes core SDK)
pip install orcakit-harness-agent[cli]

# Initialize workspace
harness-agent init

# Configure a model provider
harness-agent config provider add

# Start chatting
harness-agent chat

Programmatic Usage

from harness_agent import HarnessAgentManager, HarnessAgentConfig, ProviderConfig, ChatRequest

config = HarnessAgentConfig(
    workspace_dir="./workspace",
    providers=[ProviderConfig(id="openai", api_key="sk-...", models=["gpt-4o"])],
)

manager = HarnessAgentManager()
entry = manager.create_agent(config)

async for chunk in manager.stream(entry.agent_id, ChatRequest(messages="Hello!")):
    print(chunk.content, end="", flush=True)

Advanced: For direct backend operations, access the cached agent via entry.agent. HarnessAgent can also be constructed directly, but AgentManager is the recommended entry point for all new code.

Multi-Agent Management

from harness_agent import HarnessAgentManager, HarnessAgentConfig, ProviderConfig

manager = HarnessAgentManager()

# Register agents with metadata and tags
entry = manager.create_agent(
    config,
    metadata={"tenant": "acme", "env": "prod"},
    tags=["fast", "gpt4o"],
)

# Query agents by metadata / tags
agents = manager.list_agents(metadata={"env": "prod"}, tags=["fast"])

# Stream by agent_id
async for chunk in manager.stream(entry.agent_id, request):
    print(chunk)

# Cancel mid-stream
manager.cancel(entry.agent_id, request.thread_id)

Architecture

src/harness_agent/          Core SDK — agent runtime, model routing, tools, skills, backends
src/harness_agent/cli/      Terminal CLI — thin view layer over the SDK

The CLI is a thin view layer that delegates all agent logic to the core SDK. This separation enables future UIs (web, IDE extensions) to reuse the same SDK.


Development

Prerequisites: Python 3.11+, uv

git clone https://github.com/orcakit/harness-agent.git
cd harness-agent
make install          # install dev dependencies
make all              # lint + typecheck + test (CI ship bar)
Command Description
make lint Ruff check + format check
make format Auto-fix and format
make typecheck mypy strict
make test pytest with coverage
make build Build wheel + sdist

Contributing

Contributions are welcome! Please read CONTRIBUTING.md and run make all before opening a PR.

Security issues: see SECURITY.md.


Release

Tag v<version> (e.g., v0.2.0) to trigger a PyPI release via GitHub Actions with trusted publishing.


Related Projects

Project Description
Octop Self-hosted multi-user AI control plane
harness-memory Pluggable memory system with hierarchical recall and FTS
harness-browser AI-friendly browser automation via CDP
harness-gateway Multi-platform IM channel bridge for AI agents

License

MIT

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

orcakit_harness_agent-0.7.1.tar.gz (715.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orcakit_harness_agent-0.7.1-py3-none-any.whl (856.1 kB view details)

Uploaded Python 3

File details

Details for the file orcakit_harness_agent-0.7.1.tar.gz.

File metadata

  • Download URL: orcakit_harness_agent-0.7.1.tar.gz
  • Upload date:
  • Size: 715.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for orcakit_harness_agent-0.7.1.tar.gz
Algorithm Hash digest
SHA256 ece9a53e3ba332e99010f2d6001a013ae8a7ed2d48fc6d8bbfbc5923e219fce9
MD5 34ec263b5b4b571df02046fdad3ebd4c
BLAKE2b-256 b78ce45ca0987dfcb7f240537150902e8abc326940b61c4c4e4a80daab670858

See more details on using hashes here.

File details

Details for the file orcakit_harness_agent-0.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for orcakit_harness_agent-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cb3fbe5422b7caacbb896012f92068b48753c32287e4d729bbd7ea5099d98045
MD5 7b24d81c47fc11ae3aee46cbe028a2f8
BLAKE2b-256 00e49b6f2d52cf9f13e6d527ca7914c39827022a52005544976137c9166dd325

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page