Crypto AI Agent

A LangGraph-powered system for routing, analyzing, and responding to crypto queries using structured tools and data pipelines

Continue reading...

Featured Project
case study

Meet Nibby: The AI Concierge Revolutionizing Health Insurance Support

May 03, 2025

Nibby, an AI helper created for NIB Health Insurance, that answers questions and saves money while letting staff help with tricky problems.

Project
portfolio

Automating Resume Screening: a Game-Changer for Recruitment Efficiency?

May 03, 2025

I created an AI tool to help find the best job candidates quickly and fairly by automatically checking their resumes for important skills.

About

This is an AI-powered crypto assistant that uses routing and specialized tools to deliver structured insights from market data, technical analysis, and news.

Overview

An AI-powered crypto assistant that interprets user queries and delivers structured responses using a routed LangGraph architecture, specialized tools, and structured data pipelines.

The system is designed to produce reliable, context-aware outputs while remaining resource-efficient and scalable.


Architecture

System flowchart depicting the end-to-end pipeline of a crypto AI agent, including input handling via Flask, query classification, tool routing (charts, analysis, news, database), and response generation back to the user.

The system follows a structured pipeline:

  • Flask backend handles incoming requests
  • LangGraph agent routes queries based on intent
  • Specialized tools handle data retrieval and analysis
  • Frontend renders results and visualizations

The agent dynamically selects execution paths instead of relying on a single generalized prompt.


 Query Routing

User queries are often unstructured and ambiguous.

A lightweight classification layer determines:

  • Whether the query is crypto-relevant
  • Whether a specific asset is referenced
  • The appropriate category and execution path

This routing ensures each query is processed with the correct tools and prompts, improving both efficiency and response quality.


Tooling & Data Strategy

The system follows a tool-first design, minimizing reliance on raw LLM reasoning.

Market Data

  • Prices are stored locally and updated via scheduled API calls
  • External API usage is minimized (daily updates per asset)
  • Reduces latency, cost, and dependency on real-time calls

Technical Analysis

  • Indicators are precomputed from structured price data
  • The LLM receives clean, formatted inputs instead of raw data
  • Prompts explicitly define how each indicator should be interpreted

News

  • Relevant articles are selected from trusted sources
  • The system prioritizes high-signal, popular content over volume

FAQ Handling

  • Common crypto questions are handled via predefined prompt-based responses
  • Ensures consistent answers for foundational queries

Visualization Layer

  • Charts are generated on the client side using Plotly (JavaScript)
  • Backend passes structured JSON instead of retaining chart objects
  • This reduces memory usage and improves performance

A technical analysis generated by the crypto AI agent based on a bollinger bands chart


Constraints & Optimization

A 512MB RAM constraint was used in production to evaluate system efficiency.

This exposed performance bottlenecks and led to major optimizations:

  • Refactoring of over 2,000 lines of code
  • Removal of unnecessary object retention
  • Consolidation of logic where appropriate
  • Transition to a stateless (one-shot) agent design
  • Migration of chart rendering to the frontend

These changes significantly improved stability and resource usage.


Key Design Decisions

  • Routed agent architecture using LangGraph
  • Tool-first approach instead of LLM-centric logic
  • Structured inputs for deterministic outputs
  • Stateless query processing model
  • Client-side rendering for visualization efficiency

Outcomes

  • Efficient handling of ambiguous, real-world user queries
  • Reduced API usage and operational costs
  • Improved system stability under constrained resources
  • Modular architecture that separates routing, tools, and presentation

Resources


Explore a cryptocurrency data tracking project designed to provide users with up-to-date and historical price information in a structured and efficient way. The system connects to a crypto data API, regularly updates stored data, and maintains a rolling dataset of the past 365 days.

To ensure data completeness, the system also validates missing dates and fills gaps where necessary, resulting in a consistent and reliable dataset. Older records are automatically removed to keep the database optimized while preserving the most relevant historical range.

The data is presented through both a tabular interface and an interactive chart, allowing users to analyze trends and price movements at a glance. This project focuses on data consistency, automation, and efficient storage management.

For a deeper look into the implementation and data handling approach, explore the project further on this website.

Learn More

About

This is an AI-powered crypto assistant that uses routing and specialized tools to deliver structured insights from market data, technical analysis, and news.