Crypto.com AI Agent SDK
  • Getting Started
    • Introduction
    • Quick Start Guide: Simulation Entry Point
  • Core Concepts Overview
    • Plugins
    • Tools
    • Blockchain Functions
      • Wallet Management
      • Token Interaction
      • Transaction Queries
      • Block Information
      • Contract Operations
      • CronosID Operations
      • Defi Operations
      • Crypto.com Exchange
    • Built-in Telegram Feature
    • Advanced Usage: Custom Instructions
    • Dynamic AI Model Manager
  • Crypto.com On-Chain Developer Platform
    • Developer Platform API Methods
  • On-Chain Functions and Examples
    • AI Agent Chatbot
    • "Magic Link" Signer
  • Resources for Developers
Powered by GitBook
On this page
  • Quick Start
  • API Examples

Was this helpful?

  1. Outdated Contents

Using Crypto.com AI Agent with Gemini

A guide to using the Crypto.com AI Agent with Google's Gemini model for blockchain interactions.

Last updated 4 months ago

Was this helpful?

Quick Start

1. Setup

Start by cloning the repository and navigating to the appropriate directory, and install the dependencies:

# Clone the repository
git clone git@github.com:crypto-com/developer-platform-sdk-examples.git
cd developer-platform-sdk-examples/ai/cryptocom-ai-agent-pychatbot

# Install dependencies
pip install -r requirements.txt

2. Configure API Keys

Direct to Envand set up the following API keys in your environment:

  • OPENAI_API_KEY - For OpenAI functionality

  • GOOGLE_API_KEY - For Gemini functionality

  • GOOGLE_PROJECT_ID - For Gemini functionality

3. Launch the Chat

python chat.py

When prompted, select gemini as your AI provider.

API Examples

Query Latest Block using Gemini

curl -X POST http://localhost:8000/api/v1/cdc-ai-agent-service/query \
-H "Content-Type: application/json" \
-d '{
  "query": "get latest block",
  "options": {
    "gemini": {
      "apiKey": "YOUR_GOOGLE_API_KEY"
    },
    "llmProvider": "gemini",    
    "context": []
  }
}'

Query Latest Block using OpenAI

curl -X POST http://localhost:8000/api/v1/cdc-ai-agent-service/query \
-H "Content-Type: application/json" \
-d '{
  "query": "get latest block",
  "options": {
    "openAI": {
      "apiKey": "YOUR_OPENAI_API_KEY"
    },
    "llmProvider": "openai",
    "context": []
  }
}'