tokagentOSgithub
Sovereign Agent Layer

AI agents that hold their own keys.

tokagentOS is Tokamak's open-source framework for autonomous agents with a native EVM wallet baked into every runtime. Bring your own LLM key, or let the agent's wallet pay per call via x402.

See an agent run
NETWORK
Ethereum
LICENSE
MIT
RUNTIME
Bun ≥ 1.3
Feed 01Stage Live
16:91200
steward
claude-sonnet-4-5 · vault mode
online
01
Chat agent
message stream
Sync · OK
x402 SETTLED41,392EIP-3009NETWORKS12EVM · L1+L2CODE CHANGES+6,529,929biweeklyACTIVE FORKS47open sourceLICENSEMITfork of elizaOSx402 SETTLED41,392EIP-3009NETWORKS12EVM · L1+L2CODE CHANGES+6,529,929biweeklyACTIVE FORKS47open sourceLICENSEMITfork of elizaOS

Live agent log

EXAMPLE TRACE · STEWARD AGENT · DAEMON MODE

steward · daemon
live

01 / QUICK START

One command. Then it's just TypeScript.

Pick a template, pick plugins, set .env, run. No boilerplate, no wallet plumbing.

~/projects · zsh
  • $ bunx @tokagent/tokagentos@latest
  • $ cd my-agent && bun install
  • $ bun run dev # UI :2138 · API :31337

02 / WALLET-NATIVE

The agent IS the wallet.

Every agent ships with a built-in EVM wallet. Read balances across chains. Sign EIP-712, EIP-3009, SIWE. Hold tokens. Send transactions. No external signer to wire up.

The wallet is the agent's identity. The agent's identity is on-chain.

  • Built on @elizaos/plugin-evm
  • Native EIP-712 / EIP-3009 / SIWE signing
  • Multi-chain balance reads out of the box
agent.ts
import { defineAgent } from '@tokagent/core'

export default defineAgent({
  name: 'treasurer',
  llm: { provider: 'anthropic' },
  wallet: {
    mode: 'vault',
    vault: '0x091365301a461bEeFd5e2Fe1BD244befCE274F5c',
  },
  onMessage: async ({ wallet }) => {
    const eth = await wallet.balance('mainnet')
    return `I hold ${eth} ETH at ${wallet.address}`
  },
})

03 / PAY YOUR LLM

Two paths. One agent.

Bring an API key, or let the wallet pay. Switch per environment, per agent, per call.

LLM payment path comparison
agent.config.ts
// .env
ANTHROPIC_API_KEY=sk-ant-...

// agent
export default defineAgent({
  llm: {
    provider: 'anthropic',
    model: 'claude-opus-4-7',
  },
})

Bring your key.

Anthropic, OpenAI, OpenRouter, Grok, Gemini, Groq, Ollama (local), LiteLLM proxy. Set the env. The matching provider auto-loads at boot. No code changes to swap.

8 PROVIDERS SUPPORTED

04 / RUNTIME

Three runtime modes. Same agent, different blast radius.

Decide once per project: how much can the LLM actually do on-chain?

mode_diagram · vault
react uilocalhost:2138agentStrategyRunnermsgintentClaudeVault0x0913…4F5callowlisted txchainethereumEIP-3009 · allowlist
vault modeproduction

Every on-chain call routes through a deployed ClaudeVault contract — per-method allowlists enforced at the chain level. The operator hot key cannot drain funds even if the LLM is compromised.

.env → TOKAGENT_EXECUTION_MODE=vault
LLM PROVIDERSanthropicopenaiopenroutergrokgeminigroqollamalitellmCHANNELSdiscordtelegramtwitterwhatsappsignalimessageCHAINSmainnetbasearbitrumoptimismpolygontitan

05 / BILLING RAIL

Billed in PTON, not a SaaS subscription.

Route LLM calls through the credit gateway and spend settles on-chain in PTON — an EIP-3009 wrapper over Tokamak TON deposited into a ClaudeVault contract.

01
Deposit

USDC / USDT / ETH / WBTC → TON → PTON, in one signed flow.

02
Sign

SIWE login mints a 24-hour session JWT. Optional sk-ai-* HMAC keys for daemons.

03
Stream

/v1/messages and /v1/chat/completions pass-through to LiteLLM with full SSE.

04
Settle

Spend is metered per-tick and settled in PTON against your ClaudeVault balance.

Route LLM calls through the credit gateway and spend settles on-chain in PTON — an EIP-3009 wrapper over Tokamak TON deposited into a ClaudeVault contract. Top up with USDC, USDT, ETH, or WBTC; mint keys; ship.