Skip to main content

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.

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

Uploaded CPython 3.14Windows x86-64

forge_agent_sdk-0.3.1-cp314-cp314-manylinux_2_34_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.3.1-cp314-cp314-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

forge_agent_sdk-0.3.1-cp313-cp313-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.13Windows x86-64

forge_agent_sdk-0.3.1-cp313-cp313-manylinux_2_34_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.3.1-cp313-cp313-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

forge_agent_sdk-0.3.1-cp312-cp312-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.12Windows x86-64

forge_agent_sdk-0.3.1-cp312-cp312-manylinux_2_34_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.3.1-cp312-cp312-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

forge_agent_sdk-0.3.1-cp311-cp311-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.11Windows x86-64

forge_agent_sdk-0.3.1-cp311-cp311-manylinux_2_34_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.3.1-cp311-cp311-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

forge_agent_sdk-0.3.1-cp310-cp310-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.10Windows x86-64

forge_agent_sdk-0.3.1-cp310-cp310-manylinux_2_34_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.3.1-cp310-cp310-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 2253ed83ed1559f78462f1e093c234a391d6e33b0051553771831c3c33c42058
MD5 115ef285b506c36bffa9167f86cea42e
BLAKE2b-256 d2afe8fca7350f49e5af4e04b9d281fdc66621abeafd604c32333732c542c180

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 79a8fb499ebd5b78b9ecabfe97254296bc747bcb8ae1fc8fd67a542a8122d025
MD5 f8ec3b507a00ed7a5f8f4a22acd18956
BLAKE2b-256 1cb0206b5bf2bf008e5cde61939030ae7e1e0acbc594145af1c5f8b82e355de5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7dbd416b85a5770db1ad08a59e370feee2013187cbf72969c486e67900bffb12
MD5 c6abb1f137764cc0a77f95d8199c43b8
BLAKE2b-256 cc2304a6a92f9bbd6bf993488afe4df49b85fbcfa7c7af4be2b9132987599e1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 612e574e10c6a4ed11585de92393a58422f1aa930c9821f4601f3c21e8c78c78
MD5 a21255080ccfc890fbe93fbf71edccfd
BLAKE2b-256 74810d65d33880fd639845eb03c56c3d42cfd4ac87156db529b35791087a1bad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 82fcca9fc5717cf8a0d5ef598c252283b814da693a4005fd346327918a7e17ce
MD5 7f2cc276ace82d4f5bd9fec6ef90b8ba
BLAKE2b-256 3e2de9e18d09c6671e5ea9f97fa46c73338c46b524bf91d95fc51e581beb05e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2e215d1439204373e33f61e9430c47a49d1162ffc2a16a7efe88f4684c7933b0
MD5 d4d7c7de900dd08697524965798d86d8
BLAKE2b-256 70efdafa04993826f9c4831fd2283b94cc2d3ea87105f5fd63297b7cc9c4cf9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 781676049583beaf10c5f67e33f57577b6e9f7b2fedc947d9a3108d3a666ae45
MD5 067f1d5fe01dc25e49282465f8b5a680
BLAKE2b-256 28e4446a324881cb1bb18f81a0e52b3723627ecbca43c0263525f1f4615392cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ed1471db8bf0b3e49b1740053d265d7836eb25360f28d3ea0d9d7c94f3abf287
MD5 094bc5b27822f31bdb94e703fabd46ad
BLAKE2b-256 e7ba341ed3fc7d448c4c52d3f6077840f1d3b43ea4f8fda50a853dc52c5ad3cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 147ee83fe8b550bc99c2e1fac04a866885c9ae80b5a2d9a6e75cc7c673dc828f
MD5 f4300614f7240ee74f2c5229e0dcecbf
BLAKE2b-256 1552fba95e1ad1b58871bef78d516501e1d474ef4aa9f0564555f119181aff22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 27d504b64df5c4278afeae56e6910b0f93828c346488d39d8761a0cf9d9ba5a9
MD5 62480af167cb5c1c372b078c1295a3ac
BLAKE2b-256 c7ba7e227d55ae9a566da44058339eece537d3bfe88a407699ca9ca366335bd5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 82c8675c8442b7d3fd22d3b405a3ec8d2625ea9977790735e3ad2ad270e921ab
MD5 5ec4f7c4bb5ba1ccac817d8bcb7cdeda
BLAKE2b-256 d782be77f5857ae6f16a2c523ea65162296d64a42b773d971674a8c115f30448

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 106317fa4a93017f2365c5359d01b885505560ba73b55e7d37d53eb9a693d65d
MD5 88b93847a90e06d8fc392c0e8ee9dce4
BLAKE2b-256 a05c9190e1ffc65b6c78ddbd3a4cac4b5ad7d69ca7f596c0881bad42243fa40c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 260b5752c6021f66d8081cecadc1cf4e33bba8ec187549a6681ec72242bb8f7c
MD5 f9a0640fec03181befd763f13eeaef7f
BLAKE2b-256 e88e677bc7ff4168d482668eedd86f441d3fe153b3ddba31580b953367193b46

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 cb97df3bd7d59b6f4cc95a2dcf2ae8315fc572890b740232ee244fdd3413abc5
MD5 18fbdbb71c5d3b1a713444e75569684b
BLAKE2b-256 623e7e75b026ea4a981c74d609b9de13989e8b77db0c64b920cef2e9834d678e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.3.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a2c77b174c1fd97cc90372b09d34302df916112bf107408d147eefdba7dcc200
MD5 47e07ba27e5f5751334aa80bac8770a9
BLAKE2b-256 b1b5709219f139a335796f8e6dff3591801d167f8f2dfbde2595612d18105039

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 Sentry Error logging StatusPage Status page