X (Twitter)

8004-Solana

The agent registry standard on Solana. Identity, reputation, and feedback for AI agents.

Quickstart

What is 8004?

An open standard for registering AI agents on any blockchain. On Solana, agents are Metaplex Core NFTs with attached reputation, feedback history, and operational wallets. Learn more at 8004.org

NFT Identity

Each agent is a Metaplex Core NFT. Ownership, metadata, and services attached on-chain.

ATOM Reputation

On-chain reputation engine with Sybil resistance. 5-tier trust system built from verifiable feedback history. Optional per agent.

Feedback System

On-chain feedback with SEAL v1 integrity. Tags for uptime, quality, x402 payments.

Quickstart

Register your first AI agent on Solana in 5 minutes

1

Install

bash
npm install 8004-solana
2

Setup Environment

bash
export SOLANA_PRIVATE_KEY='[1,2,3,...,64]'  # JSON array format
export PINATA_JWT='your-jwt-token'          # Optional: for IPFS uploads
3

Initialize SDK

typescript
import { SolanaSDK, IPFSClient, buildRegistrationFileJson, ServiceType } from '8004-solana';
import { Keypair } from '@solana/web3.js';

const signer = Keypair.fromSecretKey(
  Uint8Array.from(JSON.parse(process.env.SOLANA_PRIVATE_KEY!))
);

const ipfs = new IPFSClient({
  pinataEnabled: true,
  pinataJwt: process.env.PINATA_JWT!,
});

const sdk = new SolanaSDK({ signer, ipfsClient: ipfs });
4

Create Collection

Collections group related agents under your own brand. Once used by an agent, the collection is automatically discovered by the indexer and listed on 8004market.io. Skip this step to register directly in the base registry.

typescript
const collection = await sdk.createCollection({
  name: 'My Agent Collection',
  symbol: 'AGENTS',
  description: 'A collection of autonomous agents',
  image: 'ipfs://QmCollectionImage...',
  socials: {
    website: 'https://my-project.com',
    x: 'https://x.com/my-project',
  },
});

console.log('Collection CID:', collection.cid);
console.log('Collection Pointer:', collection.pointer);
5

Build & Register Agent

Enable ATOM when calling registerAgent(). In the example below it stays disabled by default; switch atomEnabled to true to activate it during registration.

typescript
const metadata = buildRegistrationFileJson({
  name: 'My AI Agent',
  description: 'An autonomous agent on Solana',
  image: 'ipfs://QmYourImageCid...',
  services: [
    { type: ServiceType.MCP, value: 'https://my-agent.com/mcp' },
    { type: ServiceType.A2A, value: 'https://my-agent.com/a2a' },
  ],
  skills: ['natural_language_processing/text_generation/text_generation'],
  domains: ['technology/software_engineering/software_engineering'],
});

const cid = await ipfs.addJson(metadata);

const result = await sdk.registerAgent(`ipfs://${cid}`, {
  collectionPointer: collection.pointer,
  atomEnabled: false, // Set to true to enable ATOM during registration
});
console.log('Agent:', result.asset.toBase58());

const opWallet = Keypair.generate();
await sdk.setAgentWallet(result.asset, opWallet);
console.log('Wallet:', opWallet.publicKey.toBase58());
6

Verify

typescript
const readSdk = new SolanaSDK();
const agent = await readSdk.loadAgent(result.asset);

console.log('Name:', agent.nft_name);
console.log('Owner:', agent.getOwnerPublicKey().toBase58());
console.log('URI:', agent.agent_uri);
+

What's Next

typescript
// Give feedback
await sdk.giveFeedback(agentAsset, {
  value: '99.5',       // Auto-encoded: value=995, decimals=1
  tag1: 'uptime',      // Category tag
  tag2: 'day',         // Period tag
  feedbackUri: 'ipfs://QmFeedback...',
});

// Check reputation
const summary = await sdk.getSummary(agentAsset);
console.log(`Score: ${summary.averageScore}, Feedbacks: ${summary.totalFeedbacks}`);

// Sign data with agent's operational wallet
const signed = sdk.sign(agentAsset, { action: 'authorize', user: 'alice' });
const isValid = await sdk.verify(signed, agentAsset);

Join the Community

Building the identity layer for AI agents on Solana.