Open-source Hedera DeFi toolkit built for an OpenClaw AI agent to drive β via CLI tool use, not MCP. Fully built. Ready to go.
Hedera Hello Future Apex Hackathon 2026 β AI & Agents Track | OpenClaw Bounty
π Whitepaper (PDF) Β· π Pitch Deck (PDF) Β· π¬ Demo Video
- Watch β Demo Video (5 min)
- Read β Pitch Deck or Whitepaper
- Explore β This README (architecture, features, security model)
- Try it β
git cloneβ./launch.sh initβ./launch.sh balance(2 min setup)
Built solo by Chris β github.com/Chris0x88
The Hedera Agent Kit gives developers incredible building blocks β swaps, transfers, token operations. What it doesn't give you is an agent system to drive them. That's what we built.
Space Lord is the connective tissue between an OpenClaw AI agent and the Hedera hashgraph. It collapses the exchange, the wallet, and the portfolio tracker into one local CLI tool that an AI agent drives through CLI tool use β not MCP. Your agent doesn't write swap code. It calls fixed tools every time. One valid execution path per operation.
| Hedera Agent Kit | Space Lord | |
|---|---|---|
| What | Developer toolkit / library | Full-stack agent-driven application |
| Agent integration | You build it | Pre-configured OpenClaw specialist agent |
| SaucerSwap | API-dependent | Direct smart contract calls (no API) |
| Governance | None | Read-only config: per-swap limits, daily caps, slippage ceilings |
| Key security | Framework-dependent | XOR-obfuscated, agent-sandboxed, whitelisted transfers |
| Runs on | Your infrastructure | Your machine β local edge compute |
No browser wallet. No exchange login. No click fatigue. No multi-app juggling. One local tool. 30+ commands. Direct to smart contracts.
We consume the middleware β starting with HashPack and SaucerSwap. Built and tested exclusively on Hedera mainnet with real tokens. See the full differentiation breakdown.
We're heading to a multi-agent universe. The Space Lord skill is a support tool that provides agentic control of the application (installed in Option B). Your primary OpenClaw agent can clone this repo, install the app, and spin up a dedicated trading agent with the Space Lord skill package.
- Ask your agent to
git clonethis repo and install the application locally - Have it spin up a dedicated trading agent using the Space Lord skill
- Set up Telegram β create your own bot to chat directly with your new agent (OpenClaw also supports Discord and other platforms)
β οΈ Best to run locally β don't pass crypto keys through AI LLM chat APIs (unsafe β keys could end up in model training data). New key protection features coming soon. For now, treat as live network "experimental."
git clone https://github.com/Chris0x88/pacman.git
cd pacman
./launch.sh init # Guided wizard: key setup, token associations
./launch.sh help # See all 30+ available commands
./launch.sh balance # Check your portfolio
./launch.sh swap 10 USDC for HBAR # Execute a real swap./launch.sh is a zero-dependency bash launcher β installs uv, validates .env, dispatches to the CLI engine. Keys entered locally through the wizard β they never travel through any API.
graph TD
%% Styling %%
classDef interface fill:#1e1e2e,stroke:#cba6f7,stroke-width:2px,color:#fff,rx:8,ry:8
classDef ai fill:#ff2052,stroke:#fff,stroke-width:2px,color:#fff,rx:8,ry:8
classDef engine fill:#313244,stroke:#a6e3a1,stroke-width:2px,color:#fff,rx:8,ry:8
classDef ext fill:#11111b,stroke:#f9e2af,stroke-width:2px,color:#fff,rx:8,ry:8
classDef hedera fill:#000000,stroke:#00a8e8,stroke-width:3px,color:#fff,rx:8,ry:8
User((You)):::interface -->|Natural Language| Agent[OpenClaw AI Agent]:::ai
User -->|Terminal| CLI[CLI Direct]:::interface
Agent -->|subprocess| Engine[Space Lord Engine]:::engine
CLI --> Engine
Engine -->|controller| Router[SaucerSwap V2 Router]:::ext
Engine -->|HTS| Tokens[Token Transfers]:::ext
Engine -->|HCS| Signals[On-Chain Signals]:::ext
Engine -->|SDK| Accounts[Account Management]:::ext
Router -->|JSON-RPC| Hedera[Hedera Mainnet]:::hedera
Tokens --> Hedera
Signals --> Hedera
Accounts --> Hedera
| Component | Role |
|---|---|
| π§ CLI Engine | 30+ deterministic commands. Controller β router β executor pipeline. |
| π SaucerSwap V2 Router | Custom, open-source multi-hop path finding. Direct smart contract calls via JSON-RPC. |
| π‘οΈ Governance Engine | Per-swap max, daily max, slippage cap, gas reserve. User-configurable, agent-immutable. |
| π€ OpenClaw Agent | Reads SKILL.md, interprets natural language, executes CLI via subprocesses. Light key protection β full sandbox planned. |
| π Power Law Rebalancer | Autonomous daemon for local portfolio rebalancing. Proof of concept while awaiting Hedera Schedule Service. |
| π‘ HCS Publisher | (1) Crowd-sourced bug/telemetry logging for self-healing. (2) Trading signal broadcast for potential monetization. |
| π§ Training Pipeline | Records CLI commands + responses as instruction pairs for future LLM fine-tuning. |
| Interface | Speed | Best for |
|---|---|---|
| π€ OpenClaw Agent (Telegram) | ~2-5s | Drives the CLI for you β no commands to remember, no multi-step waits |
| π» Terminal CLI | Instant | Scripting, automation, direct control |
| π Dashboard | Real-time | Visual monitoring (to be replaced by OpenClaw's "canvas" feature) |
Direct to Hedera β no middleware:
| Service | Usage |
|---|---|
| SaucerSwap V2 | Direct router/quoter calls via JSON-RPC. Multi-hop path finding. |
| HTS | Token associations, transfers, approvals via HTS Precompile. |
| HCS | Signal broadcast, bug telemetry, HCS-10 agent-to-agent messaging. |
| Mirror Node | Real-time balances, transaction history, key lookups. |
| Accounts | Multi-account management, creation via Hiero SDK, ECDSA signing. |
| Staking | HBAR staking/unstaking to consensus nodes. |
- π Token Swaps β Natural language ("swap 10 USDC for HBAR") β SaucerSwap V2 smart contracts
- π° Portfolio Management β Real-time balances, USD values, transaction history, NFT viewer
- π€ Self-Custody Transfers β Whitelisted destinations only. EVM addresses blocked.
- π€ Autonomous Rebalancing β Power Law daemon auto-rebalances BTC allocation on thresholds
- π‘ On-Chain Signals β Daily HCS heartbeat. Structured JSON. Anyone can subscribe.
- π‘οΈ Governance & Safety β One config file. Per-swap limits, slippage caps, gas reserves. Agent can't modify.
- π§ Training Data β Every command generates fine-tuning data for future AI models
The golden rule: the AI agent never sees your keys.
- π Keys stored locally in
.env, encrypted in memory, decrypted only at signing, then immediately cleared - π§ Agent predicts intent. Deterministic CLI handles the cryptography.
- π Wallet whitelists enforce all transfers β no exceptions
- π‘οΈ Governance is read-only to the agent
- β‘ We never simulate β every transaction is real
| Resource | Link |
|---|---|
| π₯ Demo Video | YouTube |
| π Pitch Deck | docs/PITCH_DECK.pdf |
| π Technical Whitepaper | docs/WHITEPAPER_v2.pdf |
| π ClawHub Skill | clawhub.ai/Chris0x88/pacman-hedera |
| π‘ HCS Signal Topic | 0.0.10371598 |
MIT
Built with real money. Real transactions. Real learnings. π