Self-Improving Agents Through Closed-Loop Learning

GitHub pip install cannyforge

Agents That Actually Learn

Skills are defined declaratively via SKILL.md files. The engine handles execution, error detection, pattern learning, rule application, and lifecycle automatically.

Try It Now
254
Tests
11
CLI Commands
4
Built-in Skills

Declarative Skills

Define skills via SKILL.md files following the AgentSkills.io spec. No Python subclassing required.

Automatic Learning

Monitors errors, detects patterns, generates rules. Triggers automatically when 2+ uncovered error types appear.

Rule Lifecycle

Rules that underperform are demoted to PROBATION, then DORMANT — never deleted. Resurrection when errors resurface.

Framework Integrations

Works with LangChain and CrewAI. Wrap any skill as a tool for your existing agent.

LLM-Powered

Three-tier execution: custom handler → LLM multi-step loop → template fallback. Your choice.

Storage Options

JSON file or SQLite backend. Your data stays on your machine.

Quick Start

# Install pip install cannyforge # Run the demo cannyforge demo # Or use in code from cannyforge import CannyForge forge = CannyForge() result = forge.execute("Write an email about the 3 PM meeting") # First run: False (TimezoneError logged) # After learning: True (rule prevents the error) print(result.success, result.output)
License: BSL 1.1 — Free to use in production, but you may not offer CannyForge as a competing hosted service. Converts to Apache 2.0 on 2030-03-01.