Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

English · 简体中文

AgentForge

CI License Python

An open-source, extensible and security-aware AI agent framework with Skills, Plugins and sandboxed tool execution.

Project status: alpha. AgentForge is usable as a local CLI and framework, but its subprocess controls are defense in depth—not complete operating-system or container isolation. Do not run untrusted Plugins or unreviewed code on a sensitive machine.

Why AgentForge

Many agent projects couple prompts, tools, code execution, and network access into one application. That makes capabilities hard to reuse and leaves authorization decisions too close to model output. AgentForge separates those concerns:

  • Agent Core understands a task, selects Skills, plans bounded Plugin calls, and summarizes structured results.
  • Skills are versioned Markdown guidance for a class of tasks. They never grant permissions.
  • Plugins expose validated actions through one interface. The model receives no direct OS handle.
  • Permission and policy modules make the final authorization decision in code.

The result is a reusable foundation for local automation, open-source maintenance, and security research—not a fixed AI application.

Features

Capability Status Notes
Single-agent core Implemented Skill selection → plan → Plugin execution → final answer
Markdown Skills Implemented YAML metadata, validation, keyword/LLM selection
Plugin interface and registry Implemented Action schemas, permission declarations, structured results
Filesystem Plugin Implemented Workspace confinement, traversal/symlink checks, sensitive-path blocks
Shell Plugin Experimental argv only, shell=False, allowlist, timeout, filtered environment
Python Plugin Experimental AST policy plus a separate python -I -S child process
GitHub Plugin Implemented, read-only Repositories, Issues, PRs, files/diffs, commits, local Issue drafts
Secret redaction Implemented Common OpenAI, GitHub, Bearer, AWS, and explicit runtime secrets
Network policy Implemented HTTPS/domain allowlist and private/local/metadata IP denial
General Web/Network Plugin Not implemented Planned; network access remains off by default
Plugin/Skill marketplace Planned Targeted for later releases

Architecture

User
  ↓
Agent Core
  ↓
Untrusted Skill guidance
  ↓
Validated execution plan
  ↓
Plugin interface
  ↓
Permission + policy layer
  ↓
Restricted subprocess / API adapter
  ↓
Filesystem / Shell / Python / GitHub

The LLM proposes actions; it does not decide whether they are authorized. Every Plugin action is checked against configured permissions and validated arguments before implementation code runs. See Architecture and the Security Model.

Quick start

Requirement: Python 3.11 or newer.

python -m venv .venv

Activate the environment:

# macOS / Linux
source .venv/bin/activate

# Windows PowerShell
.venv\Scripts\Activate.ps1

Install the current alpha release and inspect the CLI. The distribution is named agentforge-secure, while the command and Python package remain agentforge.

python -m pip install --pre agentforge-secure
agentforge --help
agentforge doctor

Set the OpenAI key in your shell—never in source control:

# macOS / Linux
export OPENAI_API_KEY="your-key"

# Windows PowerShell
$env:OPENAI_API_KEY = "your-key"

Run a task:

agentforge run "summarize the current repository"

Or start interactive mode:

$ agentforge
AgentForge > run the tests and explain why they failed

Shell and Python execution are disabled by default. Copy the example configuration only when you need to make an explicit permission decision:

cp agentforge.example.yaml agentforge.yaml
agentforge --config agentforge.yaml run "run the tests and explain failures"

Configuration

AgentForge reads YAML or TOML through --config. The defaults follow least privilege:

agent:
  model: gpt-5.6-luna
workspace:
  root: .
  skills_dir: skills
permissions:
  filesystem_read: true
  filesystem_write: false
  filesystem_delete: false
  shell_execute: false
  python_execute: false
  network_access: false
  github_read: true
  github_write: false
security:
  redact_secrets: true
  command_timeout: 30
  max_output_chars: 50000

Credentials are intentionally unsupported in config files. Use OPENAI_API_KEY and optional GITHUB_TOKEN environment variables. The GitHub Plugin can read public repositories without a token, subject to GitHub's unauthenticated rate limits.

Skills

A Skill describes how to approach a task. It is a versioned SKILL.md with strict YAML front matter and Markdown instructions:

---
name: test-runner
version: 0.1.0
description: Run project tests and explain failures.
author: AgentForge contributors
required_plugins: [filesystem, shell]
keywords: [test, pytest, failure]
---
# Test Runner

Run tests only through the Shell Plugin and explain the first actionable failure.

Built-in Skills:

  • repository-summary
  • test-runner
  • code-review
  • github-maintainer

Skill text is untrusted input. It may influence a model proposal, but it cannot bypass Plugin schemas, path policy, command policy, or permissions. See Skill Development and the copyable project-explainer example.

Plugins

Plugin Actions Required permission
filesystem list, read, create, write, delete Per-action filesystem permission
shell run shell.execute
python run python.execute
github repository, Issues, PRs, diffs, commits, draft Issue github.read; drafts are local

Community Plugins subclass Plugin, define Pydantic action models and permission metadata, then register through PluginRegistry. Dynamic entry-point discovery is planned, not yet implemented. See Plugin Development and the hello_plugin example.

GitHub maintainer workflow

The github-maintainer Skill supports:

  • Issue triage into bug, feature, question, documentation, security, or duplicate candidate;
  • PR summaries with changed modules, risks, suggested tests, and security-sensitive areas;
  • release notes grouped into Features, Bug Fixes, Security, Documentation, and Breaking Changes;
  • documentation drift checks.

It does not automatically close Issues, merge PRs, or submit Issue drafts. Try the runnable triage example.

Security

AgentForge combines LLM output, third-party text, filesystem access, subprocesses, API tokens, and community extensions. Those are real attack surfaces.

Security controls include:

  • least-privilege defaults and action-level permission checks;
  • canonical workspace path resolution and symlink-escape checks;
  • argv-only subprocesses, command allowlists, timeouts, filtered environments, and output caps;
  • conservative Python AST checks in a separate process;
  • HTTPS/domain allowlists and denial of localhost, private, link-local, reserved, and metadata IPs;
  • secret redaction before logs, LLM context, and Agent tool-result summaries;
  • GET-only GitHub API behavior in v0.1;
  • tests for traversal, injection, prompt-injection impact, permission bypass, and secret leakage.

Important limitations:

  • ProcessSandbox is not a kernel sandbox, VM, seccomp profile, or container.
  • Python AST validation is bypass-resistant guidance, not a proof of safe arbitrary Python.
  • an imported third-party Plugin is ordinary Python and can act before the framework can mediate it;
  • local tests and project code can themselves be malicious when Shell execution is enabled;
  • DNS validation cannot by itself eliminate every rebinding or proxy-layer risk.

Read SECURITY.md, the Security Model, and the Threat Model before enabling high-risk permissions.

Development

python -m pip install -e ".[dev]"
ruff check src tests
mypy src
pytest
pytest tests/security

CI runs lint, strict type checking, the full test suite, the dedicated security suite, and PyPI distribution validation. Workflows use read-only repository permissions and do not expose secrets to pull requests. Maintainers can follow the Release Guide for the agentforge-secure PyPI distribution.

Contributing

Contributions are welcome in the form of Skills, Plugins, tests, documentation, and focused framework improvements. Start with CONTRIBUTING.md. Security-sensitive changes need regression tests and human review; unknown pull requests are never a reason to enable high-risk CI credentials or execute privileged automation.

Roadmap

  • v0.1: CLI, Agent Core, Skills, Plugins, permissions, restricted local execution
  • v0.2: stronger process isolation adapters, richer GitHub maintenance workflows
  • v0.3: signed/verified Plugin registry design
  • v0.4: Skill registry, provenance metadata, and distribution tooling

Roadmap items are plans, not current capabilities. See Project Overview for the intended ecosystem.

License

Copyright 2026 wanhaoli376-lab and AgentForge contributors.

Licensed under the Apache License 2.0.

Download files

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

Source Distribution

agentforge_secure-0.1.0a1.tar.gz (75.2 kB view details)

Uploaded Source

Built Distribution

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

agentforge_secure-0.1.0a1-py3-none-any.whl (52.4 kB view details)

Uploaded Python 3

File details

Details for the file agentforge_secure-0.1.0a1.tar.gz.

File metadata

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

File hashes

Hashes for agentforge_secure-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 e74552cf824f09900790c4585d2e9174de99095a79a632786419aaa0bccab3ea
MD5 0affcb8cf76bac8c7193fc3cb4013b0d
BLAKE2b-256 3504683633a7840e0e2951dd775679e7c067f779ac6307bed53390853de71e4e

See more details on using hashes here.

Provenance

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

Publisher: release.yml on wanhaoli376-lab/AgentForge

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

File details

Details for the file agentforge_secure-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for agentforge_secure-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 dfb46e355e16cc3296f36661f2b9fb1862e3ba783d98e7caa7950576087296d2
MD5 eb7c4559e8bcfff54c0520f5f2de6db7
BLAKE2b-256 5d9d4e1821e8a97315f33dfd164ae693a91595377becd4c27996fa88d4d60031

See more details on using hashes here.

Provenance

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

Publisher: release.yml on wanhaoli376-lab/AgentForge

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 Pingdom Monitoring Sentry Error logging StatusPage Status page