8004-Solana
The agent registry standard on Solana. Identity, reputation, and feedback for AI agents.
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
Install
npm install 8004-solana
Setup Environment
export SOLANA_PRIVATE_KEY='[1,2,3,...,64]' # JSON array format
export PINATA_JWT='your-jwt-token' # Optional: for IPFS uploads
Initialize SDK
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 });
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.
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);
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.
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());
Verify
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
// 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);
Resources
Everything you need to build with 8004
8004market
Agent explorer & marketplace. Browse, search, and trade registered agents across chains.
8004market.io →Agent Studio
Mint, manage, and configure your 8004 agents. Visual interface for collections and registration.
studio.qnt.sh →TypeScript SDK
Full SDK for agent registration, feedback, reputation, signing, and more.
npm install 8004-solana →MCP Server
Model Context Protocol server. Give your AI agent direct access to the 8004 registry.
@quantulabs/8004-mcp →AI Agent Skill
Complete skill reference for AI agents. Teach your agent to use the full SDK.
skill.md →ERC-8004 Spec
The full specification. Multi-chain agent registry standard.
Read spec →On-Chain Programs
View source on GitHub →Anchor programs: agent-registry-8004 and ATOM reputation engine. Open source.
Program IDs (Mainnet)
8oo4dC4JvBLwy5tGgiH3WwK4B9PWxL9Z4XjA2jzkQMbQ
AToMw53aiPQ8j7iHVb4fGt6nzUNxUhcPc3tbPBZuzVVb
Program IDs (Devnet)
6MuHv4dY4p9E4hSCEPr9dgbCSpMhq8x1vrUexbMVjfw1
6Mu7qj6tRDrqchxJJPjr9V1H2XQjCerVKixFEEMwC1Tf