likaho / AgenticProtocol

Agentic Protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Agentic Protocol

Welcome to Agentic Protocol - An open platform for the new AI economy. It is a Decentralized Agentic Protocol No-Code Building Tool & Marketplace.

Overview

  • This innovative platform empowers creators and developers to build and own their AI agents.
  • Creators mint non-fungible tokens (NFTs) to establish ownership of their agents, providing verifiable proof of authenticity.
  • By accepting token payments via an ERC20 contract, creators can monetize their agents directly.
  • The agent's blueprint is securely stored within the Filecoin storage network, ensuring immutable ownership.
  • Citrea enables agent creators to mint unique NFTs that prove authorship of AI agents.
  • These NFTs allow monetization through token (AGEN) payments from users via an ERC20 contract.
  • Decentralized node owners can deploy these agents on a decentralized network and earn AGEN Tokens.
  • Galadriel ensures agent integrity by providing zkML proofs of inference. These proofs validate agent behavior, especially when using LLMs.

The combination of FileCoin, NFTs, and zkML creates a powerful ecosystem for AI agents!

There are five main directories in this repo:

  1. chat-ui: This folder is dedicated to the chat web client.

  2. llm-server: This folder contains an Express web service that handles requests from llm-proxy-server service. It forwards prompts to the Galadriel network.

  3. contracts: Here, you'll find all the NFT (AGENTL) and ERC20 (AGEN) contracts.

  4. ai-app-builder: The ai-app-builder folder includes both client and server-side projects. It provides a no-code agent building tool and serves as the marketplace.

  5. llm-proxy-server: In this folder, you'll find Python scripts responsible for function calling. They act as a proxy, deciding which tool or agent to call or redirecting calls to the Galadriel network.

Technologies Were Used

The project leverages three key components: Filecoin, Citrea, and the Galadriel network.

Microservice Architecture

  1. Filecoin (Lighthouse):

    • Filecoin is a decentralized storage network designed to store important information globally.
    • In the context of our project, Filecoin serves as the storage infrastructure for agent-related data.
  2. Citrea:

    • Citrea enables agent creators to mint unique non-fungible tokens (NFTs, symbol: AGENTL) that prove their authorship of AI agents.
    • These NFTs allow creators to monetize their agents by accepting token (AGEN) payments from users via an ERC20 contract.
    • The agent's definition is stored within the Filecoin storage network, providing proof of ownership.
    • Additionally, decentralized node owners can deploy these agents on a decentralized network and earn AGEN Token.
  3. Galadriel Network:

    • The Galadriel network plays a crucial role in ensuring agent integrity.
    • It provides zero-knowledge machine learning (zkML) proofs of inference.
    • These proofs validate the correctness and reliability of agent behavior, especially when using large language models (LLMs).

In summary, Citrea and Filecoin collaborate to empower agent creators, while the Galadriel network enhances agent security and reliability.

Agent Creation

Our Decentralized Agentic Protocol No-Code Building Tool is an innovative platform that empowers creators and developers.

Agent Flow Creation Tutorial

Agentic Protocol Tutorial - How to Build AI Agent Teams

Register a customized LLM flow and publish it onto Citrea Network and Lighthouse storage

Quick Tutorial - Custom LLM Flow Registration

Agentic Protocol Tutorial - Register a customized LLM flow

  • Minting NFTs on Citrea Network:

    • Publish the chat flow definition and mint unique NFTs on the Citrea network.
    • By minting NFTs, creators establish ownership of their AI agents. These tokens serve as verifiable proof of authenticity.
    • Creators can monetize their agents by accepting token payments from users via an ERC20 contract. It’s a direct way to earn rewards for your work.
  • Storing Definitions on Filecoin:

    • The agent’s definition—the blueprint for your AI agent—is securely stored within Lighthouse, one of the Filecoin storage providers.
  • Agent Discovery and Tool Use:

    • Finally, a new chat flow acts like a tool for other agents after it is listed in the marketplace. It will be automatically discovered. LLMs can benefit from tool use to perform more complex tasks. Tools allow LLMs to trigger actions.

This decentralized approach ensures that ownership remains provable and immutable.

Agent Inference

The user prompt is transmitted to our marketplace, where the appropriate tool or tools are selected to fulfill the request.

  • Using Galadriel Network for zkML Proofs:
    • Once confirmed, our default gateway redirects the prompt to the Galadriel Network via Oracle. zkML inference is performed to validate the integrity of the inference.

Getting Started

Prerequisites

  • Docker installed on your system
  • Docker Compose installed on your system
  • Meta Mask extension installed on your web browser
  • A Galadriel devnet account. We recommend creating a new EVM account for development purposes.
  • Some Galadriel devnet tokens on the account you are using.
  • A Citrea devnet account for creating NFT
  • Some Citrea devnet tokens on the account you are using.
  • Create a Lighthouse API Key for uploading JSON file to FileCoin storage

Running the Project

  1. Clone the repository
git clone https://github.com/likaho/AgenticProtocol.git
  1. Go into individual directory, create .env file
  • Go into ai-app-builder/packages/server/ directory
cd AgenticProtocol/ai-app-builder/packages/server/
cp .env.example .env
  • Edit .env file

  • Set LIGHTHOUSE_API_KEY to an API key of Lighthouse storage account

  • Set PRIVATE_KEY to the private key of Citrea devnet account

  • Go into ai-app-builder/packages/ui/ directory

cd AgenticProtocol/ai-app-builder/packages/ui/
cp .env.example .env
  • Go into llm-proxy-server directory
cd AgenticProtocol/llm-proxy-server
cp .env.example .env
  • Go into llm-server directory
cd AgenticProtocol/llm-server
cp .env.example .env
  • Edit .env file
  • Set PRIVATE_KEY to the private key of Galadriel devnet account
  1. Start the apps and services:
cd AgenticProtocol
docker-compose up -d

You can now access the AI builder app on http://localhost:3031

And chat-ui on http://localhost:3000

🙋 Support

Feel free to ask any questions, raise problems, and request new features in discussion

🙌 Contributing

Thanks go to these awesome original creators of Flowise.ai

📄 License

Source code in this repository is made available under the Apache License Version 2.0.

About

Agentic Protocol

License:Apache License 2.0


Languages

Language:TypeScript 60.1%Language:JavaScript 33.9%Language:Python 2.6%Language:Solidity 2.4%Language:CSS 0.3%Language:Jupyter Notebook 0.3%Language:SCSS 0.2%Language:HTML 0.1%Language:Dockerfile 0.1%Language:Batchfile 0.0%