project screenshot 1
project screenshot 2
project screenshot 3

Near AI Assistant

The one-stop decentralized AI chatbot for the Near Protocol ecosystem

Near AI Assistant

Created At

ETHGlobal Brussels

Winner of

NEAR Protocol - User owned AI is Near

Project Description

This project aims to provide a one-stop AI chatbot to discover the Near ecosystem 🚀

It features an AI agent using an open-source model running on the Aleph.im decentralized cloud, and a basic frontend to simplify interactions with it.

The agent has access to several functions to serve requests about Near as best as possible:

  • Access to realtime search results (Google), which is used to answer questions related to general Near architecture
  • Ability to send testnet NEAR tokens to an address when a user requests it
  • Capable of minting and sending a special ETHGlobal Brussels NFT on Near testnet when a user requests it
  • Able to simplify the understanding of what happened in a testnet transaction with a given hash and sender

❓ It's always better with examples, so here are some questions that this AI is able to handle:

  • What is Near?
  • What are the different transaction actions on Near?
  • Can I please have an ETHGlobal Brussels NFT sent to me at rezarah.testnet? Thanks
  • I want to start using Near, can you send me some tokens on my testnet address random.testnet?
  • I don't understand what this transaction is doing, can you help me? The transaction hash is hash and it was send by someone.testnet.

How it's Made

For the AI part, the current model used is Nous Hermes 2 Pro - Llama 3 8B, deployed on the Aleph.im network. This means that in runs in serverless VMs on a random node of the network, without logs. The idea is to leverage their confidential VM feature coming this fall (that allows the creation of a secure VM on the host with encrypted hardware like the RAM, storage etc) to guarantee privacy of all the chats.

This model is pretty good for this use case (function calls and JSON data handling), but combining it with a model with greater context like Phi 3 could be a future improvement. The model deployed on Aleph is then called from our Python code, where it's wrapped in a basic framework with LangChain to give it access to agentic functions mentioned in the description above. Those functions use different APIs and external packages, like oxylabs.io (for the search engine calls), near-faucet.io and a custom fork of py-near (to fix some issues with the original version). I'm also doing some recursion on the generated data and validation with Pydantic to limit hallucinations.

A simple socket.io server is exposed from the Python code, with which we can interact from the frontend (React TS project with Vite), which is a basic chat app.

background image mobile

Join the mailing list

Get the latest news and updates