Skip to main content
[ SYSTEM_STATUS: OPERATIONAL // AGENT_FENCE_v0.2.0 ]

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.

fence — policy-engine
admin@fence:~$
> [POLICY_ENGINE] Evaluating Trade Intent...
> [REJECTED] 24h Volume Cap ($500) exceeded.
> Current Session: $480 | Attempted: +$500
> Action: Transaction short-circuited locally.
admin@fence:~$
INSTALL
curl -fsSL https://raw.githubusercontent.com/seallabs/onlyfence/main/install.sh | sh

AGENTS 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.

EDITABLE_POLICIES

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.

# ~/.onlyfence/config.toml
max_single_trade = "$200 USD"
volume_cap_24h   = "$500 USD"
allowed_tokens   = ["SUI", "USDC", "USDT"]
ENCRYPTED_SIGNING

The Vault

BIP-39 mnemonic generation and local-only keystores. Your keys never leave your machine.

✓ Keystore encrypted locally
✓ BIP-39 mnemonic secured
REALTIME_SIMULATION

The Oracle

Every trade is simulated via RPC and priced via Oracle before execution. Zero surprises at signing time.

> Simulating via RPC...
> Oracle price: $1.24 USD
MACHINE_READABLE

The Agent API

Direct JSON output for seamless integration with Claude, Cursor, and custom agent scripts.

fence swap SUI USDC 10 --output json
INTERACTIVE_TUI

The Dashboard

Full-screen terminal interface. Live policy config, trade history, and wallet balances — all in one view.

fence   // Launch Dashboard
7K_AGGREGATOR_POWERED

The Network

Optimal routing across all Sui DEXes. Best execution guaranteed by 7K Aggregator intelligence. EVM & Solana support coming.

CetusDeepBookBluefinFlowXTurbosEVM ↗Solana ↗

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.

INSTALL
curl -fsSL https://raw.githubusercontent.com/seallabs/onlyfence/main/install.sh | sh