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

Uploaded CPython 3.14Windows x86-64

forge_agent_sdk-0.2.5-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.5-cp314-cp314-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

forge_agent_sdk-0.2.5-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.5-cp313-cp313-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

forge_agent_sdk-0.2.5-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.5-cp312-cp312-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

forge_agent_sdk-0.2.5-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.5-cp311-cp311-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

forge_agent_sdk-0.2.5-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.5-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.5-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 8f328786dcf166acf124db8c0557a28c8497d7a1aedc5a92f733406667259a79
MD5 e9bbcdddc94592219ee12176c4c182e4
BLAKE2b-256 fb5713b8d33d385bbf4c5617e87776a25bfb7f7123809428a568d3de3bd6b779

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5203fa4600d3ff619a6920c9fa4f71e33eafab8546c1e1ea733c06fb8ba25ccb
MD5 947cc089228e4e337a69480adc3ab079
BLAKE2b-256 09df168c26851c203951c5889b43a88b251fe792c894f09f157699584ef0552d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b4197012c949503ee8f36516e188b6c895a7a4a3ae9bdf69b3cd7c7b15130fe2
MD5 d908fcb6b929ca00865c04be1a00d682
BLAKE2b-256 44954e51dcff9682f5974e579639a3a004bcea46a84948e5a46ccbc7ec863575

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8b76b763140f88409dd74e62b92986bc85e0456754dd0a43d2e16afb01db23cb
MD5 034bc8d9c1c5c582b8c37ff65323ae48
BLAKE2b-256 d981e4b314adc025361d953c46e1235d180e1b23800148938910d05caaf8a5b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 424e26366fb8f3b9214e9c2456115a346f4ef328d3ffc20c641c1f1f6ef98332
MD5 6b02a40fbdb25d755c410d0a6dd871c5
BLAKE2b-256 c3e6a3d0b42526ad0d12f818b56124f49958e3668ce84f65c612a6c613e21dc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b1892c51e25fb431fb41d078ef3b09a9bd4a66f7631c80cde031077c937f0db4
MD5 d0e0dc9d0be853eda2bd80e81dbafdc1
BLAKE2b-256 a550efb416bdc543a777dfe0784587388755003604fd6f737e287a7b5b5d8ae2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9ee35390733110f4167ccbd26dd657cc7c823412e982bd0d79bd2ea18eb3d54c
MD5 f856fa7c51001eb9956f323881770a4b
BLAKE2b-256 6f2031ee356b32f3fdc2d6e8c09b49417bdf17a6f3d44f1f8c2081c09df57816

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f1d9e8591440305aa4f0f00b4e9822dce90e01fa0f3bb2b85313fc5c92aab0e6
MD5 0bf82db86cc5aaa1c081f776a24e0b6b
BLAKE2b-256 a4b19de94dd598d591bf1fc7460d25b14b5fdd583a78d2c17627061f78484c8f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9d018b3622d6e934a2f260e531a847cfe2e436fe0ae13437ceed2bbea979c812
MD5 528d403126a263004242a3b7778b7a94
BLAKE2b-256 7a3543a353ab81cac3f668f0195f1b17b3ecc1fde487a719dbca49718bc45331

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 78563afc08f4eda25fa619652e792a04e584ad180689b27662900158822aca8d
MD5 6f7479bd25f1a2fe648f36f7c166df6b
BLAKE2b-256 5eac15eb841a12aef9fb3a940ffad3471715228150f0ba0551af3c7e6209bdaf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3655bdc7f6845c940956ef9fde0a32de28e600e893a98550e296bc862f9a394c
MD5 a3258f57744e1f2a26bdf5cc316e8b54
BLAKE2b-256 23b7ac17ec5c9f6fc80b4ec37ed977125277b714458389cfd9196aaa105eedea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b5ef2340a5fbb86ae76982c93c2d2af174512523e265af8ee47cf2ae8018495a
MD5 31ae3e8251e74d5a2f75f4ea3b8fef79
BLAKE2b-256 5b382fcaf95c9de023809c4468a6130fe38f9e855a221d80e1424d75362e5bc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ae18aead54675cfa99c0a14ade1201d31e32651e23585297756bc42c02698df6
MD5 71c9a265135026e5ea8fea77974e0056
BLAKE2b-256 12131a3b129a124b33295b599aa52c2032547471bd38f5e9b49de2e18af49c1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 81353db28a1823d70b96e517d325dbbc3f98a9c70f59aea029ade0c624b08b0e
MD5 d58580569224f1356724def273bf379d
BLAKE2b-256 d5c9e8d7bff09fbe71e88f9a6b02f751fc26f429c90a515447bab179dc724e9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 074c35a1587417600eb608ce6696872e07b3a2b8fa7e3462054867b6497be50c
MD5 edb1335f32245959b2fa80be78e7e38f
BLAKE2b-256 9cb85392c5e58bdc2bf6a51b3c5a8cdabf1fb3e4974f0f9cff130feaeeb04937

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