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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

forge_agent_sdk-0.2.0-cp313-cp313-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

forge_agent_sdk-0.2.0-cp312-cp312-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

forge_agent_sdk-0.2.0-cp311-cp311-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

forge_agent_sdk-0.2.0-cp310-cp310-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.10Windows x86-64

forge_agent_sdk-0.2.0-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.0-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.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 83f8e95ed66e43f1f15760bb0f76fc3ffbfc62d4434bd71616887fae5d9731c2
MD5 1eb398595b4c0af53c498a2119151588
BLAKE2b-256 e09fa78627bd9aacaa37ccbca1359b37864b73cc4c460e6fd92a31dc528ff008

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 565c3cdb94b79e0d7bc6ec002135dd5bace74a05335530c97d302cd2c1e115e0
MD5 eef455bde60ce94e98aedf35c5c8fe5d
BLAKE2b-256 58c511c5b6b1b862f7bae88bae7cae381ab7aabf8f7f16283fae6e8ea72bf5e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1eafcc5117ace983914f9e52fd204cfd1fc251f654167309b391a135ae83a221
MD5 5a075908e4509438ba930acf0369e5de
BLAKE2b-256 5f4e1c9010174bc267132a9c5a896a40a6d716a3d5b2dade9b71c5d01c278ed7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0644a75c1307109e8721da8eefe8bce5a5ce51f9906b578a447f10f711a37f3b
MD5 4d305b156d77bd1fdb566d0475e802c6
BLAKE2b-256 804d3cd77f316af0f3af3bd92c5e732091e33860b0044d9f1fdb61999250ca79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 72e7feca8936d22533ad15e01fd1a1c71b476d58e68e0b72d5b65c6abe8e88fa
MD5 995ff5870d3a07f2488a6714b1532051
BLAKE2b-256 1ad6ed47b395ef4828ceea127ffe2babb6a257b0179765594054b60f078ba866

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 23d4260cfea5427072e4da7163f3abc7b4e1827f7d242be9f7b98fdd57ed9ed7
MD5 55583d229ec5ded13db16d5ac32ba374
BLAKE2b-256 562a4b7b167c86668ffe4754ad7172058a3f2728b3b6d5c7141dd95740fa2e3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f6f3e6aa592bd1d0b2c74133f3aa4c0be9d3846fe759d3450e73fdf504a67bdd
MD5 388dbe24dbb7cbfe79922d0bbc2664a0
BLAKE2b-256 fa5f98be9f72af96d235d471acffe6169d529374ab004ec85b550f97460cf6f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7404b46210c3db7227ba7b7d9bca293c1566e4a638e361bc04508d89df25ae55
MD5 a24c3efe9bdad50965eccb284d30ce0b
BLAKE2b-256 f791f7bc42061863eb7a02f879c881e0adba7839a82e575f73203a4fab87a728

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f987f35ce73846490f55b0a1a03f292a1d0d87a5d848103a7902dbcb7410d632
MD5 48d76831762a0fa10185291efeda29dd
BLAKE2b-256 f0a734c1d7477dba6820adfb34d4d0ef24abebb32b7199611d7e4756c9938958

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 685fd74b7302cfed2cceeeff336528e90c3c2a085d8d3081a69affd3bf838d62
MD5 a91c7c365be8154e9224fe83d6558253
BLAKE2b-256 8b111b53c7ea2439fedf90e7b85777cd6115cac23d1debc1054b35e3ec589e94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6ec9834d4d635fd52213d41b9529c8e75ec9715d5d9f89dbf34c47f0c5ff87f5
MD5 3e9c88d8566defacd33d404ae849320f
BLAKE2b-256 55f7d0196a3493eaf6883a562500e66f3b92c06b511d7d1019c5e837a02db7f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8e84944d42a026b2777b7dec571cc462a0682463fd5379472212007a8a23e0a6
MD5 62657afac3178086cf0fb60f40a4eee1
BLAKE2b-256 8033c8022f2b78670d5819b977345810a25417a8ceb39ae445f2a14859a92faa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f79afe2c7f40948e300180dc4065be14a8e75bcca0d7fe2e743d3bd3e84b3f24
MD5 40fe263f54e288fc4c7111bac8cc1e33
BLAKE2b-256 687adfcb01845469f6cf1771d7da55f82aa6b18c32c66285d63f8c015b6268f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3e6697c54a4acec29c4968f8d38d002303d18274fb1ad6a3fdbfddeb0f760549
MD5 269d50d1490f9b851554addc71924bd7
BLAKE2b-256 82fdeeda33e9a6a3b23a8e81ae9861c4aa53e1e0aee9384092a7f74b9e7c640c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dabe371a74cb857bb5740e2d942b2abf749ac50ffb259c2caa4e024d37143085
MD5 02c0c9bb331351b35c902c354af67aac
BLAKE2b-256 938c4decb22ca982a5b01b566ca27ca277b90e893f04b60150b16af4e3d424d1

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