Crypto AI Agent

IQAI ADKTypescriptNode.jsGoogle Gemini LLMCoinGecko APICoinDesk APIPNPMBiome
An AI agent that leverages the ADK TypeScript library and custom tools to provide real-time cryptocurrency prices, volume, market capitalization, and other data, and also curated news articles from CoinDesk, right in your the terminal. This project serves as a practical demonstration of how AI agents can autonomously handle multi-step queries by integrating large language models (LLMs) like Google Gemini and Open AI with external APIs such as CoinGecko and CoinDesk. It offers a streamlined command-line interface (CLI) experience for crypto enthusiasts and developers to access up-to-date market insights and news effortlessly.
TECHNOLOGIES
- Programming Language: TypeScript
- AI Framework: IQAI Agent Development Kit (ADK)
- APIs: CoinGecko, CoinDesk
- LLM Model: Google Gemini “gemini-2.5-flash” model
- CLI Tooling: Node.js, readline for terminal interaction
- Environment Management: dotenv for API keys and configuration
- Package Management: PNPM
- Linting and Code Quality: Biome for code formatting and Husky git hooks

CORE FEATURES
- Autonomous Multi-Tool Agent: Combines LLM-powered reasoning with custom tools to fetch live crypto prices, market capitalization, volume data, and latest news.
- Precise User Instructions: The agent interprets natural language input to selectively invoke appropriate tools, ensuring focused and relevant responses.
- Terminal-Based Interaction: Offers a seamless and intuitive command-line chat interface with session memory for continuous conversations.
- Markdown News Reports: Generates formatted news summaries written to a markdown file for easy review and sharing.
- Modular Architecture: Clean separation of agent logic, tools, and utility libraries enabling easy extension or customization.
DEVELOPMENT PROCESS
- Design & Planning: Identified key functionalities needed for a crypto AI agent—real-time data queries and news delivery, then structured the project using ADK’s agent-tool-memory paradigm.
- Implementation: Created custom tools "CryptoDataTool" and "CoindeskNewsTool" that connect to external APIs and process responses into structured data. Configured the agent’s behavior with clear instructions to handle specific crypto-related queries. Built user session management using ADK’s InMemorySessionService to maintain context in multi-turn terminal conversations.
- Testing: Validated functionality through CLI interactions querying prices and news; ensured error handling and data formatting for robustness.
- Deployment: Run locally with environment-managed API keys and simple start scripts supporting fast iteration.


CHALLENGES & SOLUTIONS
- Real-Time API Integration: Handling varying API response formats and potential rate limits required robust error checking and caching strategies.
- Natural Language Understanding: Crafting explicit agent instructions to correctly parse and respond to diverse user inputs was critical to avoid ambiguous or off-topic replies.
- Session Context Management: Ensuring continuity across multiple queries in the CLI was addressed using ADK’s session services, enabling the agent to remember prior conversation context.
- User Experience in CLI: Creating a responsive and clear CLI prompt with readable outputs and error messaging improved usability, despite lacking a graphical UI.
KEY TAKEAWAYS
- Gained hands-on experience architecting AI agents that blend large language models with domain-specific API tools for actionable, context-aware responses.
- Developed familiarity with the IQAI ADK framework and TypeScript for building modular and extensible autonomous agents.
- Learned best practices for securely managing API keys and environment configurations in Node.js projects.
- Explored how AI agents can be employed effectively in the fast-moving, data-rich world of cryptocurrency to deliver timely insights.