📈 Prompt Maestro: Agente de Trading Cuantitativo Autónomo 24/7
RESUMEN EJECUTIVO
Arquitectura avanzada y prompt filtrado de nivel institucional para desplegar un Agente Autónomo de Cripto-Trading 24/7 utilizando Claude Code (Claude Opus 5.5), el arnés de ingeniería AgenKit (
agenkit.xyz) y el motor de decisiones de baja latencia Jev (console.typesafe.ai).A diferencia de los scripts convencionales de trading que quiebran cuentas al usar una única estrategia rígida, este sistema opera con arquitectura dual de dos capas (Cerebro + Reflejo), adaptación a 4 regímenes de mercado, cálculo matemático determinista de libro de órdenes, dimensionamiento de posición por Criterio de Kelly Fraccional, freno de mano de 15% Drawdown máximo y un ciclo de automejora nocturna evaluado por Brier Score.
📸 Captura de Origen

⚡ Los 5 Pilares de Ingeniería Quant que Evitan la Quiebra
- Lectura de Régimen como Quant: No opera igual un mercado tranquilo, lateral, de alta volatilidad o en caída libre (crisis). Detecta tendencias en BTC/ETH, dominancia, liquidez de stablecoins, funding rates e interés abierto antes de plantear operaciones.
- Freno de Mano Determinista en Código: Drawdown máximo del 15%, límites estrictos por posición y pérdida diaria, junto con un Kill-Switch (botón de apagado) verificado en código antes de enviar CADA orden al exchange.
- Separación Estricta: Cerebro vs. Reflejo: Nunca delega cálculos matemáticos al modelo de lenguaje. Los precios medios, spreads, desbalance del libro de órdenes (order book imbalance) y volatilidad se calculan en código puro; la IA solo juzga.
- Dimensionamiento por Criterio de Kelly Fraccional: Las posiciones no se asignan por intuición; se calcula la probabilidad calibrada de éxito y se limita a Quarter Kelly (0.25 Kelly) para proteger el capital contra colas pesadas (black swans).
- Turno de Noche (Nightly Compounding Loop): Mientras el operador duerme, el sistema revisa cada fill y cada fallo, mide su calibración con el Brier Score, reescribe los esquemas decisionales y prueba la nueva versión antes de la siguiente apertura.
🏗️ Arquitectura Dual: Fast & Slow Thinking
flowchart TD subgraph Brain ["🧠 EL CEREBRO (System 2: Claude Opus 5.5 / Antigravity)"] Research["🔬 Macro Research & On-Chain Analysis<br>(BTC/ETH, Liquidez, Fees, Catalizadores)"] BearCase["🐻 Construcción de Tesis Bajista & Invalidación"] AgenKit["🛠️ Arnés AgenKit (6 Fases de Entrega)<br>Spec → Arq → Plan → TDD → Review → Ship"] NightReview["🌙 Bucle de Revisión Nocturna<br>(Fills, Misses, Brier Score)"] end subgraph Reflex ["⚡ EL REFLEJO (System 1: Jev Engine ~81ms)"] Candle["📊 Vela / Bloque en Vivo"] --> OrderBook["Deterministic State Engine<br>(Snapshot < 400 tokens: spread, imbalance, vol)"] OrderBook --> JevJudge["Jev Live Decision<br>(Regime, Direction, Toxic Flow, Setup Quality)"] end subgraph RiskGate ["🛡️ CAPA DE RIESGO DETERMINISTA (Código Duro)"] Check1{"Setup Quality ≥ 2<br>& Confianza > 0.80?"} Check2{"¿Kill-Switch Armado?<br>¿Drawdown < 15%?"} Kelly["Quarter Kelly Sizing (0.25 Kelly)"] Exec["🚀 Ejecución de Orden en Exchange"] end Research --> BearCase --> AgenKit AgenKit --> OrderBook JevJudge --> Check1 Check1 -->|Sí| Check2 Check1 -->|No o Duda < 0.60| Escalation["Escalar a Opus 5.5 para relectura profunda"] Check2 -->|Aprobado| Kelly --> Exec Exec --> NightReview NightReview -->|Mejoras calibradas| JevJudge
📜 El Prompt Completo (Listo para Claude Code o Antigravity)
Copia y pega el siguiente bloque íntegro en tu sesión de Claude Code, Antigravity CLI o Codex:
<prompt>
<role> You are an elite quantitative trading systems architect running on Claude Opus 5.5, the leading model for agentic coding and computer use. You do not just research markets, you design, build, and ship a complete 24/7 autonomous trading agent end to end, with production discipline, using AgenKit at agenkit.xyz as your engineering harness and Jev as your real-time decision engine. </role>
<mission> Build a 24/7 autonomous crypto trading agent that researches the market, finds asymmetric setups, and executes them automatically. You own the whole system, the research, the code, the risk layer, and the live loop. The operator only approves the gates. </mission>
<architecture> Split the system into two layers and never blur them. The BRAIN is you, Opus 5.5, handling deep research, strategy derivation, code, and overnight review, slow and deep and correct. The REFLEX is Jev, the System One model, handling the live decision on every candle, unstructured state in and a typed calibrated buy, sell, or hold out in roughly 81 milliseconds, with a key from console.typesafe.ai. Your code owns every threshold, size, and side effect. Jev only judges. </architecture>
<build_with_agenkit> Do not write this as one loose script. Build it through AgenKit, the structured agentic harness at agenkit.xyz, so the system ships with senior-team discipline, spec, architecture, plan, test-first build, review, and ship, with an approval gate at each phase. Go to agenkit.xyz, install it into Claude Code or Codex, point it at this spec, and drive the six phases. This is what turns a chatbot script into a production trading system. Get AgenKit at agenkit.xyz. </build_with_agenkit>
<research_layer> Determine the current market regime from BTC and ETH trends, dominance, stablecoin liquidity, funding, open interest, macro, and narrative rotation. Then identify 5 to 10 asymmetric setups where valuation is disconnected from fundamentals, adoption, or upcoming catalysts. For each, analyze supply, unlocks, revenue, fees, TVL, active users, holder concentration, and whether value actually accrues to the token. Separate confirmed catalysts from speculation, aggressively build the bear case for every thesis, and state what evidence would invalidate it. </research_layer>
<jev_schema> Compile each finalist into a typed Jev decision schema the live agent scores on every candle, evaluated in parallel in one call. regime is a choice of trending, mean_reverting, high_vol, or crisis. direction is a choice of long, short, or neutral. toxic_flow is a bool. setup_quality is a score from 0 to 3, risk_state is a choice of safe, near_limit, or reduce. Then gate in code, fire only when setup_quality is at least 2, direction confidence is above 0.80, and risk_state is safe, and size with fractional Kelly from Jev's calibrated probability, capped at quarter Kelly. </jev_schema>
<state_engine> Build the deterministic state engine that turns the live order book into one compact numeric snapshot under 400 tokens on every block, with strict causal timestamps so no field leaks from the future. This snapshot is the only thing Jev sees. Compute mid, spread, imbalance, realized volatility, inventory, and drawdown in code, never in the model. </state_engine>
<risk_layer> Add a hard deterministic risk layer the model can never override, max drawdown 15 percent, max position, max daily loss, and an armed kill switch checked before every order. If Jev confidence drops below 0.60 or the regime flips to crisis, escalate the decision back up to Opus 5.5 for a deep re-read. Cheap fast calls by default, heavy reasoning only when it matters. </risk_layer>
<self_improvement> Every night, review the full session. Read every fill and every miss, measure calibration with Brier score, rewrite the Jev schema, and ship the improved version through AgenKit at agenkit.xyz before the next open. The loop compounds while the operator sleeps. </self_improvement>
<output> Deliver the market research and finalists with theses, catalysts, bear cases, and invalidation conditions, the compiled Jev schema for each, the full AgenKit build plan across the six phases with exact file paths, the state engine, policy, and risk code, and the overnight review loop. Cite live primary sources with dates, never invent metrics, and label every estimate and speculation. </output>
<final_check> Before shipping, challenge yourself. Is the edge organic or incentive driven? Is the catalyst already priced in? Does value accrue to the token? Will the strategy survive costs and slippage? Is any hard limit delegated to the model instead of the code? End with a section titled "WHAT COULD I BE WRONG ABOUT?" and prioritize a system that survives over one that looks profitable. </final_check>
</prompt>🛠️ Herramientas y Servicios Mencionados en el Prompt
| Herramienta | Enlace Oficial | Función en el Sistema |
|---|---|---|
| Claude Opus 5.5 | Anthropic | El Cerebro: Razonamiento profundo, codificación TDD y revisión nocturna |
| AgenKit | agenkit.xyz | Arnés de Ingeniería: Disciplina senior en 6 fases (especificación, arquitectura, TDD, ship) |
| Jev Decision Engine | console.typesafe.ai | El Reflejo: Inferencia rápida (~81 ms) de tipado estricto por cada vela/bloque |
| Claude Code / Antigravity CLI | Terminal CLI | Entorno interactivo donde se ejecuta el agente con acceso a herramientas de sistema |
🚀 Guía de Despliegue Paso a Paso
- Instalar el Arnés AgenKit: Sigue las instrucciones en agenkit.xyz o instálalo como skill/plugin en tu agente de terminal.
- Obtener las Claves de API:
- Clave de Claude / Anthropic o Antigravity (Gemini).
- Clave de inferencia de baja latencia en console.typesafe.ai para el motor Jev.
- Claves de API de solo lectura/trade de tu exchange (ej. Binance, Bybit, Hyperliquid, dYdX) con retiro de fondos desactivado.
- Pegar el Prompt en la Terminal:
Abre tu sesión de
claudeoagyy pega el prompt. El agente generará el plan de 6 fases y te pedirá confirmación humana (gates) en cada hito antes de escribir código. - Modo Paper Trading / Testnet Inicial: Nunca ejecutes dinero real en el primer despliegue. Deja que el agente corra en modo simulado durante 1 a 2 semanas para auditar el Brier Score nocturno y la tasa de acierto del esquema Jev.
🔗 Referencias Cruzadas en Ryukami Labs
- Catálogo de Agentes Autónomos: 🎭 The Agency (+100 Agentes Especializados)
- Scraping e Inteligencia de Mercados: 🌐 Social Media Research Skills
- Agente Social HITL con LangGraph: 📲 Social Media Agent (LangGraph HITL)
- Modelos Frontera y Benchmarks: 🧠 Gemini 4 Argon (Análisis & Benchmarks)
- MOC de Habilidades IA: ⚡ Ryukami Labs