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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

forge_agent_sdk-0.2.6-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.6-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.6-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 e0c735ca2c72054e1d16704d6fa73f5325847e30f6ddd2d4835e79b02799df53
MD5 17bedd64cbcd8865eff0205404283867
BLAKE2b-256 e7e350daacfa626a161ca67e6514e887743a568ac5ac0e4d4e1c0bcd909cb51d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 17bd5c3bf95914b1740626643bd2946309c5f2c54c632cb3f804fe76e0483dce
MD5 93dda58f0e413dd2f1803e9496b22710
BLAKE2b-256 0692996452a9d6bbe69ce25ff3d1baf9cb702f4fd3c08323c1966bda63619566

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5f4641c130f6b4a32735fff73eb6ce0a415f9169978a4cbcd3fa06b223a9e4e2
MD5 ff3860f12a38c52217b3fdedc9b18c4d
BLAKE2b-256 cbd775cfcc7fe9467759171e6b60d051cc90f2ceb4be2224c97b5592289cb1ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 78d1d2690da3ac4260813ed3cdff53e5f272f6b367000a372c465e4632a705c3
MD5 b68a2fad28c5c71d8c50ffb536755143
BLAKE2b-256 690eb7710456b80fad22380ab8d0dcf2be4a36d5fa894115d8129d93b3186463

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f9ddc41da85f20875c9c4afc94ab91b0d12c9b70bba840cccfccaffb8e24d235
MD5 ff6f52752506acef6f16c70734ae7cd9
BLAKE2b-256 9ee16f6d188b663d79af38a88b131b406455661ff5ec0ae7e931f0ac8fc417d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6d74e4d8ffe8fedf2948c569967fd6cecb617efc1fddcf849ed92d9f2833d577
MD5 faedc6b3cef90f059768c2a2fa892d46
BLAKE2b-256 d79a009abcd16772c3ee78b3f26c1a5f49b207b61898a0a5cd611fa074b314fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dd45d25ca78f4fbfb2c28090f80e9ac312d41cc623df7f0abf6d2a60bbfc7210
MD5 dcdc165185ff4923f79f01f7aea90c7f
BLAKE2b-256 d149ca570c39a173e94de5afcd60cb60ec647e0ac02749ec9c2ac203cedfe557

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a36dd6c71c50d16c26a1bb80198d594f548c44a03c682a9986826e386a70babe
MD5 86a3d36bf1e5ff3fc130637239d24b13
BLAKE2b-256 b484a6abe0863f328bf6c3ae2c5bdcb20c916242762ae59f79ce77452d317a2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4cf28e7e9516cd5f382dc45a915fe5799a10dfe65873e6be85e01424daf755c4
MD5 f2873bbcdcffa107e15f59c21f16f2f8
BLAKE2b-256 855503cc604b78e3e30bf54d1491099a26c54bec7ccacd74c83a07e152baa170

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c2a5fd4983733e9768c2346a391029ba6f3abb07ff2fd13af0799eff6efaa0ac
MD5 bb9a2565f54bdbed532460d236add001
BLAKE2b-256 8bb054fb7dfe2c345900fb72eb30deb18615cda859272e872c92fab5f3f2f2f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 66a4f1e9acf6aee0d980d7aab07ee6cac9a88f408747ed54c6d2a4b13a2a5d35
MD5 c21b20801e19951f07ee6af6b2082d19
BLAKE2b-256 235727caf591f7b712b03c347882bbdbd692a617fa18caa4280631889ce763d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 065bceb4f8405f7b1e9706a56b859e7393d0818ccc552806e17dc193ba630c1e
MD5 e7177968e209e7c8cba3b7461304215f
BLAKE2b-256 12ac3e395eeb7be2b63f75749264e08b88d1f89895c409a92035342d966dc05b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 51928600c5fbc67623aac6d47667c4c42a992fe695ed96cd9a1fed21fafc25b3
MD5 deec94e27ec0d8712c2c4fae90a31c8b
BLAKE2b-256 23ecf2a140dd36be36ebcc05ef39150bd3bf86fc18e10a3fd3836a78321a5321

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3fb00efca178013f1d5a3a07a38ca453d749b762cb87f6bff58def6959e66694
MD5 afca170bb3edae7a316d8d57decf7581
BLAKE2b-256 3f56e2d91f14aa34e0c77b4409ae796d60f7548c2579ef12b0f2f093524085e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forge_agent_sdk-0.2.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6212dc7b04bc13eaa022b4b863f507c39223b66ae30a0125b15cee1673853fb1
MD5 3c45adccdd24042c894a33ec9594b098
BLAKE2b-256 38d429fbfadfd49be0be8e756901c158774daa20c8ccd68539b15d28dc7b3326

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