AI Trading Agents Hackathon - lablab.ai

AI Trading Agents
Harness

A harness for autonomous AI trading agents: multi-agent analysis, 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 the platform handles live market conditions - agents analyzing, trading, getting blocked, learning.

Three Pillars.
Better in all three.

Every competitor built a trading bot. We built smarter agents, a trading platform, and a risk engine. Three pillars nobody else attempted.

🧠

Smarter Agents

Multi-agent debate. Deterministic quant trader. Backtesting arena. Self-improving with memory. Harness runtime. Code sandbox.

🔧

Trading Platform

6 MCP servers, 33+ tools. Multi-source market data. News, sentiment, Polymarket. Alerts and conditional orders. On-chain evidence via ERC-8004. Dashboard.

🛡️

Super Safe

Declarative YAML rules. Graduated risk tiers and circuit breakers. Safe rollout with backtesting and shadow mode. 3 gateways. Observability. Audit trail.

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. Works with API keys or Claude subscription for flat-cost operation.

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
Operator interacting with agent via Telegram

Operator in the loop.
Agent in control.

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

  • Live output streaming as the agent thinks and acts
  • Two-way communication - ask agent to check an idea or trade
  • Risk engine alerts: halts, circuit breakers, blocked actions
  • Agent alerts: price triggers, news events, session summaries

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.

Positions and asset concentration
Asset concentration with 50% policy limit
Current positions with PnL
FARTCOIN +15.6%, total unrealized +$271
Active alerts overview
5 active alerts - hard stops, take profits, soft stops with auto-execute
Alert triggered - MON breakdown
Soft stop triggers - agent analyzes breakdown, exits in 2 tranches
Dashboard news feed with sentiment
News feed with sentiment tags, keyword filter, auto-refresh
Market prices from Kraken
Live market prices - 24h change, volume, spread, source
Trades with evidence links
127 trades - each with decision hash, evidence link, reasoning
Decision hash chain - 339 decisions
339 decisions hash-chained - fills and rejects linked
Decision trace detail with JSON
Each decision: full trace JSON with reasoning, confidence, fill data

Super Safe

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

📝

Declarative Versioned YAML Rules

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

Trading Risk Rules Pack

Graduated risk tiers (limits tighten as drawdown grows). Circuit breakers (3 losses = 1h pause). Three-layer heartbeat drawdown. Stop-loss enforcement. Concentration caps. Pair whitelist. Rate limits. Operator halt/resume.

🧪

Safe Rollout: Evals, Backtesting, Shadow, A/B

Never deploy untested rules. Eval tests validate rules before rollout. Backtesting on historical events. Shadow mode runs next version of rules in parallel, logged not enforced. A/B testing compares policy versions on live traffic.

🔐

3 Gateways + Injection Defense

Agents are fully isolated - all communication goes through 3 gateways: MCP (tool calls), LLM (AI prompts), Internet (HTTP). Every request policy-evaluated. ML classifiers (PG2 + BERT) for prompt injection. LLM Gateway also enforces required behaviour - e.g. end-of-session attestation with reasoning for every agent.

📊

Observability & Scalability

OpenTelemetry metrics and logs (SigNoz). Kubernetes-ready. Horizontal scalability. Docker Compose for dev, multi-platform Docker images. Policy alerts via Telegram (halts, breakers, rejections).

🧾

Audit & Evidence Hash Chain

Every decision (approved or rejected) gets a keccak256 hash chained to the previous. Modify one record - the chain breaks. Public Evidence API. Full audit trail from genesis to latest trade.

Active policy rules
Declarative YAML rules - change limits without redeploying code. 16 rules, 301 rejections.
Trades list with policy rejection
FARTCOIN BUY rejected - 3 losses, 1h pause (exits allowed)
Loss streak protection
3 losses - automatic 1h trading pause
Blocked domain alert
Agent tried blocked domain - REJECTED by internet policy

Built by Swiftward Team

Platform engineers building safe AI infrastructure for autonomous trading.

Konstantin Trunin

Founder & CTO, Swiftward

25+ years in distributed systems. Engineering leader across 15+ startups, Co-Founder & CTO of a logistics SaaS. 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