agent-wallet
Fungsinya
Skill ini menyiapkan dompet kripto untuk agent AI, yang dikendalikan oleh aturan yang hanya bisa diubah oleh admin. Setiap pengeluaran diperiksa oleh kode terhadap berkas kebijakan sebelum ditandatangani, sehingga aturannya tetap berlaku meskipun agent dimanipulasi.
Kapan dipakai
- โSaat Anda ingin agent melakukan pembayaran dari dompetnya sendiri dalam batas yang Anda tetapkan.
- โKetika Anda memerlukan dompet yang tetap aman meskipun agent tertipu oleh pesan berbahaya.
- โKetika Anda ingin daftar alamat yang diizinkan atau sakelar darurat untuk pengeluaran agent.
Link skill
https://github.com/internet-court/internet-court-skill/blob/main/vendored/chaingpt/agent-wallet/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โSaya ingin memberi agent saya dompet sendiri, tetapi hanya mengizinkannya mengirim ke alamat yang sudah saya setujui.โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Admin membuat dompet terenkripsi dan berkas kebijakan yang berisi aturan, seperti alamat yang diizinkan dan jumlah maksimum. Setiap kali agent hendak mengirim, alat memeriksa kebijakan dalam kode dan menolak jika ada aturan yang gagal. Agent tidak memiliki alat untuk mengubah kebijakan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
ChainGPT Agent Wallet Skill
The agent has its own EOA wallet on every EVM chain it supports. The admin (you, in your shell) sets policies that the agent cannot violate or revoke โ even if a malicious prompt convinces the LLM to try.
Threat model
The attacker's goal: prompt-inject the agent to drain its wallet to an attacker address.
The plugin's defense: the policy check is in code, not in the LLM's prompt. Every chaingpt_agent_wallet_sign_and_send call:
- Loads the policy file fresh from disk (no caching โ admin can update mid-session).
- Runs
checkPolicy(intent)โ pure deterministic code that doesn't see the LLM's context. - Refuses if any rule fails, with a clear reason the agent surfaces back to the user.
The attacker can convince the LLM to call sign_and_send(to=attacker, value=ALL) โ but the tool layer refuses because attacker isn't in allowedToAddresses or value exceeds maxTxValueWei or killSwitch=true. The trust boundary is the tool code, not the LLM.
There is no MCP tool that writes the policy file. The admin edits it directly with a text editor. There is no MCP tool that reads or sets the passphrase. The passphrase lives only in the shell env var or the OS keychain โ never in the keystore file, never in the LLM's context.
Setup (admin steps โ done once)
The keystore passphrase resolves in this priority order:
CHAINGPT_AGENT_WALLET_PASSPHRASEenv var โ explicit override. Best for CI / headless / power users who want zero process-list and zero keychain exposure.- OS keychain โ auto-managed. On macOS (Keychain via
security) or Linux (libsecret viasecret-tool), if no env var is set,chaingpt_agent_wallet_initgenerates a strong 256-bit passphrase and stores it in the keychain. You never type or remember it; the MCP server reads it back on each load.
Option A โ zero-setup (macOS / Linux with a keychain) โ recommended for most
# Just init โ a strong passphrase is generated + stored in your OS keychain.
claude
> initialize the agent wallet
The init output tells you it used the keychain and how to export the passphrase for backup.
Option B โ explicit env var (CI / headless / max control)
# Set a strong passphrase BEFORE starting the MCP server (>= 16 chars)
export CHAINGPT_AGENT_WALLET_PASSPHRASE="your-strong-passphrase-here-min-16-chars"
claude
> initialize the agent wallet
Back up the passphrase either way. Keychain entry:
service=chaingpt-mcp-agent-wallet account=keystore-passphrase. Export on macOS withsecurity find-generic-password -s chaingpt-mcp-agent-wallet -a keystore-passphrase -w. Lose it (and any backup) โ the keystore is unrecoverable. There is no recovery path.
Security tradeoff of the keychain option: the secret stays out of plaintext-on-disk and out of the LLM context, but the keychain is unlocked while you're logged in โ a local attacker on an unlocked session could read it. That's a much higher bar than a plaintext file and appropriate for a low-value bounded hot wallet. For zero local exposure, use Option B.
This creates two files:
| File | Contents | Who edits it |
|---|---|---|
~/.chaingpt-mcp/agent-wallet/keystore.json |
AES-256-GCM encrypted private key | Generated once by the init tool. Never edit by hand. Back it up. |
~/.chaingpt-mcp/agent-wallet/policy.json |
Plain JSON rules | You, the admin, with a text editor. The agent has NO tool that writes this file. |
Both default to ~/.chaingpt-mcp/agent-wallet/ but can be overridden via CHAINGPT_KEYSTORE_FILE and CHAINGPT_AGENT_POLICY_FILE.
Tools
| Tool | Mutates state? | Notes |
|---|---|---|
chaingpt_agent_wallet_init |
Creates keystore | One-shot. Refuses if file exists. |
chaingpt_agent_wallet_address |
No | Returns the agent's EOA address. Use this to receive funds. |
chaingpt_agent_wallet_status |
No | Address + policy digest + kill-switch state. Run this before any signing. |
chaingpt_agent_wallet_balances |
No | Native-coin balances across requested chains. |
chaingpt_agent_wallet_policy |
No (read-only) | Shows the current policy JSON. Cannot modify it. |
chaingpt_agent_wallet_sign_and_send |
Signs + broadcasts a tx | The only tool that can move funds. Gated by policy. |
chaingpt_agent_wallet_serve_ui |
Starts a local HTTP server | Dashboard on http://127.0.0.1:8787. Read-only view. |
Policy file format
Default policy.json (lazily
Pertanyaan umum
Bisakah agent mengubah aturan pengeluarannya sendiri?
Tidak. Tidak ada alat bagi agent untuk menulis berkas kebijakan, dan hanya admin yang mengeditnya secara langsung.
Di mana kata sandi dompet disimpan?
Kata sandi disimpan di variabel lingkungan shell atau keychain sistem operasi, bukan di berkas dompet.
Apa yang terjadi jika sebuah pembayaran melanggar aturan?
Alat menolak menandatanganinya dan memberikan alasan yang bisa diteruskan agent kepada Anda.
Detail
Deskripsi asli dari pembuat
Give the AI agent its own EVM wallet with admin-controlled policies the agent CANNOT bypass even under prompt injection. Encrypted keystore (AES-256-GCM, scrypt KDF), policy file the agent has no tool to write, deterministic policy gate on every signing operation, optional local HTTP dashboard. Triggers: agent wallet, give the agent a wallet, agent address, fund the agent, agent autonomy, policy gate, kill switch, agent permissions, bounded autonomy, ERC-4337 alternative, session-key alternative.
Popularitas
- Bintang GitHub
- 7.0k
- Peringkat
- #13620
- Lisensi
- โ
- Diperbarui
- 26/10/2026
Komentar
- โฆ
Skill lain dari repositori ini
internet-court
7.0kMembantu agent Anda membayar, menyewa, atau bertransaksi dengan aman bersama agent AI lain atau layanan berbayar, dan mengarahkannya ke panduan khusus yang tepat.
genlayer-erc7710-connector
7.0kMembantu agent Anda menghubungkan hasil tinjauan AI ke sistem izin, sehingga tinjauan yang buruk dapat membatasi atau mencabut izin agent.
genlayer-intelligent-contracts
7.0kMembantu agent Anda menentukan aturan, bukti, dan keluaran dari hakim AI yang memeriksa apakah agent lain mengikuti mandatnya.
x402-erc7710
7.0kMembantu agent Anda membayar layanan web per permintaan, dan mengatur pengeluaran berkelanjutan yang tetap dalam anggaran izin.
Skill serupa
add-model-provider
394kMemungkinkan agent Anda menghubungkan penyedia model AI baru ke OpenClaw dengan perintah pengaturan yang aman, menjaga kunci API tetap di luar teks biasa, dan menjalankan uji langsung.
acp-router
394kMembantu agent Anda mengirim tugas ke asisten pemrograman seperti Claude Code atau Cursor lewat OpenClaw, sehingga pekerjaan dijalankan di alat tersebut.
browser-automation
394kMengajari agent Anda mengendalikan halaman web langkah demi langkah, termasuk login, tab, dan pemulihan saat halaman berhenti merespons.