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

KV Cache Reuse for Long Conversations on Apple Silicon Delivers 200x Speedup
A developer implemented session-based KV cache reuse for local LLM inference using Apple's MLX framework, achieving a 200x improvement in time-to-first-token at 100K context length. The approach keeps the KV cache in memory across conversation turns, processing only new tokens.

Claude Code hooks prevent Chrome tab interference between multiple sessions
A developer created three hooks (session-start, capture-tab-id, enforce-tab-id) that pin each Claude Code session to its own Chrome tab, preventing sessions from accidentally accessing other sessions' tabs during test runs and form fills.

HostMyClaudeHTML: One-Click Sharing for Claude HTML Artifacts
A developer built hostmyclaudehtml.com, a free tool that lets you share Claude-generated HTML artifacts as live URLs by dragging and dropping the .html file. No account is required for uploaders or viewers.

Developer Builds Power Automate MCP Server with 108 Tools, Cross-Platform Support
A developer built a Power Automate MCP server that expanded from 12 to 108 tools, covering Dataverse CRUD via OData, SharePoint management via Graph, Power Apps versioning, environment administration, and cross-platform support for Windows, macOS, and Linux.