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

Uploaded CPython 3.14Windows x86-64

forge_agent_sdk-0.2.2-cp314-cp314-manylinux_2_34_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.2.2-cp314-cp314-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

forge_agent_sdk-0.2.2-cp313-cp313-manylinux_2_34_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.2.2-cp313-cp313-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

forge_agent_sdk-0.2.2-cp312-cp312-manylinux_2_34_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.2.2-cp312-cp312-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

forge_agent_sdk-0.2.2-cp311-cp311-manylinux_2_34_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.2.2-cp311-cp311-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

forge_agent_sdk-0.2.2-cp310-cp310-manylinux_2_34_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.2.2-cp310-cp310-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 c6c833d3b001d2e6a43b175681678c6b76129c582af30f07efad922887e2e5f3
MD5 8b2116e45dfe10cd379a1374aec9e402
BLAKE2b-256 deb841754ce7f7e65ed86411d72cda9383705eba4e92081cabf9a173cdfb4ce8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b9b15896243100ee7b5690e841df67ea4e8076e7f086954a1ecb4d4b49b29957
MD5 45c3e9fd481746177ae3951c529d83f2
BLAKE2b-256 988a59f4eae9f9d28cebfce44a56be86a0b071dbf388657f559bc9013594f38f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0b7782d76a4be65822609f6b8b632011e6fac87f95a3a724492f2045aa2dbffc
MD5 e5aace96f56c5b628754fec7ffcd6796
BLAKE2b-256 2b4ecb870bd4b8a311b8f7b4446cb02ccbaea8229faf08c5cd20cf82a60a4ff9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 06ddcf57c201842c5627b4ba73669bb56825420f8948d8621c12bc8081d3b8ba
MD5 bb8696d531162be699436d98cfbf2a3b
BLAKE2b-256 0000ba7c7c3158970b803c45bde8b6e96ae8f45d036cc4e921dd644f54d8c1be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 db1015ae85601fb2671fd5977e4f21f0c47d0cf93515bf1a047f66f1bd3555c6
MD5 885c9de6dc94c3f4f9fabc647884bdc5
BLAKE2b-256 971f867eb4bc1b62b6baab3844cb7a19f4c5ebb347610be73f18ba7386a3773d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2d17fd1d89bf976f23e644e8c791ca71a625b062a1c4aa70cae87feea846722b
MD5 93a5346b27c11559ef2afff14f3492cf
BLAKE2b-256 e5afc23b62388328a707380421a5a5a0bd2b612e71c4cec2cb3aa450acbb6b87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 abd549fab12210df838ea3b1196e156ee256909ac8478340faf9521233876a06
MD5 6c44666bd787115975856f7becefea8f
BLAKE2b-256 0f521a640868d0392fc52f8fd404169269e622eafe18ac953e3c08d43148f68d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 53c15d46305c89dca780bc3ec00e7b0df0e4a8321a3c4ed1126c3e0679d27d46
MD5 8399071fe028a7d7136fcbcbfd68b078
BLAKE2b-256 f45fa21b89b7defac51a414848f8de3adfea7cb432aa750eddf7597cd681f5bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8840be12939a0de1eb0a9ee5f43ba4907d28511bd054a55029633c8f9dbeab13
MD5 f67d818058d7fdf83805dfe19ca69435
BLAKE2b-256 c591d6fc19447777449afb02aedb46f9f7daf4b5bed0dfc5955d8a5dbecf5748

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6d77b73d94cf833711b00dff9dbd80fc80f7a4d56017fb6dcf0b24ee170612c4
MD5 ce349a25c679f87ed7d5f21145e54f16
BLAKE2b-256 94e24a9d56f497917b945ac5b8b979728e43ded51fcfee1d8d0eda7d40dc955a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 10f110c7e5d8b059ba06920d693a796c626428175b2c626c642835017e5dbd31
MD5 373c64d316668ffc48ab26c92897a2e5
BLAKE2b-256 ed6f6de0ca080381e54f94abc496b8eca3c8b76417091ceb271652a7324ea22f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a3d027b43dac0ade5fd09559e0c1d79f8a338cf365f8e01d1f91a3cba3c4316a
MD5 b1517992aa40bc94de5d8297131e4fb6
BLAKE2b-256 7dfbaa22fab26eff4a64a25b3d040b89c89c6de617c6d05b983ebeb2146e002a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3334c0c0179f815563278bdba65a566131f1cc47cba57ade2cabc3c748139977
MD5 45d8a95a325bb361f836529e9cafe711
BLAKE2b-256 e7f598762378bfdcce810554f57117f9a15658bbcf7cb05f28f046b1eebed1e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7a9090d0e58205bb976ce8dffa1a77306d7c7ddf3c1d26dad7ef9843f432e024
MD5 c0924bc9f8717f25f366d09ad844af4a
BLAKE2b-256 d5d4c5a85ad3ed81e71a4e8d06f3dc03bf8261d5846151638f40dfb567fff072

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 397ea6b136836899452e60271860ea5da9b51515d8ff50b3afcc13ca82efbfa6
MD5 48f7276b37e2c1a2e808446ab2be9d55
BLAKE2b-256 5964ed2597b301ff50848cf7e999b123f9c5a193a6d4f0ad9aef582c77af0ad0

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