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

All 31 presets: solo, langgraph, crewai, autogen, langchain, openai-swarm, semantic-kernel, haystack, dspy, llamaindex, taskweaver, agno, atomic-agents, bee-agent, pydantic-ai, claude-code, aider, cline, continue, vercel-ai, copilot, cursor, windsurf, devin, amazon-q, replit-agent, pearai, bolt-new, lovable, v0, custom.

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

Uploaded CPython 3.14Windows x86-64

forge_agent_sdk-0.1.7-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.7-cp314-cp314-macosx_11_0_arm64.whl (624.8 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

forge_agent_sdk-0.1.7-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.7-cp313-cp313-macosx_11_0_arm64.whl (624.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

forge_agent_sdk-0.1.7-cp312-cp312-win_amd64.whl (515.1 kB view details)

Uploaded CPython 3.12Windows x86-64

forge_agent_sdk-0.1.7-cp312-cp312-manylinux_2_34_x86_64.whl (747.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.7-cp312-cp312-macosx_11_0_arm64.whl (624.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

forge_agent_sdk-0.1.7-cp311-cp311-win_amd64.whl (516.3 kB view details)

Uploaded CPython 3.11Windows x86-64

forge_agent_sdk-0.1.7-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.7-cp311-cp311-macosx_11_0_arm64.whl (628.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

forge_agent_sdk-0.1.7-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.7-cp310-cp310-macosx_11_0_arm64.whl (631.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 ba75b32ad74ff8479a4f3b85c6c696f08c87e7e560db4a419462e9733ee19cfc
MD5 7f1949d8d029d378991b94ee2ae85301
BLAKE2b-256 fe1b25ae5accb1025b7eecf60b83bc3322bce03b8609b75bd7c832fe5d7e6039

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8c3d3d718c3d8ce1b30dcf1c447572dc67817dde6147faef7732dde880206eab
MD5 1248e643bfc5a865fc6e6ec445f1bae7
BLAKE2b-256 a0456041c8a15c97cd5830d6082edc84922f3b814eb3641e44c1a6fd8de3ba87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7fa7ef131f7d0f917d96e4242505e2bc2141aec0f3d1fbe60aaac376f49392fc
MD5 72d5e00ef6174b3aab3e830bb101b2d5
BLAKE2b-256 1b1f63b5434558ddb93837203f6bf36021a4f917405f62a9ffd02ea4b6051b49

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b9105a63f833d53fbd7ee836395bf6018086fe4f868fbb5098fa8ee8a543fff9
MD5 bf51fb5c6e7f95bd984557fa5cf78a90
BLAKE2b-256 85835f559ec42fa66a476a3658b80fa90b9250279259b8f170a917000b65172e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2bb001c5b60a859cd4761c28d10eb6b5706c0219158b427f5ea1fabbe03e4431
MD5 d61ebce46e4f16ed86ac83901cfe13ee
BLAKE2b-256 8ab740aa942415d22ba2070c164b55b4297c6846b045f702c9d79582e0d4a3b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1f885e79152aca263587d0ba1f8788dbf4a79822fe57ffbb4b709b6c32a28a42
MD5 251abaa72c3837630465273ee2bc2c69
BLAKE2b-256 7b36c67f6f2227f09994435c3b70b498840a34c013c6f1c5a29813496e89767c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dc09db6c3468db51cc0e27fa548b0186d7266cf646e98e4129b07d27b25dcf73
MD5 3f8d737214026ad6c26658bb0760e088
BLAKE2b-256 c8f14922e1947f4bbeab4629e4c55f237906e2560b031911021ef0d795d6c579

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 dfc4004252ed96fac71909686915a6c33af1ae4f3989a8cfb96863e88ebe0e0c
MD5 c0878bbe0793a8be0951ffb92761e39d
BLAKE2b-256 6d38a2563f63c2bcd83098eab5dc3ea283716fca8035e09f7d96b375f6fa6ccb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 13a624a36246b54e1a14e0ef1ca5b6d43b0c2350e1186a0b5d5028b787defd62
MD5 620e07c458e441aa4f9fca926246bfdb
BLAKE2b-256 51900c79b32e7b19b95fc5dd926e87c1c1d532704d11cf2ec81e987396352565

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b242c55577cc651232fc2c78125e98d8342ebdfc04dbfaae29e20cbc40b48aa1
MD5 4f6e76c4791e345934fc9f8ee906bcca
BLAKE2b-256 746c8d19d51f82ddd629e9b2f2a31a37ca79eb3bed2d5cf767e307ae9e22fc98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f87ccc06c3cfd3a86b02cf96289f91d9bc2165ef9d73a5f4777d21fad54a5fe7
MD5 f07c7f3429a3802676206b484c978c4c
BLAKE2b-256 69f5a8276d84f95f89e6a7808d35aefe6a086aa1087bb05a6e1d8a507171cc1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 69a6dba7f5d104b560084fba3b2496d0d4a266c0d173b935f8037ad9c0ab999d
MD5 3b32ba35a6027741fa3914ccd2ec0e86
BLAKE2b-256 72e5722fc83f376834cfa156c8a5eeea4bb275571ea65189a6639d70b693991a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 446a45a2978a900df6f20620d314eb0d786e2134aa3f5d96b1ca0fe11f1a7fbd
MD5 444ea453d47ccfd18ac5c13787e3aec0
BLAKE2b-256 a30688f4fa9f4793a633ded54c221454b608275724c1d84a2021ac5b9a274b59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b11ef8a48e7b1e35c7ee0a3739e430b70003cf95fcdde55f9492848dd637a235
MD5 d60455c30b01a3b56d58f03bddcbe3fc
BLAKE2b-256 195e3ce327b2d461c0f663eb555bcbdc235ab355189ef9b3fdd610efbd051787

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1a03e6df9f18d8c8b7319fa772ae980f0769f87c908a58cfb52e08b01639c6ec
MD5 318c75e7691753f94d33a617c7edbed9
BLAKE2b-256 731aa3a3431e0bb78a539fd3e5ba23b5aa3de74402277ac406cd3656a7374a4f

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