AI News HubLIVE
站内改写2 min read

Show HN: LiteHarness – One SDK for Claude Agent, OpenAI Agent, Pi AI

LiteHarness is a unified SDK that provides a single TypeScript and Python interface for multiple AI agent harnesses, including Claude Agent SDK and OpenAI Agents SDK. It allows easy switching between harnesses and models, and supports streaming messages. The project is in preview.

SourceHacker News AIAuthor: ij23

Notifications You must be signed in to change notification settings

Fork 7

Star 39

BranchesTags

Open more actions menu

Folders and files

NameName

Last commit message

Last commit date

Latest commit

History

369 Commits

369 Commits

.githooks

.githooks

.github/workflows

.github/workflows

docs

docs

src

src

tests/src/sdk/server

tests/src/sdk/server

.gitignore

.gitignore

AGENTS.md

AGENTS.md

CODING_STANDARDS.md

CODING_STANDARDS.md

README.md

README.md

VISION.md

VISION.md

Repository files navigation

Call all implemented agent harnesses using the Claude Agent SDK format: Claude Agent SDK and OpenAI Agents.

lite-harness manages:

One TypeScript and Python interface for multiple agent harnesses

Harness switching with harness, model switching with model

Claude Agent SDK-compatible streaming messages and errors

Preview: the SDK is not published to npm or PyPI yet. Clone this repo to try it. If you want a packaged release, please file an issue.

Setup (clone)

git clone https://github.com/LiteLLM-Labs/lite-harness.git cd lite-harness

install the backend server's deps once — the SDK auto-spawns it from the clone

( cd src/sdk/server && npm install )

pick a model: point at a LiteLLM gateway…

export LITELLM_API_BASE=https://litellm.your-company.com/v1 export LITELLM_API_KEY=sk-litellm-...

…or go direct to a vendor:

export ANTHROPIC_API_KEY=sk-ant-... # for harness "claude"

export OPENAI_API_KEY=sk-... # for harness "openai"

TypeScript Usage

( cd src/sdk/typescript && npm install && npm run build )

import "@lite-harness/sdk" from your project after npm link, or from dist/

import { query } from "@lite-harness/sdk";

const prompt = "Fix the failing test";

// Claude Agent SDK harness for await (const message of query({ prompt, options: { harness: "claude", model: "claude-opus-4-8" }, })) { console.log(message); }

// OpenAI Agents harness for await (const message of query({ prompt, options: { harness: "openai", model: "gpt-5.5" }, })) { console.log(message); }

Python Usage

pip install -e src/sdk/python # editable install of the client (Python 3.10+)

from lite_harness import query, AgentOptions

prompt = "Fix the failing test"

Claude Agent SDK harness

async for message in query( prompt=prompt, options=AgentOptions(harness="claude", model="claude-opus-4-8"), ): print(message)

OpenAI Agents harness

async for message in query( prompt=prompt, options=AgentOptions(harness="openai", model="gpt-5.5"), ): print(message)

Supported Harnesses

claude: Claude Agent SDK / Claude Code behavior. Upstream: Python, TypeScript.

openai: OpenAI Agents SDK behavior. Upstream: Python, TypeScript.

With LiteLLM AI Gateway

Add LiteLLM AI Gateway when you want central keys, budgets, logs, fallbacks, and provider routing.

export LITELLM_API_BASE=https://litellm.your-company.com/v1 export LITELLM_API_KEY=sk-litellm-...

import { query } from "@lite-harness/sdk";

for await (const message of query({ prompt: "Debug this production trace", options: { harness: "openai", model: "anthropic/claude-opus-4-8", }, })) { console.log(message); }

Docs

SDK

License

MIT

About

Unified Server for running OpenCode, Claude Code, Codex agents

Resources

Readme

Uh oh!

There was an error while loading. Please reload this page.

Activity

Custom properties

Stars

39 stars

Watchers

0 watching

Forks

7 forks

Report repository

Releases

No releases published

Packages 0

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

JavaScript 30.6%

Python 26.3%

TypeScript 26.0%

HTML 16.3%

Shell 0.8%

Show HN: LiteHarness – One SDK for Claude Agent, OpenAI Agent, Pi AI | AI News Hub