AI Intelligence Layer (Prometheus)
Prometheus is Nester's AI-powered financial advisor, built on Claude API via a Python/FastAPI service.
Architecture
┌────────────────────────────────────────────────┐
│ Prometheus Service │
│ Python + FastAPI │
│ │
│ ┌──────────────┐ ┌────────────────────────┐ │
│ │ /chat │ │ Claude API │ │
│ │ Conversational│ │ System prompt with │ │
│ │ endpoint │──▶│ portfolio context, │ │
│ │ │ │ market data, user │ │
│ └──────────────┘ │ risk profile │ │
│ └────────────────────────┘ │
│ ┌──────────────┐ ┌────────────────────────┐ │
│ │ /insights │ │ Data Sources │ │
│ │ Auto-gen │ │ DeFiLlama (TVL) │ │
│ │ weekly │ │ CoinGecko (prices) │ │
│ └──────────────┘ │ On-chain analytics │ │
│ │ Social sentiment │ │
│ ┌──────────────┐ └────────────────────────┘ │
│ │ /risk-score │ │
│ │ Portfolio │ │
│ │ analysis │ │
│ └──────────────┘ │
└────────────────────────────────────────────────┘Example Interactions
User: "I want to save $5,000 over the next year without much risk."
Prometheus: "Based on your risk tolerance and timeline, I recommend
the Balanced Vault:
• Expected return: $475 (9.5% APY)
• Risk level: Low-Medium
• Allocation: 40% Blend, 35% Kamino, 25% Aave
• Confidence: 87%
The Conservative Vault would yield ~$350 (7% APY) with lower risk.
The Growth Vault could yield ~$625 (12.5% APY) but with higher
volatility exposure.
[Deposit into Balanced Vault] [Compare Vaults] [Ask more]"Chat API
python
# POST /intelligence/chat
# Request
{
"message": "Should I rebalance my portfolio?",
"wallet_address": "GBXYZ...",
"context": {
"positions": [
{"vault": "balanced", "shares": 1000, "value_usd": 1095},
{"asset": "XLM", "amount": 5000, "value_usd": 750}
],
"total_value_usd": 1845
}
}
# Response
{
"response": "Your portfolio is well-balanced at 59% stablecoins...",
"actions": [
{
"type": "rebalance",
"description": "Sell 10% XLM → Balanced Vault",
"params": {"from": "XLM", "to": "balanced", "amount_pct": 10}
}
],
"confidence": 0.82,
"risk_score": 6.5
}Key Principles
1. AI never executes without user approval — every action requires explicit confirmation
2. Context-aware — responses consider your actual portfolio, not generic advice
3. Transparent reasoning — AI explains why it recommends something
4. One-click execution — approved recommendations trigger real transactions