The Mirror Ai Stack: High-Level Architecture

The Mirror Ai Stack: High-Level Architecture

The Mirror Ai Stack: High-Level Architecture

A look at how we built a production AI platform from the ground up.


When we started Mirror Ai, we had a clear goal: build an AI platform that could research blockchain topics deeply, verify what it found, and produce professional documents, all from a single clean, unified interface. This solves the critical problem for people trying to understand blockchain and cryptocurrency topics, people typically struggle, juggle multiple tools. This used to make it hard to see the forest for the trees. Mirror Ai efficiently solves this.

This is the architecture that makes it possible.

Mirror Ai: Full stack architecture diagram


Four Layers

The platform is built in four layers, each with a clear job:

User Interfaces: How people interact with the system.
Agent Orchestration: How the AI decides what to do and in what order.
Data Integration: Where the information comes from.
Data Storage: Where everything lives.

User Interfaces

We wanted users to be able to access Mirror Ai however it suited them. That meant delivering the same intelligence through multiple channels:

  • Web Workspace: Modern web-based platform with streaming so responses arrive in real time. Includes a rich text editor for long form document generation and data visualisation for users who want to go beyond interactive chat.
  • Telegram and Discord bots: Lighter interfaces for quick queries and community engagement.
  • API and MCP server: Programmatic access for developers and enterprise clients who want to integrate Mirror Ai into their own workflows. Supports streaming, tool calling, and rate limiting.

One intelligence layer, four access points.


Agent Orchestration

This is where the AI work happens. We use LangGraph to manage a multi-agent system with three agent types:

Orchestrator. Receives every query, determines what the user actually needs, and builds an execution plan. Decides which specialists to activate and whether they can run in parallel or need to run in sequence.

Specialist Agents. Each specialist focuses on one type of work: research, data analysis, verification. They run in parallel where possible, applying their domain expertise to carefully curate data sources, cross-checking findings, and generating a coherent insightful answer with citations provided for the user to validate the answer.

Content Generation. Takes the specialists' outputs and synthesises them into a coherent response or document. Handles formatting, citation placement, and structure.

Every agent shares conversation context through a state management system that persists for the duration of a session. Failed tasks get retried. Long-running jobs maintain their state across multiple turns.


Data Integration

An AI platform is only as good as the data that powers it. We built automated ingestion pipelines that pull from 10+ provider APIs simultaneously:

  • Market Data: CoinMarketCap, CoinGecko, Binance (prices, volumes, order books)
  • DeFi Analytics: DefiLlama, DexScreener (TVL, yields, liquidity)
  • News and Research: Web Search, curated news feeds, and other relevant information (current events, development activity, documentation)

The pipelines normalise, validate, and cache data automatically. Freshness depends on the data type, with near real-time updates for price data, and regular ingestion of other data sources. Careful data source selection helps us to maintain consistency, so that if one provider goes down, the system fails over to an alternative automatically.

At Mirror Ai we don't stand still... we are constantly expanding our data sources so that our platform is always relevant and insightful, constantly evolving even as the blockhain industry continues to transform.


Data Storage

Three databases, each for a different job:

PostgreSQL
* handles structured data needed to support platform operations in a manner that is ACID compliant.

  • handles vector search. Everything document related to allow for efficient retrieval by our AI Core to deliver quality answers: protocol whitepapers, research papers, regulatory texts.

S3: Handle our big data storage requirements. Allows us to ingest and manage data at a scale beyond the capability of traditional data platforms and operate at enterprise scale.

Redis handles anything that needs speed, allowing operations at all layers of our platform to operate smoothly and reliably, to maximise overall user experience at all times.


How a Query Flows Through the System

A user asks a question in the Web Workspace. The request hits the API gateway, gets authenticated, and lands with the orchestrator.

The orchestrator analyses the query, determines what AI specialists are required and activates them so that they can contribute to the answer. They work in parallel to ensure that quality answers get to users as soon as possible.

Results flow to the content generation agent, which synthesises everything into a structured response, cites every source, and streams the result back to the user through the WebSocket connection.

Total time for a standard query: 10-40 seconds. For a full document: 3-10 minutes. The time depends on the complexity of the user query or document generation request and the amount data required to fully answer it.


Why This Architecture Works

Each layer is independently replaceable. The data integration layer doesn't care which AI model the orchestration layer uses. The storage layer doesn't care whether it's serving a web request or an API call. That separation let us build and ship faster than if everything were coupled together.

It also meant we could swap out individual components without rewriting the whole system. We replaced our search provider, upgraded models, and changed caching strategies, all without touching the other layers.

That was the design goal from the start. Build something modular enough to evolve as the technology changes, but integrated enough to feel like a single product to the user.


Back to all articles
Demo Mode

Hi! I'm your AI assistant 🤖

I can help you with blockchain research, whitepaper analysis, and crypto market insights. Try asking me something!