Skip to content

Commit 96edc45

Browse files
committed
feat: wire Dashboard SSE, functional search, NotFound page, docs, CSS updates
- Dashboard.tsx: hybrid SSE + mock fallback, apiEventToFeedEvent adapter - Layout.tsx: search bar now filters sidebar channels by label/preview - NotFound.tsx: new 404 page component - index.css: additional Tailwind utilities and animations - main.tsx: add NotFound route - docs/api-reference.md: comprehensive API reference - docs/defi-agents.md: DeFi agents documentation - core/tsconfig.json: config fix - vercel.json: cleanup
1 parent e0e919d commit 96edc45

File tree

9 files changed

+1938
-59
lines changed

9 files changed

+1938
-59
lines changed

docs/api-reference.md

Lines changed: 1478 additions & 0 deletions
Large diffs are not rendered by default.

docs/defi-agents.md

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
# DeFi Agents
2+
3+
Catalog of 43 AI agent definitions for DeFi intelligence, built with the PumpKit agent framework.
4+
5+
---
6+
7+
## Overview
8+
9+
The DeFi agents package (`packages/defi-agents/`) provides pre-built AI agent definitions that can be deployed to any compatible platform. Each agent is a JSON file with a system prompt, plugin list, and metadata.
10+
11+
### Agent Categories
12+
13+
| Category | Count | Focus |
14+
|----------|-------|-------|
15+
| Master Agents | 3 | Multi-tool orchestrators |
16+
| Ecosystem Agents | 5+ | Chain-specific analysis |
17+
| Portfolio Agents | 5+ | Asset management & tracking |
18+
| General DeFi Agents | 10+ | Yields, swaps, staking |
19+
| Security Agents | 5+ | Auditing & threat detection |
20+
| Crypto News Agents | 3+ | News & regulatory monitoring |
21+
22+
---
23+
24+
## Agent Structure
25+
26+
Each agent definition includes:
27+
28+
```json
29+
{
30+
"id": "agent-id",
31+
"name": "Agent Display Name",
32+
"avatar": "🤖",
33+
"description": "What this agent does",
34+
"systemPrompt": "You are an AI assistant specializing in...",
35+
"plugins": ["pump-fun-sdk", "coingecko"],
36+
"category": "defi",
37+
"createdAt": "2026-03-06T00:00:00Z"
38+
}
39+
```
40+
41+
---
42+
43+
## Master Agents (3)
44+
45+
| Agent | Description | Plugins |
46+
|-------|-------------|---------|
47+
| DeFi Master | Orchestrates all DeFi operations | All plugins |
48+
| Solana Master | Solana-specific operations | pump-fun-sdk, dexscreener |
49+
| Security Master | Full security audit suite | contract-scanner, phishing-detector |
50+
51+
## Ecosystem Agents (5+)
52+
53+
| Agent | Focus | Key Plugin |
54+
|-------|-------|------------|
55+
| Solana Analyst | Solana ecosystem analysis | pump-fun-sdk |
56+
| Ethereum Analyst | ETH DeFi protocols | defillama, thegraph |
57+
| Multi-Chain Monitor | Cross-chain tracking | defillama |
58+
| DEX Tracker | DEX activity monitoring | dexscreener |
59+
| Token Launcher | Token launch workflows | pump-fun-sdk |
60+
61+
## Portfolio Agents (5+)
62+
63+
| Agent | Capability | Plugins |
64+
|-------|-----------|---------|
65+
| Portfolio Tracker | Balance & PnL tracking | coingecko, defillama |
66+
| Yield Optimizer | Best yield discovery | beefy, defillama |
67+
| Risk Analyzer | Portfolio risk assessment | coingecko |
68+
| Tax Reporter | Transaction tax reporting | coingecko |
69+
| Rebalancer | Portfolio rebalancing | oneinch, coingecko |
70+
71+
## General DeFi Agents (10+)
72+
73+
| Agent | Focus | Key Plugin |
74+
|-------|-------|------------|
75+
| Swap Router | Best swap routes | oneinch |
76+
| Yield Farmer | Yield opportunities | beefy, defillama |
77+
| Staking Guide | Staking comparisons | lido |
78+
| Price Oracle | Price feeds | coingecko |
79+
| Liquidity Provider | LP management | dexscreener |
80+
81+
## Security Agents (5+)
82+
83+
| Agent | Specialization | Key Plugin |
84+
|-------|---------------|------------|
85+
| Contract Scanner | Smart contract analysis | contract-scanner |
86+
| Phishing Detector | URL/contract threat check | phishing-detector |
87+
| Address Labeler | Known address identification | address-labels |
88+
| Grant Finder | Matching users to grant programs | grants-finder |
89+
| Security Auditor | Contract safety evaluation | contract-scanner, phishing-detector |
90+
| Validator Guide | Staking provider comparison | lido |
91+
92+
## Crypto News Agents (3+)
93+
94+
| Agent | Focus |
95+
|-------|-------|
96+
| News Aggregator | Multi-source crypto news compilation |
97+
| Market Reporter | Daily/weekly market summaries |
98+
| Regulatory Monitor | Regulatory updates and compliance news |
99+
100+
---
101+
102+
## Creating a New Agent
103+
104+
### 1. Create the Agent Definition
105+
106+
```bash
107+
# Create the agent JSON
108+
cat > packages/defi-agents/src/my-agent.json << 'EOF'
109+
{
110+
"id": "my-agent",
111+
"name": "My Custom Agent",
112+
"avatar": "🤖",
113+
"description": "Describe what this agent does",
114+
"systemPrompt": "You are an AI assistant specializing in...",
115+
"plugins": ["pump-fun-sdk", "coingecko"],
116+
"category": "defi",
117+
"createdAt": "2026-03-06T00:00:00Z"
118+
}
119+
EOF
120+
```
121+
122+
### 2. Create the Locale File (Required)
123+
124+
```bash
125+
cat > packages/defi-agents/locales/my-agent.en-US.json << 'EOF'
126+
{
127+
"name": "My Custom Agent",
128+
"description": "Describe what this agent does",
129+
"systemPrompt": "You are an AI assistant specializing in..."
130+
}
131+
EOF
132+
```
133+
134+
> ⚠️ **Required:** The build fails without a locale file for each agent.
135+
136+
### 3. Generate Translations
137+
138+
```bash
139+
cd packages/defi-agents
140+
bun run format # Uses OpenAI to generate 18 language translations
141+
```
142+
143+
### 4. Build and Deploy
144+
145+
```bash
146+
bun run build # Builds index.json and per-agent files
147+
# Deployment: push to main → GitHub Actions auto-deploys to GitHub Pages
148+
```
149+
150+
---
151+
152+
## Plugin Reference
153+
154+
Agents reference plugins by ID. These map to API endpoints in `packages/plugin.delivery/`:
155+
156+
| Plugin ID | Endpoints | Status | API Base |
157+
|-----------|-----------|--------|----------|
158+
| `pump-fun-sdk` | bonding-curve, market-cap, price-quote, fee-sharing, fee-tier, token-incentives || `/api/pump-fun-sdk/` |
159+
| `coingecko` | price, trending || `/api/coingecko/` |
160+
| `defillama` | protocols, protocol, chains, yields, stablecoins || `/api/defillama/` |
161+
| `dexscreener` | pair, search, trending, new-listings || `/api/dexscreener/` |
162+
| `beefy` | vaults || `/api/beefy/` |
163+
| `lido` | stats || `/api/lido/` |
164+
| `oneinch` | quote || `/api/oneinch/` |
165+
| `thegraph` | query, subgraphs, network-stats || `/api/thegraph/` |
166+
| `address-labels` | get-label, search-entity | 🚧 | `/api/address-labels/` |
167+
| `contract-scanner` | scan-token, check-honeypot | 🚧 | `/api/contract-scanner/` |
168+
| `phishing-detector` | check-url, check-contract | 🚧 | `/api/phishing-detector/` |
169+
| `grants-finder` | get-active-grants, search-grants | 🚧 | `/api/grants-finder/` |
170+
| `gas-estimator` | estimate-gas, simulate-transaction | 🚧 | `/api/gas-estimator/` |
171+
172+
---
173+
174+
## Testing Agents
175+
176+
### Verify Agent Structure
177+
178+
```bash
179+
# Validate all agent JSONs
180+
cd packages/defi-agents
181+
node -e "
182+
const fs = require('fs');
183+
const agents = fs.readdirSync('src').filter(f => f.endsWith('.json'));
184+
agents.forEach(f => {
185+
const agent = JSON.parse(fs.readFileSync('src/' + f, 'utf8'));
186+
const required = ['id', 'name', 'description', 'systemPrompt', 'plugins'];
187+
const missing = required.filter(k => !agent[k]);
188+
if (missing.length) console.error(f + ': missing ' + missing.join(', '));
189+
else console.log('✅ ' + f);
190+
});
191+
"
192+
```
193+
194+
---
195+
196+
## Best Practices
197+
198+
1. **System prompts should be specific** — Tell the agent exactly what it can and cannot do
199+
2. **List only plugins the agent needs** — Don't give every agent access to every plugin
200+
3. **Include examples in system prompts** — Show the agent what good responses look like
201+
4. **Test with edge cases** — What happens when data is unavailable? When the user asks something off-topic?
202+
5. **Keep descriptions concise** — Users see descriptions in the marketplace; they should understand the agent's purpose in one line
203+
6. **Use appropriate avatars** — Emoji that match the agent's function (📊 for analytics, 🔒 for security, etc.)
204+
205+
---
206+
207+
## Related
208+
209+
- [Tutorial 25: DeFi Agents Integration](../tutorials/25-defi-agents-integration.md) — Building with the agent framework
210+
- [Architecture](./architecture.md) — System design overview
211+
- [API Reference](./api-reference.md) — SDK method catalog

packages/core/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"outDir": "dist",
55
"rootDir": "src"
66
},
7-
"include": ["src", "vitest.config.ts"]
7+
"include": ["src"]
88
}

0 commit comments

Comments
 (0)