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
case study

Why AI Chatbots Fail

May 03, 2025

I explore how AI chatbots can improve customer support for businesses, while also highlighting their common problems and how to make them better.

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


This is another project that makes social media management easy for small businesses. I created an AI-powered tool that helps businesses automatically post on social media. This tool is smart enough to know the day of the week, the current season, and even holidays! This means every post is special and connects with customers in a fresh way.

This project not only saves time but also keeps businesses looking good online. Imagine having unique and colorful posts made just for your brand without lifting a finger! Click below for the details to learn more about how this works.

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.