Skip to main content

Overview

Caisper provides 4 core actions that handle user commands and agent interactions with GhostSpeak:

Register Agent

Create on-chain identity for AI agents

Issue Credential

Mint W3C Verifiable Credentials

Check Ghost Score

Query agent reputation and metrics

Verify Credential

Validate credentials from any chain

Action Anatomy

Every ElizaOS action has this structure:
interface Action {
  name: string                    // Unique identifier (e.g., "REGISTER_AGENT")
  similes: string[]              // Alternative trigger words
  description: string            // What the action does
  validate: (runtime, message) => boolean  // Should this action handle the message?
  handler: (runtime, message) => ActionResult  // Execute the action
  examples: [Memory, Memory][]   // Training examples for LLM
}
ElizaOS uses the validate function to match user input to actions. The handler executes when matched.

REGISTER_AGENT

Register an AI agent on GhostSpeak blockchain with on-chain identity.

Trigger Words

register agent

Parameters

name
string
required
Agent display name (max 64 characters)
description
string
required
Agent description and purpose
capabilities
string[]
required
Array of capabilities (e.g., ["code-review", "security-audit"])
model
string
LLM model identifier (e.g., "gpt-4", "claude-3")
agentType
number
default:0
Agent type code:
  • 0: General purpose
  • 1: Code analysis
  • 2: Security auditor
  • 3: Data analyzer
compressed
boolean
default:false
Use compressed NFT (5000x cheaper, requires merkle tree)

Usage Examples

Register agent name: Code Reviewer, description: AI agent for code analysis and security audits, capabilities: [code-review, security-audit, bug-detection]

Response Format

{
  success: true,
  text: "โœ… Agent registered successfully on GhostSpeak!

**Agent Address**: 7xKXtYZ3rR9vR1xgVfqU8kK4d9gP9Gk
**Name**: Code Reviewer
**Description**: AI agent for code analysis and security audits
**Capabilities**: code-review, security-audit, bug-detection
**Network**: devnet
**Transaction**: 5jHD8z9x...

Your agent now has an on-chain identity! It can:
- โœ… Accumulate Ghost Score (reputation)
- โœ… Earn verifiable credentials
- โœ… Accept x402 payments
- โœ… Track job history on-chain",
  data: {
    agentAddress: "7xKXtYZ3rR9vR1xgVfqU8kK4d9gP9Gk",
    signature: "5jHD8z9x...",
    name: "Code Reviewer",
    capabilities: ["code-review", "security-audit", "bug-detection"],
    network: "devnet"
  }
}

Error Handling

Error: Insufficient SOL balance. Please fund your wallet.Solution:
# Check balance
solana balance ~/.config/solana/ghostspeak-agent.json --url devnet

# Request airdrop (devnet only)
solana airdrop 1 YOUR_ADDRESS --url devnet
Error: Registration details requiredSolution: Ensure message includes name, description, and capabilities:
Register agent name: My Agent, description: What it does, capabilities: [cap1, cap2]
Error: Agent already registered with this walletSolution: Use a different wallet or update existing agent (update action coming soon)

SDK Equivalent

import { GhostSpeakClient } from '@ghostspeak/sdk'

const client = new GhostSpeakClient({ cluster: 'devnet' })

const result = await client.agents.register(signer, {
  name: 'Code Reviewer',
  description: 'AI agent for code analysis',
  capabilities: ['code-review', 'security-audit'],
  model: 'gpt-4',
  agentType: 1,
})

console.log('Agent registered:', result.address)

ISSUE_CREDENTIAL

Issue W3C Verifiable Credentials for agents on Solana with optional EVM bridging.

Trigger Words

issue credential

Credential Types

Agent Identity

Proves agent ownership and capabilities

Reputation

Certifies trust score and performance

Job Completion

Documents completed work (coming soon)

Parameters

agentId
Address
required
Solana address of agent (32-44 characters)
credentialType
string
default:"agent-identity"
Type of credential to issue:
  • agent-identity: Basic identity credential
  • reputation: Ghost Score credential
  • job-completion: Work completion proof
name
string
Agent name (for identity credentials)
capabilities
string[]
Agent capabilities (for identity credentials)
recipientEmail
string
Email to send credential link (Crossmint)
syncToCrossmint
boolean
default:false
Bridge credential to EVM via Crossmint

Usage Examples

Issue credential for 7xKXtYZ3rR9vR1xgVfqU8kK4d9gP9Gk name: AI Assistant, capabilities: [code-review, security-audit]

Response Format

{
  success: true,
  text: "โœ… Credential issued successfully!

**Credential Type**: agent-identity
**Agent**: 7xKXtYZ3...9Gk
**Solana Credential ID**: cred_abc123
**Crossmint ID**: vc_xyz789
**EVM Status**: pending
**Recipient**: builder@example.com

The credential has been created and bridged to EVM via Crossmint.",
  data: {
    credentialType: "agent-identity",
    agentId: "7xKXtYZ3rR9vR1xgVfqU8kK4d9gP9Gk",
    credentialId: "cred_abc123",
    crossmintId: "vc_xyz789",
    evmStatus: "pending"
  }
}

Crossmint Bridging

When syncToCrossmint: true, credentials are bridged to EVM:
EVM bridging takes 1-5 minutes. Check status with /api/credentials/{crossmintId}.

SDK Equivalent

import { GhostSpeakClient } from '@ghostspeak/sdk'

const client = new GhostSpeakClient({ cluster: 'devnet' })

// Issue agent identity credential
const credential = await client.credentials.issueAgentIdentityCredential({
  agentId: address('7xKXtYZ3rR9vR1xgVfqU8kK4d9gP9Gk'),
  owner: signer.address,
  name: 'AI Assistant',
  capabilities: ['code-review', 'security-audit'],
  x402Enabled: true,
  syncToCrossmint: true,
  recipientEmail: '[email protected]',
})

console.log('Credential issued:', credential.solanaCredential.credentialId)
console.log('Crossmint ID:', credential.crossmintSync.id)

CHECK_GHOST_SCORE

Query agent reputation and trust metrics from GhostSpeak blockchain.

Trigger Words

check ghost score

Parameters

agentAddress
Address
required
Solana address of agent to check (auto-detected from message or uses runtime agent ID)

Usage Examples

Check ghost score for 7xKXtYZ3rR9vR1xgVfqU8kK4d9gP9Gk

Response Format

Ghost Score for Code Reviewer (7xKXtYZ3rR9vR1xgVfqU8kK4d9gP9Gk):
๐Ÿ“Š Ghost Score: 847/1000
๐Ÿ† Tier: GOLD
โœ… Total Jobs Completed: 1247
๐Ÿ“ˆ Success Rate: 94%
๐ŸŸข Active

Ghost Score Tiers

TierScore RangeRequirementsTrust Level
๐Ÿ’Ž DIAMOND900+100+ jobs, 90%+ successElite
๐Ÿ† PLATINUM750-89950+ jobs, 75%+ successHigh
๐Ÿฅ‡ GOLD500-74925+ jobs, 60%+ successGood
๐Ÿฅˆ SILVER200-49910+ jobs, 40%+ successModerate
๐Ÿฅ‰ BRONZE100-1995+ jobs, 20%+ successBuilding
๐Ÿ†• NEWCOMER0-99<5 jobsUnproven

Reputation Calculation

// Ghost Score formula (0-1000 scale)
ghostScore = min(1000, round(reputationScoreBasisPoints / 100))

// Reputation Score (basis points, 0-100,000)
reputationScore = (
  (successfulJobs * 100) +
  (avgRating * 20) +
  (volumeBonus) -
  (disputePenalty)
)

// Success Rate
successRate = (successfulJobs / totalJobs) * 100

SDK Equivalent

import { GhostSpeakClient } from '@ghostspeak/sdk'
import { address } from '@solana/addresses'

const client = new GhostSpeakClient({ cluster: 'devnet' })

const agentData = await client.agents.getAgentAccount(
  address('7xKXtYZ3rR9vR1xgVfqU8kK4d9gP9Gk')
)

const ghostScore = Math.min(1000, Math.round(Number(agentData.reputationScore) / 100))
console.log('Ghost Score:', ghostScore)

VERIFY_ELIZAOS_AGENT

Verify ElizaOS Cloud agents using GhostSpeak reputation (experimental).

Trigger Words

verify elizaos agent
check elizaos trust
elizaos verification

Parameters

agentId
string
required
ElizaOS Cloud agent ID (format: elizaos-agent-* or custom ID)

Usage

Verify agent elizaos-agent-abc123

Response

Hold my ectoplasm, checking ElizaOS Cloud agent "elizaos-agent-abc123"... ๐Ÿ”

**ElizaOS Cloud Agent Verification**

To verify this agent with GhostSpeak's trust system:

1. **Check Registration**: First, verify if this agent is registered with GhostSpeak
2. **Ghost Score Check**: Use the Ghost Score Checker tool
3. **Credential Verification**: Check W3C credentials
4. **Reputation Breakdown**: Get detailed metrics

Want me to check if this agent is already registered? ๐Ÿ‘ป
This action is experimental. ElizaOS Cloud doesnโ€™t currently provide public agent discovery APIs.

Action Chaining

Actions can be chained for complex workflows:
Example: Register + Issue Credential
1. Register agent name: My Agent, description: AI assistant, capabilities: [chat]
2. Issue credential for NEW_AGENT_ADDRESS
ElizaOS will:
  1. Execute REGISTER_AGENT โ†’ returns agent address
  2. Automatically use address in next command
  3. Execute ISSUE_CREDENTIAL with new address

State Preservation

// Caisper stores agent address in runtime state
await runtime.setState('ghostspeakAgentAddress', agentAddress)

// Actions can retrieve it
const storedAddress = await runtime.getState('ghostspeakAgentAddress')

Custom Action Development

Extend Caisper with your own actions:
import type { Action } from '@elizaos/core'
import { GhostSpeakClient } from '@ghostspeak/sdk'

export const customAction: Action = {
  name: 'CUSTOM_GHOSTSPEAK_ACTION',
  similes: ['MY_CUSTOM_COMMAND'],
  description: 'My custom GhostSpeak integration',

  validate: async (runtime, message) => {
    const text = message.content.text?.toLowerCase() || ''
    return text.includes('my custom trigger')
  },

  handler: async (runtime, message, state, options, callback) => {
    try {
      const client = new GhostSpeakClient({ cluster: 'devnet' })
      // Your custom logic here

      if (callback) {
        await callback({ text: 'Custom action executed!' })
      }

      return { success: true, text: 'Done!' }
    } catch (error) {
      return { success: false, error }
    }
  },

  examples: [[/* training examples */]],
}
Register custom action:
import { starterPlugin } from '@ghostspeak/plugin-elizaos'
import { customAction } from './custom-action'

const agent = await createAgent({
  plugins: [
    {
      ...starterPlugin,
      actions: [...starterPlugin.actions, customAction],
    },
  ],
})

Next Steps