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.6-cp314-cp314-win_amd64.whl (515.4 kB view details)

Uploaded CPython 3.14Windows x86-64

forge_agent_sdk-0.1.6-cp314-cp314-manylinux_2_34_x86_64.whl (747.6 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.6-cp314-cp314-macosx_11_0_arm64.whl (624.6 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

forge_agent_sdk-0.1.6-cp313-cp313-win_amd64.whl (515.4 kB view details)

Uploaded CPython 3.13Windows x86-64

forge_agent_sdk-0.1.6-cp313-cp313-manylinux_2_34_x86_64.whl (747.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.6-cp313-cp313-macosx_11_0_arm64.whl (624.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

forge_agent_sdk-0.1.6-cp312-cp312-win_amd64.whl (515.0 kB view details)

Uploaded CPython 3.12Windows x86-64

forge_agent_sdk-0.1.6-cp312-cp312-manylinux_2_34_x86_64.whl (747.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.6-cp312-cp312-macosx_11_0_arm64.whl (624.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

forge_agent_sdk-0.1.6-cp311-cp311-win_amd64.whl (516.2 kB view details)

Uploaded CPython 3.11Windows x86-64

forge_agent_sdk-0.1.6-cp311-cp311-manylinux_2_34_x86_64.whl (748.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.6-cp311-cp311-macosx_11_0_arm64.whl (628.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

forge_agent_sdk-0.1.6-cp310-cp310-win_amd64.whl (518.6 kB view details)

Uploaded CPython 3.10Windows x86-64

forge_agent_sdk-0.1.6-cp310-cp310-manylinux_2_34_x86_64.whl (751.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.6-cp310-cp310-macosx_11_0_arm64.whl (631.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 f721be926a79f37c7884225b7f6f3383d098fd5896aa3be54654270f23e2783f
MD5 eff74885e5b892cc3461eeb071885dbf
BLAKE2b-256 f5892bf33477609df9999e9d1d0824c69fe9e9ce772093c2c7ec35fb2a89572e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3b10f6b48983b79fd9e408749ae752a318d8b7dcc42fe3c3098bbf8e55130a96
MD5 588141f91f3c08b2902401629199df73
BLAKE2b-256 31b6548269b9a15f72c5415d9e843aa5b0c083dc97d6ec57c4b50632de6e27ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5c5dc7ec3cfb8aad17226df3e71df67cb74dd8c0c07f3c9301f13dccd430b6f9
MD5 3b3a7db7e837f79a7886e316499c87a3
BLAKE2b-256 898c110749515fbcf2870443a87e2d0c3f7bdcd864b4f4ee8d6a77f6658c7018

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 52dc1a0306002ee923a15c68436c7ca6e7684330ff325ae93e28a53798a446ca
MD5 01b94fc8b83d26a1472949d9fafdf5fc
BLAKE2b-256 cce7ce344beda512251a781b882ca0b53966437c97b6972309eaa56b5d62a2a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d383683ee504638e12b712df9785d1d31370fba73c99cf730c50eb327559dc72
MD5 6e43b72955e45809be687715da8e04d4
BLAKE2b-256 70071c1c75bf9c1f7a829bed33e49f2fcb5b523487e747b434914d9a25f23e9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 60e8a04ee0b663abded6445c3a801a059a6f4220e31aeb38b96fe8d2a1b58132
MD5 9baa6273568f058ffadd5db281f6cf9a
BLAKE2b-256 cf949b6405857686c94c92611755880d953158594d73eeb7cdd8cae3554cf334

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1f862497e8cd40d121cee98709d673931052cf1fa29ddf15661b4a5e4552770c
MD5 135a8aa2f42427d5c087f506fb5ac4a9
BLAKE2b-256 fb1226aba8aa4d59c568a40a9dfeeeec1ff76a84b730ee65a5fcb8f8dcccf8cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 75bd40aba100cc480748fb8719f58bcd6c7fc051a018950f821b5bcdfa638ed3
MD5 dd022a4dda72715f2c98d38587acc7ee
BLAKE2b-256 f2bb76c50c273c35c2fc8a66de4870c345d79a499d71f5c163f804db80ce9e37

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3231c102bcc34833371d123cee6026d9ad5379e073b57cde397e6acd0def7dfc
MD5 72f019483bd71616aea35f07987ff44d
BLAKE2b-256 da1bb453632abbfca9500d3b6f2fca7c6cd9f0a1f4f690efa5d01bb016b5dab6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9b3609b7ff0c4af2073ab11acbed61487ee4b93e156dd912e30baac378f575af
MD5 9d349365879c08ac6cef7492fcedbc44
BLAKE2b-256 734f3e77a120f1ce17da6b208aade609ba68b604b8243398e351f48f09481abc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a40b82adc7b79bc5fdd66862161d84b74c45479e839ddc528e89f4d76bf04819
MD5 1cbfa7bbefe3429f6b661d682ab2f03b
BLAKE2b-256 794eb4a8e6a00a635927bce97c3d95aa92a409c67c15c85af13e7302a9121668

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 954ebd01e1762683e98ec418c4492b6d2e3ada79f06f21f34fd2da3fffb5b848
MD5 d08eda7e55e89162dd0c0f3269ff6c3d
BLAKE2b-256 3da66a556dba05f6de5295daebaf9f75bcee3cc35ceb3483c70a2a9d4d3079d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5d7419f1ce812d7af68a0f85aaa5f14d4c626ff188e372f9e6f15f00cdce1145
MD5 3f1f216610bb30793ccc09923d280d1b
BLAKE2b-256 ba35d18c7df98ff42f61e748c61f081e5334acaa83f772862049e321cf77d0db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 90306a47c53e1a998d4bed06b54d539bb28c0649d6f709efdb9408730c6ad956
MD5 4996a00728f1bb4ebfecc372ea6a10fe
BLAKE2b-256 5ce9ba0beedcacb3faa1a64a6cfa9c0839239ea89612af258c6759edc66d428b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6441abb1b6441fdd1fc673b3761247a7a780a0f0819ba0fff0c37153bcd15801
MD5 73cba8cbdea218f34e15e63a32813c53
BLAKE2b-256 d1e0190481ca6c5d4b3c98592f41038d74e2b3c2fee168f4b9caaccf6a63d031

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