Purpose: Efficient Strategic Context Setting
The primary goal of using CAG within Neko is to rapidly equip agents with core strategic context without the latency associated with real-time database lookups for this specific type of information. This allows agents to quickly ground their decision-making processes in established best practices and learned heuristics relevant to their assigned tasks (e.g., managing an Earn strategy).Mechanism: The CAG Database (KV Cache)
Neko utilizes a specialized CAG Database, likely implemented as a pre-computed key-value (KV) cache. This cache contains distilled strategic information relevant to DeFi operations on HyperEVM.- Pre-computation: The knowledge within the CAG DB is processed and stored beforehand.
- Context Injection: When an agent requires foundational strategic guidance, the relevant portions of this KV cache are efficiently loaded directly into the agent’s operational context window.
- Efficiency: This direct injection avoids the need for complex real-time vector searches or embeddings for this cached knowledge, making context setting faster, especially for well-defined, constrained knowledge sets.
Content: Distilled DeFi Knowledge & Heuristics
The information stored within Neko’s CAG DB represents distilled knowledge and effective heuristics derived from analyzing successful DeFi strategies and risk management principles (drawing inspiration from the vast landscape of techniques outlined in Neko’s research context). This includes:- Core principles for managing specific strategy types.
- Effective patterns for liquidity provision or borrowing strategies on HyperEVM.
- Key risk parameters or safe operational boundaries.
- Learned heuristics from past agent performance.
Synergy with RAG
CAG and RAG work in tandem to provide agents with comprehensive context:- CAG: Provides the foundational strategic knowledge and heuristics (the “how-to” based on learned patterns).
- RAG: Provides the real-time, dynamic data (current market prices, specific protocol states, recent events).
