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.2.3-cp314-cp314-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.14Windows x86-64

forge_agent_sdk-0.2.3-cp314-cp314-manylinux_2_34_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.2.3-cp314-cp314-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

forge_agent_sdk-0.2.3-cp313-cp313-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.13Windows x86-64

forge_agent_sdk-0.2.3-cp313-cp313-manylinux_2_34_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.2.3-cp313-cp313-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

forge_agent_sdk-0.2.3-cp312-cp312-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.12Windows x86-64

forge_agent_sdk-0.2.3-cp312-cp312-manylinux_2_34_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.2.3-cp312-cp312-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

forge_agent_sdk-0.2.3-cp311-cp311-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.11Windows x86-64

forge_agent_sdk-0.2.3-cp311-cp311-manylinux_2_34_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.2.3-cp311-cp311-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

forge_agent_sdk-0.2.3-cp310-cp310-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.10Windows x86-64

forge_agent_sdk-0.2.3-cp310-cp310-manylinux_2_34_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.2.3-cp310-cp310-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 923c33f167db0068b649dd445b31f33623f26bc31709310be27dce54bc05434c
MD5 2d0b089a5a687031667a42454eb37c2d
BLAKE2b-256 09442afdf227796c80f4a6548ebf6fc4f5c5a6e7254600aff4aef6a7e84b35ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d384fdb4967cf6b0fa09465543f092ad538c231ef849216c69867c7c8610277f
MD5 3a10dbc84bbeb458b94a4be1e4e22684
BLAKE2b-256 5a1500a27937659eb360eaf4e3dc9fff84dda2a5d1b7ce37b717bc37f3873a13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ea7e081a2d9586abbbcafba742ae97aa1544a84d3a9c3521b5a4a25b640914b2
MD5 428f02cdc2d0b8cb5bc2984061428c6a
BLAKE2b-256 66e4f0cadc87288a1e030d445ec45fc84aded80571f864c8db0b286876fbcba3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 efabf3e5b3d8e377040290974bf34068a5b89c9aecc948471835251507372f66
MD5 07e0203dc078b6b84f080d82407239d1
BLAKE2b-256 463d24b3243c15d9b8ce735a71edb30a02be96014170bda8852055831a39c941

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b1999fa75401b14f43b049c2f1028caf79738cdebc336d8afa121adde8438526
MD5 c2040d478cd2e0dbfdfbbc923cf8c3fb
BLAKE2b-256 cd1079a7eb943c7ac20158ea622a8fe5926e6536bad80f1f1341a11c27db4628

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 49c582f109d657638b97a08d19844cc9ed1dc3974c58ba830b1c0273f7a07d18
MD5 1862bfdfd613288b13cac4f3b8b6a494
BLAKE2b-256 dcf1553bcb95353a803c5dae2a59e7610984444606a2a4b3a79922fd784a7036

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 45c44ceb9e2f5a77a4ee0730697a7df355e5556b8806bc95684c11264a0cd3eb
MD5 6b94fb65f0ad3becf396a14d79a733c1
BLAKE2b-256 e973fa85e604cf76b79448fea1e9752406e6442e8820340607e822ff0bbafb57

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 31220bd0da6659ca0cbc4d91e0a95d183363832139d6d1238ad7a1e17484a2b4
MD5 474ea6245bda507382d81eb4477da19c
BLAKE2b-256 5a8c738d163b4b353cbb6ff3b41a0578344e5e8b55a2be79ce1a64fe948d779a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bf6829f2fb46c68464553ec7aa0852dc0821b5bb98e73552c36731a8ea0adfda
MD5 411645b2c4538ba83071ff2cd03bcce8
BLAKE2b-256 0ef702aa8c08461a8f04080bbffc5ca19261ffafc80eacd0337d900e14ee6360

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1460327ab834eead846a8180e7d2763b234fc810918af5e091919a9ef32fc6fb
MD5 b3cd33b17247d4697042fc60fb0683fe
BLAKE2b-256 513a4a631f6e000a4bcc472800d53bb1b28fc72885c90f738bfb13fe44ad22cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 574465e62bb73eb7bf064c608c15bda8c647927af3558bdafede9b65fc0d5119
MD5 b9bedcbcd9803c9240e46da5df39bb00
BLAKE2b-256 e79c711fa9c7585df3a47d3e923d9e25ed4a4c2c969047d6d8f0857f59954504

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bb3a7c280fea162b3f71762d2c3d2df94636245df870e5882366b16a408c7d4d
MD5 e2104fcb5795d1cc9681db74ccd0edef
BLAKE2b-256 45fe97e405ccef4b27d65f706ad78ba1b87bf4918858ad578fbbe2cd855392b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 57f5ef638d4b653c3135f7283fbd8aee74d2381a23180f3174ff24c1d90950b3
MD5 157efa75db2baadcb9a6fbc9b23423fa
BLAKE2b-256 0935a5bf82060f6abc61c932c6affd46e8acd9273de8c818dc5bc2b32192c0ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5f68d3da0eeda008a8f4becdb707476928a76f6787645ce59879ecae9d0cca26
MD5 73f7351e877e1eb6ee734f7118c862ef
BLAKE2b-256 09ba498ff9f511b8347091be1fdfa9a9c3317edcf24b22db9c5905ea26efdf4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3096d8344e767c9dc7dd2d9d571d825067fac874d55d0b16ee28dab3a5e9876
MD5 9b68d120dd0413fa2e546997b74b387e
BLAKE2b-256 570cc4bf068cb60f5e88ac0493806364e687120c4213a37c21bfef240b048544

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