AI Trading Agents Hackathon - lablab.ai

AI Trading Agents
Harness

An open-source harness for autonomous AI trading agents: multi-agent analysis, universal MCP trading platform, and a declarative risk engine with on-chain evidence via ERC-8004. Three pillars. Zero competitors.

Watch Demo View on GitHub
3x
Agent Architectures
6
MCP Servers, 33+ Tools
5
Policy Streams
3
ERC-8004 Registries

Watch Swiftward
in action

See how our autonomous AI trading agent handles live market conditions — from news triage to execution.

Three Pillars.
Better in all three.

Every competitor built a trading bot. We built a better trading bot AND the only production-grade compliance infrastructure in the competition.

🧠

Pillar 1: Smarter Agents

Not "ask GPT to trade." Three distinct agent architectures:

Claude Code Agent - 5 subagents debate every decision (technical, sentiment, structure analysts + bull/bear researchers). 6 skills. Self-improving strategy with memory.

Python Deterministic Agent - 3-stage mathematical brain (filter -> rotate -> decide). 4 concurrent loops. Own MCP server stack.

Swarm Agent - Multiple strategies backtested, best performer selected for live trading.

🔧

Pillar 2: Trading Platform

Universal infrastructure any agent plugs into:

6 MCP Servers, 33+ Tools - Trading, Market Data, Files, Code Sandbox, News, Risk. JSON-RPC standard.

ERC-8004 All 3 Registries - Identity (agent NFT), Validation (signed attestations), Reputation (6 metrics on-chain).

Real Kraken Execution - Live trading with professional React dashboard (6 screens), Telegram operator interface, code sandbox per agent.

🛡️

Pillar 3: Super Safe

Everything jailed and controlled:

Swiftward Policy Engine - YAML DSL with graduated risk tiers. Limits tighten as drawdown increases. Circuit breakers. Shadow/A-B mode.

3 Gateways - MCP (tool calls), LLM (AI prompts + ML injection detection), Internet (domain control). Nothing bypasses the infrastructure.

Evidence Chain - keccak256 hash-chained decisions. Tamper-evident. Public API. Every decision provable on-chain.

Smarter Agents

Not "ask GPT to trade." Multiple agents already deployed and trading. Three distinct approaches running in production.

🧠

Multi-Agent Debate + Skills

5 subagents analyze every trade in parallel: technical, sentiment, market structure analysts + bull/bear researchers. 6 skills on demand: trading session, deep analysis, portfolio review, strategy update, morning brief, alert review.

🔬

Deterministic Quant Trader

Python agent with 3-stage mathematical brain: market health filter, asset rotation selector, position sizing engine. Pure math for stops and sizing - no hallucination in the core layer. 4 concurrent loops.

📈

Backtesting Arena

Multiple strategies evaluated via backtesting framework. Best-performing agent selected for live trading. Market simulator with MCP stubs for offline evaluation.

🧪

Python Code Sandbox

Isolated Docker container per agent. Downloads market data, writes and runs custom analysis scripts. Persistent state across sessions. The agent codes its own trading tools.

💡

Self-Improving

Persistent memory across sessions. Detailed session reports with trade reasoning. Self-reflection after losses - analyzes what went wrong, creates permanent rules. Strategy evolves from exploration to fine-tuned edge.

🛠️

Harness Runtime

Event-driven agent harness (think OpenClaw, but for trading and 100% isolated). Orchestrates Claude Code CLI via stream-json protocol. Session lifecycle, alert injection, Telegram streaming, error recovery. Claude subscription - flat cost, no per-token burn.

5 subagents spawned in parallel
3 analysts spawned, then Bull + Bear researchers debate
Agent self-analysis
Agent analyzes mistakes, creates permanent trading rules
Deterministic Python agent flow diagram
Deterministic agent: 4 triggers, cooldown gate, 3-stage brain, 5 data sources
Real Telegram session - iPhone

Operator in the loop.
Agent in control.

Agent streams output in real-time to Telegram. Operator can message mid-session - ask questions, request analysis, override decisions. The agent acknowledges and incorporates.

  • Live output streaming with placeholder+edit pattern
  • News alerts with autonomous false positive detection
  • Operator can ask agent to check ideas or trade manually
  • Proactive alerts on drawdown, regime shifts, reconciliation

Trading Platform

Universal infrastructure. Any agent plugs in. Standardized MCP protocol.

🔧

6 MCP Servers, 33+ Tools

Trading (submit, estimate, portfolio, history, limits). Market Data (prices, candles, orderbook, funding, OI, alerts). Files, Code Sandbox, News, Risk. All JSON-RPC standard.

📊

Multi-Source Market Data

Kraken, Binance, Bybit connectors with degradation chain. PRISM API for asset resolution and signals. 7 server-side indicators (EMA, SMA, RSI, MACD, BBands, ATR, VWAP). Fear & Greed index. Funding rates. Open interest.

📰

News + Sentiment + Polymarket

CryptoPanic news feed with sentiment scoring. Event classification (hack, regulation, listing, macro). Polymarket prediction data. Keyword alerts that wake agents.

🔔

Alerts & Conditional Orders

Price alerts (above/below/change%). News keyword alerts. Auto-executing stop-loss and take-profit (OCO-linked). Soft stops that wake the agent without auto-selling. Trailing stops.

⛓️

On-Chain Evidence (ERC-8004)

We maintain our own keccak256 hash chain - signing all internal decisions AND external RiskRouter verdicts. Proofs posted to ERC-8004 Validation Registry. Agent identity as NFT. 6 reputation metrics on-chain.

🖥️

Professional Dashboard

6 screens: Overview, Agent Detail, Market, Evidence, Policy, Claude Agent. Equity curves, positions, trade history with evidence hashes. Single binary deployment.

Full portfolio dashboard
Dashboard - equity curve, positions, risk metrics
Positions and asset concentration
Asset concentration with 50% policy limit
Current positions with PnL
FARTCOIN +15.6%, total unrealized +$271
Polymarket and operator interaction
Polymarket BTC consensus analyzed live
Price alert triggered
NEAR breaks support - agent wakes, analyzes, decides HOLD

Every trade. Fully transparent.

Cryptographic hashes for every decision. Auditability built in from day one.

swiftward-trading-agent - live feed
TimePairSideQtyPriceP&LStatus
00:05:46 UTC ETH-USD BUY 0.6955 $2,124 +$0.00 FILL
03:16:35 UTC ZEC-USD BUY - - - REJECT
04:16:33 UTC NEAR-USD SELL 12.40 $4.87 +$2.31 FILL
06:22:10 UTC ETH-USD BUY 0.3210 $2,101 -$1.42 FILL

Super Safe

Declarative YAML rules - versioned, configurable without code changes. Trading risk management + AI operations controls. All by Swiftward policy engine.

📝

Declarative YAML Rules

Human-readable policy rules. Versioned lifecycle: draft -> candidate -> frozen -> archived. Change risk limits without touching code. Entity state per agent: counters, labels, buckets.

Graduated Risk Tiers

Limits tighten as drawdown increases. Tier 0 (15%) -> Tier 1 (-2%, 10%) -> Tier 2 (-3.5%, 5%) -> Tier 3 (close-only) -> Halted. Concentration caps, pair whitelist, stop-loss enforcement.

🔄

Circuit Breakers

Loss streak: 3 losses = 1h pause (exits allowed, resets on win). Rate limit: 50/10min. Three-layer heartbeat drawdown. Operator halt/resume via Risk MCP. Telegram alerts on every trigger.

🧾

Evidence Hash Chain

Every decision (approved or rejected) gets a keccak256 hash chained to the previous. Tamper-evident. Public Evidence API. Modify one record - the chain breaks.

📋

Replay / Shadow / A-B Testing

Deterministic replay from evidence chain. v2 stricter rules run simultaneously, logged not enforced. Safe policy rollout. Full observability via Victoria Metrics + Logs (OTLP).

🔐

3 Gateways + Injection Defense

MCP, LLM, Internet gateways - every tool call, AI prompt, and HTTP request policy-evaluated. ML classifiers (PG2 + BERT) scan for prompt injection. Attention recovery enforces end-of-session on-chain attestation.

Loss streak protection
3 losses - automatic 1h trading pause
Trade rejected by policy
ZEC BUY rejected - loss streak cooldown
Blocked domain alerts
Blocked domain (mcp-proxy.anthropic.com) - REJECTED
ETH trade with evidence hash
Every trade: reasoning, confidence, evidence hash

Built by Swiftward Team

A team of engineers passionate about making autonomous AI trading safe, transparent, and powerful.

Konstantin Trunin

Founder & CTO, Swiftward

25+ years in distributed systems. Engineering leader across 15+ startups, CTO of a logistics platform. Built the platform end-to-end.

Tikhon Slasten

Tech Lead, HAIA

6+ years in software engineering, focused on distributed systems and Web3 integrations. Builds scalable systems where AI meets on-chain finance.

R

Ruslan

I

Ivan

Run it yourself

Open source. One command to start the full stack. Docker Compose, multi-platform GHCR images, production-ready.

View on GitHub Watch Demo
git clone ... && cp .env.example .env && make up