project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

Windmill

Windmill is an open source query tool and ecosystem for on chain data. Any on chain data can be queried from the Windmill and developers can build more tools to expand the functionalities of the Windmill.

Windmill

Created At

ETHGlobal Singapore

Project Description

Windmill is an open-source, user-friendly query tool and ecosystem designed to unlock the full potential of on-chain data. By allowing any on-chain data to be queried through simple natural language input and output, Windmill removes the complexity typically associated with blockchain analytics, making it accessible to both developers and non-technical users alike.

The Windmill ecosystem consists of four integral components:

Demonstration Web App: Built using Next.js, this web app serves as the interface for users to interact with Windmill. It allows users to input natural language queries and receive understandable outputs.

Phala Backend: Powered by an AI agent, the backend handles query processing and data retrieval. We have integrated 1inch developer APIs into this backend, leveraging them to efficiently aggregate data from decentralized exchanges and other blockchain sources. This layer is key to providing real-time, actionable insights from on-chain data.

Example Tool Project: This tool demonstrates how developers can extend the functionalities of Windmill by building additional tools. It provides a clear template for creating new tools that can seamlessly integrate with the ecosystem, enabling a wide range of enhancements and customizations.

NEAR Tool Contract: The NEAR-based smart contract empowers developers to build tools directly within the Windmill ecosystem. By utilizing the smart contract framework, developers can deploy new tools that expand Windmill’s capabilities, all while maintaining a decentralized structure.

By focusing on natural language interactions, Windmill simplifies complex blockchain queries, transforming them into understandable and actionable insights. Also, enabling developers to build and integrate additional tools, while providing a user-friendly interface for anyone interested in exploring on-chain data.

How it's Made

Windmill leverages a combination of decentralized computing, AI-driven queries, and blockchain integration to build a robust query engine for on-chain data. Here's a detailed breakdown of the architecture and technologies used:

Phala Backend: Windmill’s backend is powered by Phala, a decentralized shared computing system capable of securely running AI agents. The backend utilizes:

OpenAI’s ChatGPT API for natural language processing, handling both the input and output of user queries.

Tool calling functionality within the AI agent, enabling dynamic task execution.

1inch API to retrieve data from decentralized exchanges and to query wallet information for fraud detection and analysis.

NEAR RPC API to interact with the NEAR blockchain, particularly for handling smart contract interactions.

Viem SDK to streamline queries and interactions with Ethereum-based blockchains, allowing Windmill to handle multi-chain data retrieval.

Next.js Frontend:

The user-facing component of Windmill is built using Next.js. The frontend communicates with the Phala backend via a dedicated API endpoint that handles natural language queries. Queries are passed to the backend using fetch, and results are returned in natural language, making it simple for users to interact with the blockchain without needing technical knowledge.

NEAR Tool Contract:

Deployed on the NEAR testnet, this smart contract allows developers to extend Windmill’s functionality by building and deploying new tools. Developers register their tools via a JSON schema specification, linking the tool’s URL to the contract. The tools are then available for dynamic invocation by the AI agent when a specific query requires their use.

Dynamic Tool Integration:

A key innovation in Windmill is the dynamic integration of tools into the AI agent. The agent can query the NEAR smart contract to access new tools that have been registered. This allows Windmill to scale seamlessly by enabling developers to add functionality without modifying the core system.

Notable Approach:

The use of dynamic tool calling within the AI framework, combined with decentralized registration via smart contracts, allows Windmill to remain flexible and modular. The system dynamically loads and executes tools as needed, reducing the overhead of managing a static set of functions.

background image mobile

Join the mailing list

Get the latest news and updates