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

Uploaded CPython 3.14Windows x86-64

forge_agent_sdk-0.1.8-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.8-cp314-cp314-macosx_11_0_arm64.whl (625.0 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

forge_agent_sdk-0.1.8-cp313-cp313-win_amd64.whl (515.3 kB view details)

Uploaded CPython 3.13Windows x86-64

forge_agent_sdk-0.1.8-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.8-cp313-cp313-macosx_11_0_arm64.whl (625.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

forge_agent_sdk-0.1.8-cp312-cp312-win_amd64.whl (515.0 kB view details)

Uploaded CPython 3.12Windows x86-64

forge_agent_sdk-0.1.8-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.8-cp312-cp312-macosx_11_0_arm64.whl (625.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

forge_agent_sdk-0.1.8-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.8-cp311-cp311-macosx_11_0_arm64.whl (628.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

forge_agent_sdk-0.1.8-cp310-cp310-win_amd64.whl (518.7 kB view details)

Uploaded CPython 3.10Windows x86-64

forge_agent_sdk-0.1.8-cp310-cp310-manylinux_2_34_x86_64.whl (751.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

forge_agent_sdk-0.1.8-cp310-cp310-macosx_11_0_arm64.whl (631.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 bc7d3c0595aac15bb3eb833a3c0d09d304458da90505ef39e954ebc7525e7742
MD5 945bb924958721284b9aeaf7a34c162c
BLAKE2b-256 a5483677624a0ad9b0cf5bec43dff709404eb07fda0bd57b8255f1e1e997a5ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5221e20ab30c59472e01fffb913eeede7d36c71953324e6a21c281945242a376
MD5 9e418c0b216b2c44fefebed7825aea01
BLAKE2b-256 06440eed9e5458528404dbd50ef6f6db69dad89184a67aaba8b4e9cd8d60a643

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a9a616654dabd14e9c4464b565dc75585f8f5ac461d4dff80c913f3eecc908ec
MD5 34770798c294f700843cd9efbfb788ac
BLAKE2b-256 bf03aff6a93f9174327b24de63f1e06b378c1bf0e7201766ce75a3e0c9cd9eaf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1133ae2c3c1c0cffe8cc17213dbf404bfce6faf6dabd77f3b4764558afb0f9aa
MD5 f0cfa81e941c8e80e2c30cab55bdaf94
BLAKE2b-256 8541e69612dfc2d6316f73d275bce6c666989ae6bb29fa8c985b8644f3ca89be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bf9f7a63221fc95bfcda973c70809a813b7bdb875911171b9a90954fa17d2a89
MD5 5acfcd0781e3b96276169818fa8d6726
BLAKE2b-256 d240b75ae0ff4bd9040ac92ed08c3be97f66275a47993c2553477e4401788e0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 656944a0d0f65adcc70c15e5ef141f8cba68711de0718420aa1f7f0d2a72f5cf
MD5 05d79e2baadf7a63e760e93ffac65627
BLAKE2b-256 713c92fd6d7cd9afa60d8c3c31f85764da15383eef1790c0b42390f30d74d393

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9d3345fd7a0558e84c3fab2331e0ae14227ec2989ca0dca41be85ff630d6a3cc
MD5 fd1ea5fac9dd5537cf6f18db5620ce17
BLAKE2b-256 d4fc1b9873d116ac2a06836747826349c36ef925204cd5dfb4275b3048cb6549

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0249e994740c4c1c1b3d7b7822d9a462cf775c29691349d14fe49fa9fcc0ef59
MD5 754855dacd538d109921fdbd8fe80a08
BLAKE2b-256 84e4ddc2c077229cc87011eb6a016a2f0c090f337657d5458e5bede4e6089bd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c08b23a4813047e7e457ac8a189db497ad13d744ad26f188a68a5e716f24ce9
MD5 24b47545926561c5ff5084fa579a778f
BLAKE2b-256 88297b17b01fb6a019bc752e66d6d16b5d251a0e6a97713f56fbb5a7a051d39e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4bd59fd663771960b74aeb5d8bd8ff233350bbd9df9b603088e108b8e1b0f0a9
MD5 3ed9f1df65d46e28c34d83ee653f54a0
BLAKE2b-256 249d5e19a056a6a7b5493605d0c4ac29a307ef499a1ae6ffe08552c534e2c547

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 323a8c5223617e5490e50d41c39abb25148b49fa79067e6c8186fa15285aae21
MD5 464c7bab9fdb6581b78bad46d233f408
BLAKE2b-256 3f6671f63d90040dde5d3533960f195858748d0c3ebb590aa498959db4c0c865

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6223d043f75671e773964d456d013aea7052a63e58c9dbc3e05bb2e6c898bfb4
MD5 8ca757d55e77db0f815692e5fcc4c2c1
BLAKE2b-256 66f1144bb2837b1420dd23bbe6ee419095f2644eb24ef838f6cba5cd29af9bdc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5b13bf705aba51d9f7f5b38e82dd3f5d669469bf265d87b19b78853ed962345b
MD5 375eb7b082e7f1f70aa3052f57ea4c5b
BLAKE2b-256 b7b7fed67bdfd43e6c9ffebc8136b1c942a4501f5bad4c6ffc9fd0eee7674028

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f606fb210a13c5231bb9192b1e65be06aae1f1c2889bc9393f16c4daad152e58
MD5 650895999f03b34c20966bf0603025ac
BLAKE2b-256 f97880e8b97ca43362c4c3a6b8290a668179c31ccf716e8cfc6ad32d92f6bae5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.1.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5d68393eac26c42006dc8852e62064eea7f8acc54bcd7f71dd63c92e41f7df25
MD5 8bdfe7de1d53ead566db8da4dac11c33
BLAKE2b-256 aeac7a2b26bc304d614f9fe726eaa05dcdea3ded2cbe2923790eff35f8ab8ced

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