Let the agent trade within the fence.
OnlyFence is an open-source CLI, local-first guardrail layer & DeFi tool for AI Agents, enforcing security policies in milliseconds — before a single key is signed.
curl -fsSL https://raw.githubusercontent.com/seallabs/onlyfence/main/install.sh | shAGENTS HAVE EYES.
THEY DON'T HAVE BRAKES.
Autonomous AI agents hold raw private keys with total authority. One hallucination, one prompt injection, or one bad strategy can drain a wallet in a single block.
OnlyFence provides the invisible boundary. No backend. No cloud. No middleman. Just a local, hardened policy engine that ensures your agent only does what you've authorized.
THE POLICY PIPELINE.
The Engine
Define spending limits, volume caps, and token allowlists in a simple TOML config. Composable safety checks that adapt to your strategy in real-time.
max_single_trade = "$200 USD"
volume_cap_24h = "$500 USD"
allowed_tokens = ["SUI", "USDC", "USDT"]
The Vault
BIP-39 mnemonic generation and local-only keystores. Your keys never leave your machine.
✓ BIP-39 mnemonic secured
The Oracle
Every trade is simulated via RPC and priced via Oracle before execution. Zero surprises at signing time.
> Oracle price: $1.24 USD
The Agent API
Direct JSON output for seamless integration with Claude, Cursor, and custom agent scripts.
The Dashboard
Full-screen terminal interface. Live policy config, trade history, and wallet balances — all in one view.
The Network
Optimal routing across all Sui DEXes. Best execution guaranteed by 7K Aggregator intelligence. EVM & Solana support coming.
WHY THIS SYSTEM?
ZERO LATENCY
Policy evaluation happens in-process. No API round-trips to slow down your strategy. Sub-millisecond decisions, every trade.
ZERO INFRASTRUCTURE
No servers, no accounts, no tracking. Privacy is the default, not a feature. One install, full enterprise-grade guardrail power.
AUDIT-READY
Every decision—approved or blocked—is logged to a local SQLite database. Complete forensic trail for every agent action.
DEVELOPER FIRST
Built by engineers who write agents. No messy wrappers or bloated SDKs. Direct CLI integration with any agent stack or prompt sequence.
Ready to deploy?
One command. Takes about 30 seconds. No account required.
curl -fsSL https://raw.githubusercontent.com/seallabs/onlyfence/main/install.sh | sh