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

What Happens If AI Handles Customer Support? ServiceNow Found Out

May 03, 2025

See how ServiceNow use smart AI agents to answer 80% of customer questions quickly, saving time and making customers happier.

Project
portfolio

Building a Crypto Price Feed for the Web

May 03, 2025

This is a cryptocurrency tracking tool that displays historical price data over the past 365 days, allowing users to easily view trends through both tabular data and visual charts.

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


Hungry for more? Let me tell you about my exciting project where I built a fun game that helps kids learn! It's colorful, easy to play, and teaches important skills like counting and problem-solving. I really enjoyed creating characters that are friendly and help players along their journey.

This game is full of cool surprises, like hidden treasures and fun challenges that keep everyone guessing! I also made sure it works on different devices, so friends can play together anywhere. Don't miss the chance to check out this project—I can't wait to show you more about it!

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.