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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

forge_agent_sdk-0.2.4-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.4-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.4-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 544b47f1f59f866b6b024ebd4c97b3b69e59dfb837ac713e30968e91f184e055
MD5 997620a3ec4eb8bf772f5ceefb6a34d2
BLAKE2b-256 7e5db81fb02927f589d024fa6156588c7c7f82b7484097aa1060f7ed76bdc047

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c99219be9035dcb62016109f64d5447eaf59ce7832d00f752d27b781331044db
MD5 8acdc6299814f76fdfb62dbb0bca0914
BLAKE2b-256 3eed25426c0e1b5e5ec250f8bcdbb39bacbfdd723609ac77cb96a74113514f64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ffc694ca4e393b1674845e8a8abfef0896cdbbc23517246b758e464af0d5db03
MD5 e5eec8c71ba6afb72ca70d43361aa222
BLAKE2b-256 196d1d454425847cd97b0c37168c789a58f916910c336d6b0049b98420c483d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 15228d8357431cace54ed52a2af03d60bedda8b2411c778558309cebe966e325
MD5 dc0d40d8ae6a0aee82a9068ebe69bca2
BLAKE2b-256 9ea867bbb9f13160df3937497c7e2d8ec2941acb5e021e701c09f41a1a872899

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6c5c1e4fdeb24e1a5abf55d46a822d8f0fdda505f2c0542c714c93dc3157c57e
MD5 4bf8cc7b42dbba593442927052c22b3b
BLAKE2b-256 290e26341f0403f69627b39348166c824013e80cbfcf601adcb4b1ec053852fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9a425db50a9d930459007c6b04db23a783db73164ac8d217b77fe26bf98d36db
MD5 cce49a9665742a6901df9fff5e0daafb
BLAKE2b-256 ad216a58f4156a4d578ba318646357f572cba98972a3a1e9aad53f0ea0607d5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 625c33785c2a41d85697ae7b05adcf76fc35a42c0fd6218cada50fab9b518235
MD5 b592d16ceb40e4326bdf13b3b1c32f8d
BLAKE2b-256 8bc8656fbe246fa5309bb6d5f561b0729e8416f28f7370ce9a476ed424011380

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9d712b11269d3145053a874a10af2733d8e0382fb4c10f9f236ad63ce1bc641e
MD5 967fad94affcc102c9b27cb26632ed58
BLAKE2b-256 cd18c7f554faed21a5856d9b9f71765ece350cf750f46ff1e24777b193f410b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 71bf6fe103fdfc8381fe11f64e35678c1ada284607241d7bbc38cfa1f5da1532
MD5 159fe098c3a2161e3911929b7c2e337a
BLAKE2b-256 e04755e28b41a37e78afe0569e305d186b92f6e56f730c4f85fb1ea923670635

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 99da355d416e267c0852e28f1cc60d7a0df81c70314f324f53298c2c8058e7ae
MD5 d5640e08da2d831a634d11a8fedc2108
BLAKE2b-256 caf01b3c0006dd323e274165123e4b37f9fa5bc5eea844d09dfd81ae93cd4a60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 42b66dc355d7b01717722af92d0bb8eebada8c781497e3e710bb6b617dc4076a
MD5 11d628e601ac0ce74bd6baec5396ea73
BLAKE2b-256 7dd734d86436bd7a1e2cb2342f2585ceb3a0e1aafea77ecf1557e9b09e3c5eb9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 54349bca8570d3b15d8fdf5927aa68a296a038804f2499d6991a7c782e150d9d
MD5 ddcf8c6f135301d209e6b8185b77cfac
BLAKE2b-256 8a3003ac1438b5b205562bbdd5fb7e8720d14ddd5f3b9141230333924792383a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b8838ad7cc04c3d5bfc602db490eb9179a69b4d2cfcb0132e4d87a2154b02376
MD5 4ff39f50ee82b76d240217da08ad1b39
BLAKE2b-256 150606e9de196e5efaa011d7585d5011b9aa17662ec829972428158ab44b34c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 18e759ad320c7cff2cfac67e2a5c45f675bc8addb5fcf47b4024bbef1fdf606b
MD5 d6a3e55ac54d5adce245278fbce894d0
BLAKE2b-256 1f204d38182503ba4d0bdd17a56c7ec59fe42344df889b3f5db4d6af8f2df28e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d6b4b2db71226b625a6f686cee17bcf18db0151be11b086fb871248fa41c28ab
MD5 cacfca4257ef00954a24964e60bbf465
BLAKE2b-256 031869f8f5dd50b1ee0f8f47bbea037f01ef35f2883dfe64896094ad92062217

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