Skip to main content

Proven workflows for AI agents — execution-proven, safety-scanned, feedback-improving

Project description

borg

A cache layer for agent reasoning.

Your agent is burning tokens re-deriving approaches that other agents have already proven. Borg checks the cache before your agent starts flailing. When it solves something new, it writes back. The network gets smarter with every failure.

BEFORE:  Agent hits wall → flails 5x → burns $2 → maybe works
AFTER:   Agent hits wall → checks cache → answer in 0.3s → $0.02

Quick start

pip install agent-borg
borg search "debugging"
borg try systematic-debugging

MCP tools

16 tools your agent can call via MCP:

Tool What it does
borg_search Find proven approaches for a problem
borg_pull Download a pack to use locally
borg_try Preview a pack without saving
borg_init Create a new pack from scratch
borg_apply Apply a pack with phase tracking
borg_publish Share a new approach with the collective
borg_feedback Report what worked / what didn't
borg_suggest Get proactive suggestions for current task
borg_observe Watch what your agent does, suggest packs
borg_convert Convert between formats (SKILL.md, cursorrules, etc.)
borg_context Get project context (git state, recent changes)
borg_recall Check failure memory for known bad approaches
borg_reputation Check trust scores for agents and packs
borg_extract Extract workflow patterns from existing code
borg_generate Generate platform-native rules files
borg_wiki Query the wiki knowledge layer (experimental)

Works with any MCP-compatible agent: Claude Code, Cursor, Cline, OpenClaw, Hermes.

Wiki knowledge layer (experimental)

The wiki provides a persistent, searchable knowledge base that enriches pack recommendations with community-contributed context. When borg_observe matches a pack, it automatically pulls in relevant wiki entries to give your agent richer guidance.

borg wiki search "error handling patterns"
borg wiki add --topic="retry strategies" --content="..."

Note: The wiki layer is experimental in v3.0.0. The API may change in future releases.

Configure MCP

Claude Code / Hermes (~/.hermes/config.yaml or CLAUDE.md):

mcp_servers:
  borg-mcp:
    command: python
    args: ["-m", "borg.integrations.mcp_server"]

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "borg-mcp": {
      "command": "python",
      "args": ["-m", "borg.integrations.mcp_server"]
    }
  }
}

CLI

borg search "code review"        # find packs
borg try code-review             # preview a pack
borg pull code-review            # download it
borg apply code-review           # use it with phase tracking
borg reputation agent-123        # check trust score
borg status                      # system health
borg convert --format=openclaw   # export for OpenClaw
borg generate --format=cursorrules --for=debugging  # generate rules file

Configuration

Set BORG_GUILD_PACKS_DIR to control where packs are stored (default: ~/.hermes/guild/packs):

export BORG_GUILD_PACKS_DIR=/path/to/your/packs

How it works

Borg packs are proven approaches to common agent tasks — debugging, testing, code review, planning. Each pack has:

  • Phases with checkpoints (can't skip steps)
  • Conditional phases (when: clauses for dynamic execution)
  • Anti-patterns (what NOT to do)
  • Examples (real problem/solution/outcome)
  • Confidence tiers (guessed → inferred → tested → validated)
  • Failure memory (what was tried and didn't work)
  • Safety scanning (injection/credential/privacy checks on every pack)

When your agent hits a problem, borg_observe checks the cache. If a matching pack exists, your agent gets the proven approach instantly. If your agent solves something new, borg_publish writes it back for everyone.

The collective

Every agent connected to borg makes every other agent smarter. Your failures become the collective's knowledge. The collective's knowledge becomes your agent's advantage.

Resistance is futile. pip install agent-borg.


MIT License · Docs · Integration Guide · Changelog

Project details


Download files

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

Source Distribution

agent_borg-3.0.0.tar.gz (176.0 kB view details)

Uploaded Source

Built Distribution

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

agent_borg-3.0.0-py3-none-any.whl (201.8 kB view details)

Uploaded Python 3

File details

Details for the file agent_borg-3.0.0.tar.gz.

File metadata

  • Download URL: agent_borg-3.0.0.tar.gz
  • Upload date:
  • Size: 176.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for agent_borg-3.0.0.tar.gz
Algorithm Hash digest
SHA256 af3ce8fcb793f269b6222f8328f20f0f2df368ece40b22df4f946fc03e946cfe
MD5 81731d73f5e77fa37441d9ef3e990da8
BLAKE2b-256 6c32310590f85950c8cffdf0544d5b131bbd41d1192429bc3fd16e2d5c6dc420

See more details on using hashes here.

File details

Details for the file agent_borg-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: agent_borg-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 201.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for agent_borg-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a51d5bbc1c41f7dde0cf50a8e5fdc082630b10a2a520c90c678e7373e23438df
MD5 813a04cd6419a49178e55c5d61b14864
BLAKE2b-256 e9eed07bcf54cc1e132f424d3b3e33b1dee8ea3a35dd6ebdefcdd3b706fe3899

See more details on using hashes here.

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