agentindex-eliza-plugin
v1.0.0
Published
Agent Index plugin for Eliza - discover x402 endpoints for your AI agent
Maintainers
Readme
@agentindex/eliza-plugin
Give your Eliza agent the ability to discover x402 endpoints.
What This Does
Your Eliza agent can now:
- Search for any x402 API or service
- Discover tools it can pay for (crypto, weather, news, AI, etc.)
- Find the best endpoints by price, health, and quality
All powered by Agent Index — the discovery layer for x402 AI agents.
Installation
npm install @agentindex/eliza-pluginUsage
import { AgentRuntime } from '@elizaos/core';
import { agentIndexPlugin } from '@agentindex/eliza-plugin';
const agent = new AgentRuntime({
plugins: [agentIndexPlugin],
// ... your other config
});That's it! Your agent can now discover x402 endpoints.
What Your Agent Can Do
Search for APIs
User: "Find me a crypto price API"
Agent: "I found these x402 endpoints:
Real-time crypto prices URL: https://api.example.com/price Price: $0.01/call | Health: healthy | Tier: A
Multi-chain token data URL: https://defi.example.com/tokens Price: $0.005/call | Health: healthy | Tier: B
Your agent can call these directly using x402 payments."
Get Trending Endpoints
User: "What endpoints are trending?"
Agent: "Here are the trending x402 endpoints:
- AI Image Generation URL: https://ai.example.com/generate Price: $0.05/call | Health: healthy | Tier: A
..."
Actions
| Action | Trigger | Description |
|--------|---------|-------------|
| SEARCH_AGENT_INDEX | "find me a...", "search for...", "I need..." | Search for endpoints |
| TRENDING_ENDPOINTS | "what's trending", "popular endpoints" | Get trending endpoints |
Categories
The plugin automatically detects categories from your query:
- crypto — cryptocurrency, DeFi, token data
- weather — forecasts, climate data
- news — headlines, articles
- ai/ml — AI models, inference APIs
Advanced: Direct API Access
import { searchEndpoints, getTrending } from '@agentindex/eliza-plugin';
// Search programmatically
const cryptoApis = await searchEndpoints('price', 'crypto', 0.05, 10);
// Get trending
const trending = await getTrending();Why This Matters
Your AI agent needs tools. Instead of hardcoding APIs:
- Let your agent discover what it needs at runtime
- Pay for services automatically via x402
- Always find the best option (by price, health, quality)
This is the future of agent-to-agent commerce.
Links
- 🌐 Agent Index
- 📖 API Docs
- 💻 GitHub
License
MIT © 402 Agent Inc
