A Solana on-chain agent registry and reputation system built with Anchor 0.30.
OOBE Protocol provides a decentralized marketplace infrastructure for AI agents. It allows:
- Oracle initialization — A
ReputationOraclePDA that governs reputation updates - Agent registration — Register agents with name, capabilities, pricing tier, and price
- Agent management — Update capabilities, tier, and price
- Reputation tracking — Oracle-authority-only score updates with vote counting
- Soft deactivation — Agents can be deactivated without deleting on-chain state
3GE2ac1UgJpmuXTUGruMXNq9UCjefch8GFrjVuuqGRJS
| Account | Seeds | Description |
|---|---|---|
ReputationOracle |
[b"oracle"] |
Singleton PDA that controls reputation updates |
Agent |
[b"agent", authority, name] |
Per-agent PDA, unique per authority+name |
- Free — No cost to interact
- Premium — Paid access
- Enterprise — Enterprise-tier access
| Instruction | Description |
|---|---|
initialize_oracle |
Create the reputation oracle PDA |
register_agent |
Register a new agent (name, capabilities, tier, price) |
update_agent |
Update an agent's capabilities, tier, or price |
update_reputation |
Add reputation score (oracle authority only) |
deactivate_agent |
Soft-delete an agent |
get_agent |
View agent details (logs to program logs) |
| Code | Name | Description |
|---|---|---|
| 6000 | NameTooLong |
Name must be ≤ 64 characters |
| 6001 | TooManyCapabilities |
Max 10 capabilities |
| 6002 | CapabilityTooLong |
Each capability ≤ 32 characters |
| 6003 | Unauthorized |
Caller is not the account authority |
| 6004 | AgentNotFound |
Agent account does not exist |
| 6005 | AgentAlreadyInactive |
Agent is already deactivated |
oobe-protocol/
├── Anchor.toml
├── Cargo.toml
├── package.json
├── tsconfig.json
├── README.md
├── programs/
│ └── oobe-protocol/
│ └── src/
│ ├── lib.rs # Program entrypoint
│ ├── constants.rs # Program constants
│ ├── error.rs # Custom error definitions
│ ├── state/
│ │ └── mod.rs # Agent, ReputationOracle, PricingTier
│ └── instructions/
│ ├── mod.rs
│ ├── initialize_oracle.rs
│ ├── register_agent.rs
│ ├── update_agent.rs
│ ├── update_reputation.rs
│ ├── deactivate_agent.rs
│ └── get_agent.rs
├── sdk/
│ ├── src/
│ │ └── index.ts # SDK: PDA helpers + instruction wrappers
│ └── types/
│ └── index.ts # TypeScript type definitions
├── target/
│ ├── idl/
│ │ └── oobe_protocol.json # Anchor IDL (hand-written)
│ └── types/
│ └── oobe_protocol.ts # IDL-derived TypeScript types
└── tests/
└── oobe-protocol.ts # Integration test suite
- Rust (stable)
- Solana CLI v1.18+
- Anchor CLI v0.30+
- Node.js v18+
yarn installanchor buildStart a local validator and run tests:
anchor testOr manually:
# Terminal 1: start validator
solana-test-validator
# Terminal 2: run tests
anchor test --skip-local-validatorimport { Program, AnchorProvider } from "@coral-xyz/anchor";
import { PublicKey } from "@solana/web3.js";
import {
PricingTier,
findOraclePda,
findAgentPda,
initializeOracle,
registerAgent,
updateAgent,
updateReputation,
deactivateAgent,
getAgent,
} from "./sdk/src/index";
import { OobeProtocol } from "./target/types/oobe_protocol";
const provider = new AnchorProvider(connection, wallet, {});
const program = new Program<OobeProtocol>(IDL, PROGRAM_ID, provider);await initializeOracle(program, authority);await registerAgent(
program,
authority,
"my-ai-agent",
["code_generation", "review"],
PricingTier.Premium,
new BN(LAMPORTS_PER_SOL / 10) // 0.1 SOL
);await updateAgent(program, authority, "my-ai-agent", {
capabilities: ["code_generation", "review", "deployment"],
tier: PricingTier.Enterprise,
price: new BN(LAMPORTS_PER_SOL),
});await updateReputation(program, oracleAuthority, agentPda, new BN(100));await deactivateAgent(program, authority, "my-ai-agent");const agent = await getAgent(program, authority, "my-ai-agent");
console.log("Reputation:", agent.reputationScore.toString());- Agent name: max 64 characters
- Capabilities per agent: max 10
- Capability length: max 32 characters each
- Only the authority (PDA signer) can update/deactivate their own agents
- Only the oracle authority can update reputation scores
- Agent deactivation is soft — the account remains on-chain with
is_active = false - Deactivating an already-inactive agent fails with
AgentAlreadyInactive
ISC