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

Uploaded CPython 3.14Windows x86-64

forge_agent_sdk-0.1.9-cp314-cp314-manylinux_2_34_x86_64.whl (747.7 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.9-cp314-cp314-macosx_11_0_arm64.whl (625.0 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

forge_agent_sdk-0.1.9-cp313-cp313-win_amd64.whl (515.5 kB view details)

Uploaded CPython 3.13Windows x86-64

forge_agent_sdk-0.1.9-cp313-cp313-manylinux_2_34_x86_64.whl (747.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.9-cp313-cp313-macosx_11_0_arm64.whl (625.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

forge_agent_sdk-0.1.9-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.9-cp312-cp312-macosx_11_0_arm64.whl (625.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

forge_agent_sdk-0.1.9-cp311-cp311-manylinux_2_34_x86_64.whl (748.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.9-cp311-cp311-macosx_11_0_arm64.whl (628.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

forge_agent_sdk-0.1.9-cp310-cp310-manylinux_2_34_x86_64.whl (751.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.9-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.9-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 19562e7e7fafdb4cd613a1db04caa569e3f8c48e8888601256f63467066eca32
MD5 5f2dee618ef2bf9b81951a11241dc017
BLAKE2b-256 e820409fb85d9b2f81145690104fde6602f1d2987d6b714ff02e8c91848f792e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 248a0f7a2dab740205bfcbc3cd13e8c68504163eebe3f4ce0113381f9143ce31
MD5 80a659f2058972fc670d8c42929499a1
BLAKE2b-256 3ca409819804733123745c1c545ba18a97e67e12d0bd3c1b571f371b74f359f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e5dedebbf3c9762dfe7708219360c61ef9c6d166a61e393e0c794de022344457
MD5 48ed241f720f8b585c031764a20d3bfb
BLAKE2b-256 441c935534cca332e2197932db2e7ec7d169ff90369655e33740cdf0db70cf6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 70ebfa01c9f7dce417f6973b17f89f2009ab3fd0d3106a9bd0aa7a3e9b6fff00
MD5 d60f0f14db75e04df07a4639a165bba6
BLAKE2b-256 11e9f5188e0ff73427003b7027876a70a804b67314619bfa7d84a1f233b2af6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4a67538a8338f61cd41df90ca9cedeb781d27eb1cd884935e93371eea0070c95
MD5 e3ca99ff69756b316ca66646a8c1995b
BLAKE2b-256 64692a8caf16510902cdfdfbc4c60fc3247ce26814511c0f8b5c9bc6af210548

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ff260bbc9e23d95886d287498b38ab7c98c1cc77dfff5ae7a0693470e4b80ad5
MD5 c3273d3261aa0253cabb6389e6df98eb
BLAKE2b-256 6cf516a404a8402a32a5cc954d83dbba810d013272b17e97318cfaf1754634c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 215b2dcbeb938319966a9e442db981ada852b42fa7fc261b8786d5b911565ca5
MD5 a153e6431f767a7eae0660b43d115ba4
BLAKE2b-256 207bcc939d7df365ec925d6ae2c1b9b6ebd2f2992ca3d541e8a353364e3ed229

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b2c7214094c7909205b62db444504fcf430dbd31b4566080b4d6654f47356634
MD5 3f855574244886ecf722783c78005936
BLAKE2b-256 5136a755ae29b802cb95296ed10cb047901888e9a4681fe18b91efb9ab540a47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c7303388ee98cf213c54f42705da975c81c2c99d6dd4b08de3258a900f20b947
MD5 b4d9f4b7487abc70bb5d15702b5b1f81
BLAKE2b-256 4c1993e5cf79002d474627437e6a07d419ff550f165949e31b275bbd257f2098

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6dde0a91ef6022eda57da5953ac469ed52e551cfa49da01cae6ae1ca440a8b01
MD5 ab31b064d2ea25ed6e79371344b947bc
BLAKE2b-256 c8ae7f87812a7f88d4fc70e325bd166c80ee511ecd9a714f03cd7df65c24abe2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e8e6badd108fed65b8db703d30af996908bb4a1ab1b2c5ff596eadaef2c809f1
MD5 881f0e9e8b1c3464c5f9e51c23f3fc68
BLAKE2b-256 654ccdc3e1e24d2b6ad11e82df475d0d6ecfc4c16f6dba3b6fede8ec9dc795e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9ebf9f0de29a886373d51b10e237cf07204541424cb02594273c848a88ffe0e1
MD5 ef3a7662b7b9b409670ac50aa223893c
BLAKE2b-256 1cd8429272f9fd9ccbeea0d93eeaec3364d8a179e6efc068754c348f1eeadc2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0cbca71c0673f52685077c07199fc76881607ccf796ea0670c53ace2a5aad32c
MD5 991a5782018b82feb12996747fa882d4
BLAKE2b-256 c7fdfdafa0fcbad82c6d6c24f7e9a57241158ab27bf67a880cea0983d9f24246

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 969d21dd4601811a5ff4f54b11f2520b4332b1fd68090efc1dba36d3cf7f808d
MD5 f1209dcbf1b594d0a25fb15cfab7002e
BLAKE2b-256 5c05653edac0002a239b5681471a2d80482a1e04a5c0989cc03a8baede54d124

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.9-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c084cfb75c2daf028c6d3728b89b016b9ac1a413062cb1fb6af8e9040e81d746
MD5 9fe907fc482475b0c6b45833980a1663
BLAKE2b-256 705323b5a7f02aaab939327ff3582c9d01a8ec69ef1b770d3fdb7fffcf3534ef

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