harnesdk
agent
Warn
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 6 GitHub stars
Code Warn
- network request — Outbound network request in src/harnesdk/agent.py
Permissions Pass
- Permissions — No dangerous permissions requested
Purpose
This tool provides a Python SDK to programmatically run major AI agents and harnesses (like Claude Code and Openclaw) inside an isolated E2B sandbox environment.
Security Assessment
Overall risk: Medium. The tool executes code and runs shell commands entirely within a remote E2B sandbox, which is a strong architectural security boundary. However, it requires your Anthropic and E2B API keys to function. Outbound network requests are present in the code, and the documentation explicitly warns that AI agents running inside the sandbox could be manipulated via prompt injection to exfiltrate these credentials. There are no hardcoded secrets, and the tool does not request dangerous local system permissions, but the risk of API key leakage remains.
Quality Assessment
Quality is good on the infrastructure side but currently lacks community validation. It is under active development (last push was today) and is properly licensed under the permissive MIT license. Documentation is comprehensive and includes setup guides. However, with only 6 GitHub stars, the project has very low visibility. This means the codebase has not been widely peer-reviewed or battle-tested by the broader developer community.
Verdict
Use with caution. The sandbox approach is safe for your local machine, but you must strictly follow the documentation's advice to use short-lived, heavily budgeted API keys to mitigate potential prompt injection attacks.
This tool provides a Python SDK to programmatically run major AI agents and harnesses (like Claude Code and Openclaw) inside an isolated E2B sandbox environment.
Security Assessment
Overall risk: Medium. The tool executes code and runs shell commands entirely within a remote E2B sandbox, which is a strong architectural security boundary. However, it requires your Anthropic and E2B API keys to function. Outbound network requests are present in the code, and the documentation explicitly warns that AI agents running inside the sandbox could be manipulated via prompt injection to exfiltrate these credentials. There are no hardcoded secrets, and the tool does not request dangerous local system permissions, but the risk of API key leakage remains.
Quality Assessment
Quality is good on the infrastructure side but currently lacks community validation. It is under active development (last push was today) and is properly licensed under the permissive MIT license. Documentation is comprehensive and includes setup guides. However, with only 6 GitHub stars, the project has very low visibility. This means the codebase has not been widely peer-reviewed or battle-tested by the broader developer community.
Verdict
Use with caution. The sandbox approach is safe for your local machine, but you must strictly follow the documentation's advice to use short-lived, heavily budgeted API keys to mitigate potential prompt injection attacks.
Run major agents and harnesses programmatically, in a sandbox. Openclaw, Claude Code, Hermes agent,...
README.md
harnesdk
Run major agents and harnesses programmatically, in a sandbox. Openclaw, Claude Code, Hermes agent,...
- GitHub | PyPI | Documentation
- Created by Alaeddine Abdessalem
- MIT License
Installation
pip install harnesdk
Setup
Set the required environment variables:
export ANTHROPIC_API_KEY=your_anthropic_api_key
export E2B_API_KEY=your_e2b_api_key
Security Warning: Use budgeted and short-lived API keys. AI agents living INSIDE a sandbox can be used to exfiltrate credentials with prompt injection. We're actively working on a solution.
Usage
Run an agent and get output
import asyncio
from harnesdk.agent import AgentSession
async with AgentSession() as session:
result = await session.run("Create a hello world HTTP server in Go")
print(result.output)
Stream output in real time
import asyncio
from harnesdk.agent import AgentSession
async with AgentSession() as session:
async for chunk in session.stream("Create a hello world HTTP server in Go"):
print(chunk, end="", flush=True)
Run and serve an app from the sandbox (Jupyter)
from harnesdk.agent import AgentSession
from IPython.display import IFrame
async with AgentSession() as session:
async for chunk in session.stream(
"build an 'introducing HarneSDK' html page, and serve it with python http server under port 8000. "
"Use this pattern nohup your-server-command > /tmp/server.log 2>&1 < /dev/null &"
):
print(chunk)
page_url = session.sandbox.get_host(8000)
print(f"app live at {page_url}")
display(IFrame(f"https://{page_url}", width=700, height=400))
Output:
I'll create an introductory HTML page for HarneSDK and serve it using Python's HTTP server on port 8000.
The server is now running at **http://localhost:8000**
app live at 8000-7zerfgtyjcjpl79a141ez.e2b.app
Generated app:
Development
To set up for local development:
# Clone your fork
git clone [email protected]:your_username/harnesdk.git
cd harnesdk
# Install in editable mode with live updates
uv tool install --editable .
This installs the CLI globally but with live updates - any changes you make to the source code are immediately available when you run harnesdk.
Author
harnesdk was created in 2026 by Alaeddine Abdessalem.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found