Skip to main content

Forge — AI Agent Harness SDK for Python. Wrap any AI agent with 12-dimension observation, 16 detectors, 14 autonomous intervention strategies.

Project description

Forge SDK for Python

Wrap any AI agent with 12-dimension observation, 16 detectors, and 14 autonomous intervention strategies.

Installation

pip install forge-agent-sdk

Requirements: Python 3.10+ (including 3.14). Works on Windows, macOS, and Linux.

Quick Start

1. One-Line Run (Simplest)

from forge_sdk import quick_run

result = quick_run("Write a function to validate email addresses")
print(f"Success:       {result.success}")
print(f"Observations:  {result.observation_count}")
print(f"Detections:    {result.detection_count}")
print(f"Interventions: {result.intervention_count}")

2. Explore What's Available

from forge_sdk import list_presets, list_detectors, list_strategies, list_observers

print("31 Presets:  ", list_presets())
print("16 Detectors:", list_detectors())
print("14 Strategies:", list_strategies())
print("12 Observers:", list_observers())

3. Full Harness API

from forge_sdk import create_harness

# Create a harness with the "solo" preset
harness = create_harness(preset="solo")

# Run a task
result = harness.run("Build a REST API for a todo app")
print(result.to_dict())

# Dry run — observe only, no intervention
result = harness.dry_run("Test run — observe only")
print(f"Would have intervened: {result.intervention_count} times")

# Custom preset with more turns
result = harness.run_with("Add JWT authentication", preset="claude-code", turns=8)

4. Expected Output

Success:       True
Observations:  9
Detections:    0
Interventions: 0

When the harness detects an issue:

⚠  HARNESS [T6]: StaleContext detected. Context pressure 87%.
   → Strategy: Compact. Context reduced 87% → 58%. Saved 4.2K tokens.

API Reference

Functions

Function Description
quick_run(task, preset="solo", turns=4) One-shot: create harness, run task, return result
create_harness(preset="solo") Create a PyHarness instance for repeated use
list_presets() List all 31 available presets
list_detectors() List all 16 detectors
list_strategies() List all 14 intervention strategies
list_observers() List all 12 observation dimensions
get_version() Get the forge-agent-sdk version string

PyHarness Methods

Method Description
harness.run(task) Run task through full observe → detect → intervene pipeline
harness.dry_run(task) Observe and detect only (no intervention)
harness.run_with(task, preset, turns) Run with custom preset and turn count

HarnessRunResult Fields

Field Type Description
agent_id str Agent identifier
success bool Whether the task completed successfully
observation_count int Pipeline observation cycles executed
detection_count int Issues detected during the run
intervention_count int Interventions applied during the run
to_dict() dict Convert result to a Python dictionary

Presets

Available presets: solo, claude-code, langgraph, crewai, autogen, langchain, dspy, llamaindex, aider, cline, continue, copilot, cursor, windsurf, devin, custom, and more.

# Use any preset the same way
harness = create_harness(preset="claude-code")
harness = create_harness(preset="langgraph")
result = quick_run("task", preset="crewai")

Build from Source

git clone https://github.com/jalajagrawalgenai/HarnessForge.git
cd HarnessForge/packages/forge-py
pip install maturin
maturin develop

# Verify
python -c "from forge_sdk import get_version; print(get_version())"

Publishing

cd packages/forge-py
pip install maturin twine
maturin build --release
twine upload target/wheels/forge_sdk-*.whl

Or push a v* tag — CI builds wheels for Python 3.10–3.14 on Ubuntu, Windows, and macOS automatically.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

forge_agent_sdk-0.1.5-cp314-cp314-win_amd64.whl (512.6 kB view details)

Uploaded CPython 3.14Windows x86-64

forge_agent_sdk-0.1.5-cp314-cp314-manylinux_2_34_x86_64.whl (746.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.5-cp314-cp314-macosx_11_0_arm64.whl (629.8 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

forge_agent_sdk-0.1.5-cp313-cp313-win_amd64.whl (512.7 kB view details)

Uploaded CPython 3.13Windows x86-64

forge_agent_sdk-0.1.5-cp313-cp313-manylinux_2_34_x86_64.whl (746.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.5-cp313-cp313-macosx_11_0_arm64.whl (629.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

forge_agent_sdk-0.1.5-cp312-cp312-win_amd64.whl (512.2 kB view details)

Uploaded CPython 3.12Windows x86-64

forge_agent_sdk-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl (746.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.5-cp312-cp312-macosx_11_0_arm64.whl (629.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

forge_agent_sdk-0.1.5-cp311-cp311-win_amd64.whl (513.6 kB view details)

Uploaded CPython 3.11Windows x86-64

forge_agent_sdk-0.1.5-cp311-cp311-manylinux_2_34_x86_64.whl (747.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.5-cp311-cp311-macosx_11_0_arm64.whl (633.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

forge_agent_sdk-0.1.5-cp310-cp310-win_amd64.whl (515.9 kB view details)

Uploaded CPython 3.10Windows x86-64

forge_agent_sdk-0.1.5-cp310-cp310-manylinux_2_34_x86_64.whl (750.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.5-cp310-cp310-macosx_11_0_arm64.whl (636.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file forge_agent_sdk-0.1.5-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 17686b5d3b3fc8937ae0d69b601058e8712fb48346194e9284c587c452e2d28d
MD5 3a0bd4b0523d4b2f4bcc0b04c1de12b3
BLAKE2b-256 956a2bbcdef673164db27bbc1fdd53df4333f5aae3ad7ebdabff0d1cfe2ced42

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3f2dce1c3c51747328ff0cfea855b9965031e0f29bb9ccad8527cef6b43c7617
MD5 43911dca2b14634a4cc70d67102cf4e4
BLAKE2b-256 ea561dda68a189db4bdfad6e679ac618da43431f004fcaebb21006b681690505

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fb696ed91830144953a58a4bc0caaba1d404ffabcca92111ca2ddd7b5c90b68a
MD5 2c284c1d9803ed9bcf699ea81014c867
BLAKE2b-256 65cc132c63c9ab93eefa841341020b347a8b36ad0115f77b1e6c6b70ebf2ba0c

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e94e26d25e0cb256bca0695736d17817cb8d373093d566b97f9cb327d0c4dcf2
MD5 7e64e75a01e34de31e1822dedf8a5824
BLAKE2b-256 bc75cc7fe8209a7fbe46356fcd0ac305a694a5af6bd76a5cadd9119b8c0638c1

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 11cf55ce97d79e6f6504375e557aa80ec217ede00579b9fbb0ea89b0c074c8bd
MD5 d66d0d6159964a671030a5b05b95157b
BLAKE2b-256 18457cfc10071ed890aae110e0593f64fcc8e4aa75c3985e3410ef881ac4d12c

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aab7d3ede5743cec8fb92926d66b9fa17333bc5b00dc00c93a1adc9f52d17665
MD5 ef5ea36600e870dd4bbe972fa3ea3644
BLAKE2b-256 020edad502ee912e8fe61d8986b8e84788125eaeaff4b2b7c4749cafea5d81d5

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f03e325fbf0975042ca78a9c3e0a8eeb15636c32e90defdafcd8e5d38fa4b49d
MD5 84d352173fa60784798bf71d7c85ec5b
BLAKE2b-256 f7d182894f425f4717ddd75835cf157619f060d112c2641ebbbeb889621a01fb

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ba0114706717374526e97359923a728eb22075e224e5ffc52e370889adafff6e
MD5 8be57a98e60e71d411dd47c3d358cc33
BLAKE2b-256 260cde13866547454500a41983998e2efa6393a3df6ea1c88346c0226097520d

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4d92aa7126dc5ef45cc657bfe8035a20b65b39e91981ae72dc18731d51d7e9d9
MD5 da41ec538c45cddc5ef80737f896dcd0
BLAKE2b-256 6143e2e4c5f47a9e2e4b36900043048220c9c14a228c820e25b3fb61865c9705

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4b17c0404245fda376fb681af27f226b6d6f9b7422211fc70a8f474f9fbd470e
MD5 8edda8bb33b53b5b636542fc8b616ec6
BLAKE2b-256 e56fca51577acb3e918034985a2f2fbafcb0be84079f63b932a222696c54c9ea

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 800eeeb186899814ba5f5075bd4bebe85dd1a4b518d2b3f52c15a3288ff65fea
MD5 cceef40381866e5b05ec0215acf2d230
BLAKE2b-256 519874a84fd1a5a1cd0013092e5d7959d32d17968f282de9922c58591b39c4f2

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5dde694c079ac03c80670993d7ac8394c11439dfa69a0a349b171d6e517848d5
MD5 e282c369a63e677fd1adc83fe6dfe48b
BLAKE2b-256 95d97aa2065819c22cb7a61d9b20b3b34938fdbdc07ce9dbc6996f1b118b658f

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 321fc240ca4b1b706df7ad4376e2c22897c2646f353a8c4884f9dc8ed66567ff
MD5 9ad68cb3f48ffd174a36265c1ff82be5
BLAKE2b-256 1ae2c07119914b39722897b44536af9803af3f8cf1296ca41b38c234cb486e6d

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3afcdf3ee5442d83dcec6f6f0e640a2a9efb672c3a99e7df954106ba37174dc8
MD5 bb99513e78c0ba6f728da8a4fc9735ee
BLAKE2b-256 a411c155ccf8939cc17e26145c6b6ff5607858130bfecd3c8c4f7fd96be532f9

See more details on using hashes here.

File details

Details for the file forge_agent_sdk-0.1.5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 496bd4c0734f243c487783adf6b31cd71f6698a7133875131769be9696f5017a
MD5 2e7831747723af601feddc5cc8b0293b
BLAKE2b-256 be51f16b03add79f8b32734cbde06db20d7b7854edcc437407bd362197c49a35

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