agentcontract v0.0.1: A Portable JSON Permission Layer for AI Coding Agents

agentcontract v0.0.1 is a tiny, MIT-licensed Python library that defines a portable JSON permission layer for AI coding agents. The core idea is a simple JSON contract that specifies which tools, paths, and network actions an agent is allowed to perform, independent of any specific agent runtime.
Key Features
- Permission Contract: A JSON structure that lists allowed/denied tools, allowed/denied file paths, network access control, and tools requiring human approval.
agc gui: A new local browser UI for interactively writing, validating, and saving a contract, plus dry-running a proposed tool call against it.- Portable: The contract can be committed to a repo, code-reviewed like normal config, and reused across different agents/runtimes.
Example Contract
{
"allow_tools": ["read_file", "write_file"],
"deny_tools": ["shell"],
"allow_paths": ["./src/"],
"deny_paths": ["~/.ssh/", "~/.env"],
"allow_network": false,
"require_approval": ["shell"]
}The contract enforces that an agent can only read/write files under ./src/, cannot execute shell commands (unless approved), and has no network access. Blocks access to sensitive paths like ~/.ssh/ and ~/.env.
Instead of trusting each tool's internal permission model, you define a single portable policy that any runtime can check before an action touches files, runs commands, calls APIs, or burns tokens.
Who It's For
Developers building agent tooling or running coding agents against real repos who want a boring, portable, and auditable permission layer.
📖 Read the full source: r/openclaw
👀 See Also

Meta Ads MCP OAuth Works But Most Ad Accounts Not Enabled Yet
Meta Ads MCP OAuth flow works and loads 29 tools, but ads_get_ad_accounts returns is_ads_mcp_enabled: false with a message that the feature is gradually rolling out.

Claude Usage Bar Colorizer Browser Extension Built with Claude Code
A developer built a browser extension that recolors Claude's usage bars from green to yellow to red based on percentage thresholds, adds a popup with live usage data, and allows customization of thresholds and colors. The extension only runs on Claude's usage page, stores settings locally, and makes no external network requests.

Implementing AI Checks with Continue for Source-Controlled PR Reviews
Continue integrates AI checks directly into your pull request workflow by using markdown files as source-controlled checks, visible through GitHub status checks.

Fixing Context Bloat in Claude Code Auto-Memory with a Naming Schema and Audit Script
A Claude Code skill enforces a 3-type naming schema, required frontmatter, and a bash audit script to deduplicate memory files and reduce context load.