Executive Summary
While the industry buzzes about autonomous blockchain agents, the reality is that today's on-chain
environment is still too unpredictable — and too adversarial — to entrust significant capital to nondeterministic
fully autonomous AI agents. While this field matures, at Almanak we take a more pragmatic stance: empower humans first. By providing a
Team of 18 specialized AI agents that accelerate idea-to-deployment workflows, we cut strategy
development cycles from days or even months to minutes without compromising quality and security.
The AI Agent Swarm integrates seamlessly with the Almanak Platform for building, optimizing and managing sophisticated financial strategies. The Swarm orchestrates: research, design, coding, testing, backtesting, QA, permissions, deployment on our platform, monitoring, visualization, troubleshooting and more. Humans are still the pilots but now they have a sophisticated team of AI agents doing all the heavy lifting at lightning speed.
Agents
| Agent | Role | Main Output |
|---|---|---|
| Strategist | Designs strategies based on user requirements. | Strategy Design |
| Coder | Translates designs into code using Almanak's Strategy Framework. | Strategy Code |
| Reviewer | Reviews the work of other agents to ensure quality and alignment. | Reviews |
| QA Engineer | Performs tests and on-chain simulations (e.g. via Anvil). | Test Results |
| Debugger | Root-cause analysis & fixes. | Bug Reports |
| UI Designer | Creates dashboards for monitoring strategy performance. | Dashboard Code |
| Permission Mgr | Identifies required (SAFE) permissions and creates payload for signature. | Permissions Payload |
| Deployer | Packages the strategy and (optionally) pushes it onto the platform. | Deployment File |
| Data Wizard | Gathers on-chain and off-chain data. | On/Off-chain Data |
| Researcher | Explores chains and protocols to find insights. | Actionable Reports |
| Quant | Applies, refines and tests financial models. | Financial Models & Code |
| Stack Expert | Provides information about Almanak's Stack and Platform. | Stack Information |
| SDK Master | Reads Protocols' SDKs and writes wrappers for Almanak's framework. | SDK Wrappers |
| Supervisor | Orchestrates other agents. | Agentic Coordination |
| Vault Manager | Manages vaults. | Vault Management |
| Influencer | Shares results and insights with the community. | Engaging Content |
| Troubleshooter | Assists users to troubleshoot issues with their strategies. | Actionable Fixes |
| Security Guard | Analyzes code submitted to the platform for security threats. | Security Reports |
Each agent can be leveraged independently or in combination, depending on the goal.
Teams
The magic really happens when agents collaborate. There is an intelligence that arises when agents work together and feed off each other. The Swarm offers specialized teams, each focusing on a specific aspect of strategy development. We've all noticed the powerful evolution from LLM to agents to agents with tools to multi-agent systems, where each agent has its own expertise and tools. The MAS approach reduces the hallucinations happening from the agent being confused by trying to do too much or having too many tools. This modular approach allows for flexibility, scalability and maximum efficiency of agents collaboration.
This document introduces the Strategy Team which is a multi-agent system for strategy development. Other teams such as the Research Team and the Backtesting Team will be introduced and detailed in future documents.
Each team operates independently but can collaborate when necessary. The system's architecture allows for easy integration of new teams and agents as the project evolves.
Strategy Team - Architecture
Strategies deployed and running on the Almanak Platform are implemented via the Almanak Strategy Framework, a Python library that allows for easy deployment of robust blockchain and DeFi strategies. Users are already creating and deploying strategies on the platform. Users are coming up with their strategy idea, implementing it in Python via the strategy framework, adding dashboards, setting permissions for their SAFE wallet and packaging the strategy to push it on the platform and even share it with the community. With the rise of AI Agents, we challenged ourselves to offload the heavy lifting from these steps to AI Agents to speed up the strategy development cycle from hours, days or even weeks to minutes without compromising quality and security. As for the 'coming up with the strategy idea', that's where the Research Team comes in. But let's focus on the Strategy Team for now.
The Strategy Team is implemented via LangGraph. Each node is an agent and each edge represents a
conditional transition to the next agent. We opted for a graph-based workflow instead of an orchestrator or supervisor pattern because it offers more stability and fits our needs perfectly. Shared memory flows through a typed TeamState object so
that every agent sees the whole picture while touching only its own scope of responsibility. The Research Team however, is implemented as a Swarm pattern using the OpenAI definition and implementation.
LangGraph offers a deterministic flow execution, state persistence, and native support for human-in-the-loop checkpoints. When we choose to
enable --yolo mode the graph simply shortcuts those checkpoints (available only for power users).
The system's architecture is designed for both flexibility and reliability. The LangGraph implementation allows for:
- Deterministic Conditional Routing - Agents have pre-determined handoff for which agent should handle the next step based on the current state.
- Persistent State - The
TeamStateobject maintains all information throughout the process, ensuring consistency. - Checkpoint Recovery - The system can resume from interruptions and can time-travel to previous states using long-term persistence.
- Parallel Processing - When appropriate, multiple agents can work simultaneously on different aspects of the strategy (e.g. Dashboard and Permissions can be worked on at the same time).
The Strategy Team workflow follows a structured process from concept to deployment, which has inner feedback loops between agents:
The Strategist agent captures user requirements and translates them into a formal strategy specification.
The Strategist creates a detailed design including state machine definitions, configuration parameters, and key metrics.
The Reviewer evaluates the design for completeness, feasibility, and alignment with the Almanak framework.
The Coder translates the design into executable Python code using the Almanak Strategy Framework.
The QA Engineer performs initial syntax and structure validation of the code.
The Reviewer performs deeper analysis and framework conformance checks.
The QA Engineer runs tests using Anvil to simulate on-chain behavior.
If issues arise, the Debugger analyzes root causes and suggests fixes, which the Coder implements.
The UI Designer creates Streamlit dashboards for strategy monitoring.
The Permission Manager creates SAFE-based access control lists.
The Deployer packages the strategy and optionally pushes it on the platform.
The feedback loop between the Reviewer and the Coder, as well as the feedback loop between the QA Engineer, the Debugger, and the Coder, really is what makes the system so powerful. Here is a simplified example of how these feedback loops work:
Feedback Loops - Simplified Example
These loops can be repeated as many times as needed until the code passes all reviews and tests, or the max_iterations is reached (to prevent infinite loops). This iterative process ensures that every issue is caught and resolved, leading to robust and production-ready strategies.
The integration of onchain tests with Anvil allows for a more accurate simulation of the strategy's behavior onchain, leading to better testing and more reliable strategies.
- In HITL (Human-in-the-Loop) mode, at each stage the system requires human approval to validate the output of the agent. The idea is to keep the humans in the loop to validate the output and to be able to intervene in case of issues.
- In YOLO mode, the system self-progresses until success or max iterations. This is available only to power users to speed up the process.
Moreover, the system has a self-improving mechanism learning from previous mistakes. If the user opt-in to share their data, the system will record the AI flow and outputs to improve the agents over time, helping them avoid common mistakes. This feature is disabled by default to protect user privacy.
Note: Many of us have experienced 'vibe coding', we all know that AI Agents and LLMs are capable of great results, but we also know that they can hallucinate and make mistakes. Therefore we focus more on assisting the humans to speed up their productivity by orders of magnitude, rather than 1-shotting or having a success rate of 100% in yolo mode. We are well aware of the strengths and weaknesses of such systems.
Strategy Team in Action
Simple Example: BasicLP Strategy
Below is a simple example of a Basic LP strategy opening a position on Uniswap V3. The user requirements are translated into a formal strategy specification, which is then implemented in Python using the Almanak Strategy Framework.
Create a strategy called BasicLP that takes a USD amount in settings. During the initialization, wrap that amount worth of ETH to WETH. Then buy 50 % of that worth in WBTC, open a UniV3 LP with the remaining WETH/WBTC (±10 % range). During teardown, close the position and back assets to ETH. Add a dashboard that shows the Open/Close actions as well as the price overtime vs my position.
This is a terminal/console example showing the Strategy Team in action end-to-end. The platform will provide a full UI for the Strategy Team (unveiling soon!).
Other Examples
The exciting part is that you can rapidly develop different type of strategies using our the Strategy Team. Here are additional examples that will be showcased with the upcoming release of the UI.
Create a strategy called FundingArb that monitors funding rates across Hyperliquid and Binance for BTC and ETH perpetuals. When the funding rate differential exceeds 0.05% per 8h, take a position long on the exchange with negative funding and short on the exchange with positive funding. Use 3x leverage with a max position size of $10,000 per pair. Include automatic stop-loss at 2% drawdown and take profit at 1.5% gain. Track funding payments and PnL in a dashboard with time-series charts for rate differentials.
Build a strategy named DeltaNeutralFarmer that allocates 70% of capital to farm points on Bera by providing liquidity for BERA-USDC. Simultaneously, maintain delta neutrality by shorting an equivalent amount of BERA on Hyperliquid with 1.5x leverage. Automatically rebalance positions when delta exposure exceeds ±5%. Include a slippage tolerance of 0.5% for DEX trades and 0.2% for perp trades. Track points earned, funding paid, and impermanent loss in a comprehensive dashboard. Add alerts for significant divergence events.
Develop a strategy called CrosschainTA that applies technical analysis across Arbitrum, Optimism, and Base. Monitor ETH/USDC, WBTC/USDC, and ARB/USDC pairs on these chains, looking for RSI divergences and MACD crossovers. When a buy signal is generated on one chain but not others, allocate 20% of available capital to that opportunity if gas costs are under 0.05% of trade value. Use trailing stop-loss of 7% and implement a risk management system that never exceeds 40% allocation across all positions. Create a visualization dashboard showing signals across chains and performance metrics.
Security & Governance
AI Security Focus: Almanak's structured AI workflow approach is specifically designed to combat current and upcoming AI agents attack vectors that plague direct LLM prompting systems and naive AI trading bots that might consume untrusted content directly. Our multi-agent system operates within a controlled environment with curated data sources, pre-tested strategies, permissioned execution, and continuous monitoring. This institutional-grade process, inspired by traditional trading desk workflows, provides robust protection against malicious inputs while still leveraging AI to accelerate strategy development.
Financial strategies move real money; every swarm output therefore passes through multiple guardrails:
- Human Sign-off - at each critical state (design, code, deployment) unless YOLO is enabled.
- Static & Dynamic Analysis - Reviewer / QA jointly enforce Almanak's strategy framework rules.
- Permission-Least Principle - Permission agent derives minimal SAFE transaction scopes.
- Audit Trails - All agent logs and output are visible to the user and persistent (i.e. no black-box).
- Type Safety - Pydantic models enforce strict typing throughout the system.
- Simulation First - All strategies are tested in Anvil before deployment.
- Guardrails - Built-in guardrails for AI Agents inputs and outputs.
- Security Scan - Security agent inspects code sent to the platform for malicious code.
Our security approach balances innovation speed with risk management. By implementing multiple layers of validation and human oversight, we ensure that strategies are both effective and safe.
2026 Roadmap
- Research Team: Alpha Generation
- Protocol & CEX Team: New protocols and CEXes Integration
- Backtesting Team: Automated Backtesting & Simulation at scale
We're excited to see that our AI Agent Swarm is already 1-shotting basic strategies, providing alpha on the market and able to troubleshoot live strategies, all the while there is so much room for improvement already planned. Our AI Kitchen is cooking hard.
Conclusion
Almanak's AI Agent Swarm is not a speculative pitch — it is running in production today. While the work is only getting started, we're already seeing massive velocity uplift from idea-to-mainnet deployment turning days into minutes. Moreover, we're allowing quants to efficiently work on several ideas in parallel while agents are doing all the tedious work!
By combining rigorous engineering with the latest advances in LLM-based AI agents and frameworks, we enable quants, researchers, protocol teams and DeFi enthusiasts to
iterate faster, verify better and deploy safer.
Until fully autonomous finance matures, empowering humans with super-charged tools is the most impactful—and responsible—path forward.
💡 Building the future one agent at a time.