darkroom Open the room
Browse docs

Extending it

Add your own tools — Solana RPC, contract analysis, anything — in a few lines.

Add a capability in a few lines#

The agent is built on an extension API, so giving it a new tool is small. Register a tool and the model can call it.

pi.registerTool({
  name: "solana",
  label: "Solana",
  description: "Query Solana JSON-RPC.",
  parameters: Type.Object({
    method: Type.String(),
    params: Type.Array(Type.Any()),
  }),
  async execute(_id, p) {
    const r = await fetch(RPC, {
      method: "POST",
      headers: { "content-type": "application/json" },
      body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: p.method, params: p.params }),
    }).then((x) => x.json());
    return { content: [{ type: "text", text: JSON.stringify(r) }], details: {} };
  },
});

Ideas that fit#

  • On-chain tracing — wallets, transfers, token flows.
  • Smart-contract analysis — fetch, decode, and audit deployed bytecode.
  • Security tooling — recon and PoCs against systems you own.

Skills, not just tools#

You can also drop in a skill — a markdown file with frontmatter that gives the agent a reusable operating procedure for a domain. Tools give it new *abilities*; skills give it new *playbooks*.

Packaging#

Bundle your tools and skills as a package and install it the same way the agent itself installs. Point others at your repo and they get the capability with one command.