sofagent

Security & Safety 💻 TypeScript ⚖️ MIT 🟢 Actively maintained
43 stars

sofagent is an open-source FDE Harness layer that adds governance, auditing, and rollback capabilities to existing AI agents like DSH, OpenClaw, and WorkBuddy. It solves the problem of unreliable AI deployments by injecting constraints, auditing every change, and keeping snapshots for rollback. It is for solo developers and small enterprises that want to add discipline and traceability to their AI workflows without building a full platform.

sofagent demo
🖼️ Screenshot from the project README

✨ Key features

  • Zero-config audit of recent commit via npx
  • 24 audit rules with fail-fast critical interception
  • Automatic snapshot and rollback after each audit
  • Multi-platform mounting: plugins, skills, MCP, CLI, dashboard
  • FDE methodology for business flow analysis and AI node deployment
  • Training signal export and local model weight deployment

🎯 Use cases

  • Add governance and audit trails to existing AI agents
  • Deploy AI nodes in small business workflows with structured methodology
  • Enforce secret leak detection and injection prevention on every commit
  • Rollback to previous snapshots after a bad AI change
  • Compare multiple base models for fine-tuning ROI

📦 Installation

🧰 Requirements: Node.js >= 18 for full installation; zero-config audit requires only npx and a git repository.

30-second zero-config audit

Run in any git repository:

npx -y -p @sofagent/audit sofagent-audit

Full installation (Node.js >= 18)

Download and review the bootstrap script, then run:

curl -fsSL https://raw.githubusercontent.com/KongFangXun/sofagent/refs/tags/v1.4.4/bootstrap.sh -o bootstrap.sh
less bootstrap.sh          # review for safety
bash bootstrap.sh && rm bootstrap.sh
sofagent-audit --init      # install git hook for automatic audit on commit
sofagent-audit --doctor    # verify environment (optional)

For other installation methods (clone, npm, minimal, enterprise), see the HANDBOOK.

🚀 Usage

Zero-config audit of the latest commit

npx -y -p @sofagent/audit sofagent-audit

Load a security ruleset

npx -y -p @sofagent/audit sofagent-audit --list-rulesets
npx -y -p @sofagent/audit sofagent-audit --ruleset security

Install git hook for automatic audit on every commit

sofagent-audit --init

⚠️ Good to know

Current design is single-machine, single-user; multi-tenant isolation is not yet implemented, and config.yml is not fail-closed by default, so strong compliance scenarios should use CI fallback and file permission locks.

❓ FAQ

Can I use sofagent in production?

It is designed for single-machine use; multi-tenant isolation is on the roadmap. For strong compliance, read SECURITY and LIMITATIONS, and consider CI fallback and file permission locks.

Does sofagent collect my data?

By default everything stays local. Optional federated queries only leave your machine if you explicitly configure them.

How does sofagent compare to secret scanners like gitleaks?

They are complementary: scanners do full-history scans with broader pattern libraries, while sofagent focuses on current diff hard evidence and agent behavior auditing (boundary, injection, permissions).

What platforms does sofagent support?

It supports DeepSeek Harness via plugins, OpenClaw and WorkBuddy via hooks, and Claude Code, Codex, Cursor, and Gemini CLI via skills and git hooks.

📊 Repository

Stars★ 43
Forks🍴 6
Open issues🐛 4
Last commit🕒 Sep 3, 2026
Created📅 Jun 2026
Language💻 TypeScript
License⚖️ MIT

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 6, 2026. Always check the original source before running commands.