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.
Metadata
Release files for forge-agent-sdk 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 34.6 MB
Release files / forge_agent_sdk-0.3.1-cp314-cp314-win_amd64.whl
| Download URL | forge_agent_sdk-0.3.1-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2253ed83ed1559f78462f1e093c234a391d6e33b0051553771831c3c33c42058
|
|
BLAKE2b-256 checksum How to use checksums |
d2afe8fca7350f49e5af4e04b9d281fdc66621abeafd604c32333732c542c180
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp314-cp314-manylinux_2_34_x86_64.whl
| Download URL | forge_agent_sdk-0.3.1-cp314-cp314-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.14 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
79a8fb499ebd5b78b9ecabfe97254296bc747bcb8ae1fc8fd67a542a8122d025
|
|
BLAKE2b-256 checksum How to use checksums |
1cb0206b5bf2bf008e5cde61939030ae7e1e0acbc594145af1c5f8b82e355de5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | forge_agent_sdk-0.3.1-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7dbd416b85a5770db1ad08a59e370feee2013187cbf72969c486e67900bffb12
|
|
BLAKE2b-256 checksum How to use checksums |
cc2304a6a92f9bbd6bf993488afe4df49b85fbcfa7c7af4be2b9132987599e1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp313-cp313-win_amd64.whl
| Download URL | forge_agent_sdk-0.3.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
612e574e10c6a4ed11585de92393a58422f1aa930c9821f4601f3c21e8c78c78
|
|
BLAKE2b-256 checksum How to use checksums |
74810d65d33880fd639845eb03c56c3d42cfd4ac87156db529b35791087a1bad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp313-cp313-manylinux_2_34_x86_64.whl
| Download URL | forge_agent_sdk-0.3.1-cp313-cp313-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.13 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
82fcca9fc5717cf8a0d5ef598c252283b814da693a4005fd346327918a7e17ce
|
|
BLAKE2b-256 checksum How to use checksums |
3e2de9e18d09c6671e5ea9f97fa46c73338c46b524bf91d95fc51e581beb05e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | forge_agent_sdk-0.3.1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2e215d1439204373e33f61e9430c47a49d1162ffc2a16a7efe88f4684c7933b0
|
|
BLAKE2b-256 checksum How to use checksums |
70efdafa04993826f9c4831fd2283b94cc2d3ea87105f5fd63297b7cc9c4cf9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp312-cp312-win_amd64.whl
| Download URL | forge_agent_sdk-0.3.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
781676049583beaf10c5f67e33f57577b6e9f7b2fedc947d9a3108d3a666ae45
|
|
BLAKE2b-256 checksum How to use checksums |
28e4446a324881cb1bb18f81a0e52b3723627ecbca43c0263525f1f4615392cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp312-cp312-manylinux_2_34_x86_64.whl
| Download URL | forge_agent_sdk-0.3.1-cp312-cp312-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.12 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
ed1471db8bf0b3e49b1740053d265d7836eb25360f28d3ea0d9d7c94f3abf287
|
|
BLAKE2b-256 checksum How to use checksums |
e7ba341ed3fc7d448c4c52d3f6077840f1d3b43ea4f8fda50a853dc52c5ad3cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | forge_agent_sdk-0.3.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
147ee83fe8b550bc99c2e1fac04a866885c9ae80b5a2d9a6e75cc7c673dc828f
|
|
BLAKE2b-256 checksum How to use checksums |
1552fba95e1ad1b58871bef78d516501e1d474ef4aa9f0564555f119181aff22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp311-cp311-win_amd64.whl
| Download URL | forge_agent_sdk-0.3.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
27d504b64df5c4278afeae56e6910b0f93828c346488d39d8761a0cf9d9ba5a9
|
|
BLAKE2b-256 checksum How to use checksums |
c7ba7e227d55ae9a566da44058339eece537d3bfe88a407699ca9ca366335bd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp311-cp311-manylinux_2_34_x86_64.whl
| Download URL | forge_agent_sdk-0.3.1-cp311-cp311-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
82c8675c8442b7d3fd22d3b405a3ec8d2625ea9977790735e3ad2ad270e921ab
|
|
BLAKE2b-256 checksum How to use checksums |
d782be77f5857ae6f16a2c523ea65162296d64a42b773d971674a8c115f30448
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | forge_agent_sdk-0.3.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
106317fa4a93017f2365c5359d01b885505560ba73b55e7d37d53eb9a693d65d
|
|
BLAKE2b-256 checksum How to use checksums |
a05c9190e1ffc65b6c78ddbd3a4cac4b5ad7d69ca7f596c0881bad42243fa40c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp310-cp310-win_amd64.whl
| Download URL | forge_agent_sdk-0.3.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
260b5752c6021f66d8081cecadc1cf4e33bba8ec187549a6681ec72242bb8f7c
|
|
BLAKE2b-256 checksum How to use checksums |
e88e677bc7ff4168d482668eedd86f441d3fe153b3ddba31580b953367193b46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp310-cp310-manylinux_2_34_x86_64.whl
| Download URL | forge_agent_sdk-0.3.1-cp310-cp310-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.10 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
cb97df3bd7d59b6f4cc95a2dcf2ae8315fc572890b740232ee244fdd3413abc5
|
|
BLAKE2b-256 checksum How to use checksums |
623e7e75b026ea4a981c74d609b9de13989e8b77db0c64b920cef2e9834d678e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / forge_agent_sdk-0.3.1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | forge_agent_sdk-0.3.1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a2c77b174c1fd97cc90372b09d34302df916112bf107408d147eefdba7dcc200
|
|
BLAKE2b-256 checksum How to use checksums |
b1b5709219f139a335796f8e6dff3591801d167f8f2dfbde2595612d18105039
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for forge-agent-sdk 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.