Skip to main content
AgentForge Logo

AgentForge Toolkit (af-toolkit)

Fast AF developer tooling for AI agents.

Build, test, slice, audit, evaluate, and sandbox Model Context Protocol (MCP) servers and agent trajectories.

Python 3.10+ License: MIT Code style: ruff


Key Modules & Capabilities

+-------------------------------------------------------------------------+
|                           AgentForge Toolkit                            |
+-------------------+-------------------+---------------------------------+
| Forge             | Slice             | Audit & Observability           |
| - OpenAPI to MCP  | - AST Skeletons   | - Trajectory Diagrams & Diffs   |
| - Mock Servers    | - Repo Slicer     | - Safety & Policy Scanner (A-F) |
| - Python to MCP   | - Git Diff Slicer | - Benchmark Comparator          |
| - Docker Exporter | - Multi-Model Tok | - Cost Estimator ($)            |
| - Client Exporter | - Prompt Wrappers | - PII Redactor & Failure Diag   |
| - Compliance Test | - JSON & MD Slicer| - Commit Message Generator      |
+-------------------+-------------------+---------------------------------+
| Gateway & REPL    | Eval & Sandbox    | Studio & DX                     |
| - Multi-Server GW | - SWE-bench Eval  | - Interactive Web Workbench     |
| - Stdio Debugger  | - Git Snapshot    | - System Doctor & Initializer   |
| - Polyglot Bridge | - Auto-Rollback   | - Antigravity Skill Exporter    |
| - Interactive REPL| - Resource Bounds | - IDE Agent Rules Exporter      |
+-------------------+-------------------+---------------------------------+

Quickstart

1. Installation

pip install af-toolkit

2. Generate an MCP Server from OpenAPI

af forge generate api_spec.json -o server.py --service github

3. Generate Client Configuration

af forge config server.py --client all

4. Slice Code & Repositories for LLM Prompts

af slice-repo ./my_project --budget 6000 -o repomap.md
af tokens ./my_project/main.py

5. Audit Trajectory Logs

af audit report trajectory.jsonl -o audit_report.md
af audit safety trajectory.jsonl
af audit cost trajectory.jsonl --model claude-3-5-sonnet

6. Interactive MCP Debugger & REPL

af mcp-repl "python server.py"

7. Run Agent Benchmark Evaluations

af eval run tasks.jsonl --agent-cmd "agy" -o eval_report.md

8. Ephemeral Sandbox with Auto-Rollback

af sandbox run "pytest tests/" --rollback

9. Launch AgentForge Studio

af studio --port 8000

CLI Command Reference

Command Description
af forge generate <spec> Generate FastMCP server from OpenAPI 3.0/3.1 or Swagger 2.0.
af forge mock <spec> Generate offline mock MCP server with synthetic responses.
af forge python <source.py> Convert Python functions directly into MCP tools.
af forge doc <server.py> Generate Markdown documentation tool catalog.
af forge docker <server.py> Generate Dockerfile and docker-compose.yml.
af forge config <server.py> Export ready-to-use JSON config for Claude Desktop / Cursor / Antigravity.
af test-mcp <server_or_spec> Validate MCP schemas, signatures, and docstrings.
af slice <file.py> AST code skeletonization under token budgets.
af slice-repo <dir> Repository architecture map for system prompts.
af tokens <target> Multi-model token calculator across GPT-4o, Claude, Gemini, DeepSeek.
af slice-json <file> Prune large JSON/YAML data files.
af slice-md <file> Extract Markdown headings and lead sections.
af audit report <log> Trajectory metrics, Mermaid sequence diagrams, and git diff snippets.
af audit safety <log> Security scan for leaked keys, destructive commands, loop storms.
af audit compare <l1> <l2> Side-by-side benchmark comparison between agent runs.
af audit cost <log> Calculate dollar cost ($) across LLM models.
af audit redact <log> Sanitize PII, credentials, and IPs in trajectory logs.
af audit diagnose <log> Cluster tool errors and generate parameter suggestions.
af audit commit-msg <log> Generate conventional commit message from touched files.
af mcp-repl <server_cmd> Interactive stdio terminal REPL for debugging MCP servers.
af gateway --servers <cmds> Multi-server MCP multiplexer gateway.
af eval run <tasks.jsonl> Run agent evaluation harness and generate scorecards.
af sandbox run <command> Execute command inside snapshot-guarded sandbox.
af sandbox snapshot/rollback Manage git working directory snapshots.
af export-skill <server.py> Export Antigravity skill package (SKILL.md, scripts/, references/).
af export-rules Export .cursorrules, .windsurfrules, or AGENTS.md.
af config set/list/path Manage credentials in ~/.af/auth.toml.
af config export-env Export credentials to .env.
af doctor System & environment diagnostics.
af init [--ci] Scaffold project and CI/CD workflows.
af studio Launch FastAPI web workbench.

License

MIT License. Created for AI agent developers.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

af_toolkit-0.1.0.tar.gz (42.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

af_toolkit-0.1.0-py3-none-any.whl (58.7 kB view details)

Uploaded Python 3

File details

Details for the file af_toolkit-0.1.0.tar.gz.

File metadata

  • Download URL: af_toolkit-0.1.0.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for af_toolkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 07b604d4292a175abed86fb7be62cd1cb2a80e0f6366b0c4ae1b4bddfb0cc5ee
MD5 ccf7ee7cf31be3c7e1259bada2988634
BLAKE2b-256 acc7a56647bc591fa5f2d0ec4b670eb1c54efc5e308c60a5d7e69a755cc33f14

See more details on using hashes here.

Provenance

The following attestation bundles were made for af_toolkit-0.1.0.tar.gz:

Publisher: publish.yml on AndreaPallotta/af-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file af_toolkit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: af_toolkit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 58.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for af_toolkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a0c2c7470fd3cba85e2043a1fa3526577688c04396682fa4422717d15eb048d
MD5 fb9984bbb7d8c158ab9cffcdc3f98099
BLAKE2b-256 9629f00d1ec3a4bd6e46dd4735c888f0cb2398fdc889df93b1f626f4a2e6a527

See more details on using hashes here.

Provenance

The following attestation bundles were made for af_toolkit-0.1.0-py3-none-any.whl:

Publisher: publish.yml on AndreaPallotta/af-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page