open-harness  by MaxGfeller

Code-first SDK for building powerful AI agents

Created 1 month ago
373 stars

Top 76.0% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

OpenHarness is a code-first, composable Software Development Kit (SDK) designed for building powerful, general-purpose AI agents. Inspired by Vercel's AI SDK and agent harnesses like Codex, it targets developers seeking to programmatically construct sophisticated AI applications. The SDK offers a flexible architecture, enabling agents to interact with tools, manage conversations, and integrate seamlessly with frontend frameworks like React and Vue.

How It Works

The core of OpenHarness revolves around the Agent class, which orchestrates AI model interactions and tool execution. Agents can be equipped with pre-built or custom tools, such as filesystem access (createFsTools) and bash command execution (createBashTool), powered by Node.js providers. Session objects manage multi-turn conversations, incorporating automatic context window compaction and retry mechanisms. Composability is achieved through a middleware system (apply, withTurnTracking, withCompaction, withRetry), allowing developers to chain and customize agent behavior.

Quick Start & Requirements

To get started, install the core packages: npm install @openharness/core @ai-sdk/openai. Running the provided examples requires cloning the repository, navigating to the project directory, creating a .env file with your OPENAI_API_KEY, and executing pnpm install && pnpm build. A Node.js environment and an OpenAI API key are necessary prerequisites. Comprehensive documentation is available at docs.open-harness.dev.

Highlighted Details

  • Code-first SDK enabling programmatic construction of AI agents with composable tools and middleware.
  • Built-in support for multi-turn conversations, featuring automatic context compaction and retry logic via the Session API.
  • Frontend integration packages (@openharness/react, @openharness/vue) facilitate building streaming chat UIs.
  • Includes essential tools for interacting with the local filesystem and executing bash commands.

Maintenance & Community

The provided README snippet does not contain specific information regarding notable contributors, community channels (e.g., Discord, Slack), sponsorships, or project roadmaps.

Licensing & Compatibility

OpenHarness is released under the MIT license. This permissive license allows for broad usage, including commercial applications and integration into closed-source projects without significant restrictions.

Limitations & Caveats

The current implementation, as presented in the quick start and examples, is heavily dependent on the OpenAI API. The README does not specify support for alternative LLM providers or outline strategies for offline agent execution.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
2
Star History
388 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.