πŸš€ Get Your Agent On-Chain

Zero to your first encrypted write on Dash Platform. Any AI agent, ~5 minutes, no blockchain knowledge needed. The only step that needs gas, your human can do for you with one click.

1
Install peg-agent

Clone the tool and install dependencies. Requires Node.js 18+.

git clone https://github.com/blockchainsuperheroes/peg-agent.git
cd peg-agent
npm install

Verify it works:

node bin/peg-agent.js help
2
Create Your Identity

Generate a mnemonic (your agent's master key) and derive identity keys.

node bin/peg-agent.js create

This outputs a 12-word mnemonic phrase. Save it somewhere safe.

# Example output:
πŸ”‘ Generated new mnemonic (BACK THIS UP!):
   witch collapse practice feed shame open despair creek road again ice least

πŸ“‹ Key derivation complete:
   Funding address: XqLYPDTAR...

⚠️ Your mnemonic IS your identity. Lose it = lose access forever. No recovery, no admin, no support.

3
Fund Your Identity (the one step that needs gas)

To write, your identity needs storage credits. You get them by depositing a little PC into the funding facility together with your identity ID. A relayer credits your identity at the alpha rate 1 PC : 1 DASH (subsidised). You never touch DASH or wDASH directly. Min 0.01 PC, max 0.05 PC per deposit β€” one 0.04 PC deposit covers many writes.

Have PC or ETH yourself? Deposit directly DIRECT
Use the facility at peg.gg/facility.html — native PC on Pentagon Chain, PC on Ethereum, or one-click pay-with-ETH (it swaps ETH→PC and deposits in one tx).
Can't pay yourself? Hand it to your human EASY
Generate a deposit link with your identity baked in and send it to your human:
https://peg.gg/facility.html?id=YOUR_IDENTITY_ID&amt=0.04
They open it, connect any wallet, and pay about a dollar. Nothing to configure β€” your identity is already filled in. They can pay with ETH, or PC on either chain.
Free via AgentCert FREE
Get L3 certified at agentcert.io and receive a free identity + first writes. Or ask in Discord for an alpha airdrop.

After the deposit lands, your identity is credited within a minute or two. Check with node bin/peg-agent.js status β€” the balance should be > 0 before you write.

4
Link & Verify

Once you have an identity ID, link it to your mnemonic:

node bin/peg-agent.js create --identity YOUR_IDENTITY_ID

Check your status:

node bin/peg-agent.js status

# Output:
═══ Identity Status ═══
  ID:        EWSoMAq...
  Balance:   5990458930 credits
  Keys:      5
  Network:   mainnet
5
Your First Encrypted Write

One command. The --encrypt flag encrypts the content field client-side (AES-256-GCM, key derived from your mnemonic) before anything leaves your machine. The network stores only ciphertext β€” only you can decrypt it. The default contract's type is agentFile (required fields: filename, content, createdAt); use a unique filename each write.

node bin/peg-agent.js write \
  --contract 8TLskWt7j2ad3FggXbZtp4EUH5JU82vya374Af5axt4X \
  --type agentFile \
  --data "{\"filename\":\"first-write.md\",\"content\":\"Hello world β€” my first encrypted write.\",\"createdAt\":$(date +%s000)}" \
  --encrypt
# Output:
πŸ”’ Encrypted field "content" (AES-256-GCM, key from your mnemonic).
βœ… Document submitted:
   data.content: "vTQAl62Y9X2E3Laq..."   # ciphertext on-chain
πŸ”“ To read it back decrypted: peg-agent read --type agentFile --decrypt

Read it back, decrypted, with your mnemonic key:

node bin/peg-agent.js read \
  --contract 8TLskWt7j2ad3FggXbZtp4EUH5JU82vya374Af5axt4X \
  --type agentFile --decrypt

That's a full encrypted round-trip on a decentralized network. Use --encrypt=field for a different field, or --encrypt-all for every string field.

6
First Backup

Back up your agent's workspace files to Dash Platform. Files are encrypted automatically. Secrets are blocked automatically.

node bin/peg-agent.js backup --dir ~/your-agent-workspace
# Output:
πŸ“¦ Backing up 4 files to Dash Platform (mainnet)…
  βœ… SOUL.md β€” πŸ”’ single doc β†’ GSmdK...
  βœ… USER.md β€” πŸ”’ single doc β†’ AzcCh...
  βœ… AGENTS.md β€” πŸ”’ single doc β†’ 6EvZx...
  πŸ“¦ MEMORY.md β€” chunking: 1 chunks + manifest
     πŸ“‹ manifest β†’ Ay8zy...
     🧩 chunk.0 β†’ AAwN1...

πŸ“¦ Backup summary:
   Files backed up:  4
   Total documents:  5

Your agent's memory is now permanently stored on Dash Platform. Encrypted, decentralized, yours forever.

Verify on Platform Explorer β†’

βœ…
Restore (When Needed)

Agent dies? New machine? Restore everything from chain:

node bin/peg-agent.js restore --out ~/your-agent-workspace

All files are decrypted and written to disk. Your agent reads SOUL.md and becomes who it was.

⚠️ SECRETS.md is never stored on-chain. Your human provides credentials after restore.

πŸ”— Prefer API? Use curl.

No CLI needed. Any agent that can make HTTP calls can onboard.

# Check identity status
curl -s -H "X-API-Key: YOUR_KEY" \
  "https://api.peg.gg/api/identity/status?id=YOUR_IDENTITY_ID"

# Write a document
curl -X POST https://api.peg.gg/api/documents/write \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"identityId":"...","mnemonic":"...","filename":"SOUL.md","content":"..."}'

# Read documents (with decryption)
curl -s -H "X-API-Key: YOUR_KEY" -H "X-Mnemonic: word1 word2 ..." \
  "https://api.peg.gg/api/documents/read?identity=YOUR_ID"

Contact us on Discord for API keys.

Ready to try?

Your agent's identity lives on-chain forever. Start now.

Get Certified Free Join Discord