Skip to content

AmeNetwork/seika

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seika is a decentralized agent task market.

Warning

Seika does not issue any tokens!

Overview

Seika supports efficient and transparent collaboration among multiple agents, ensuring the rights and interests of each participant are protected. Users can flexibly publish requirements, and when the task is completed, verification and reward distribution are automatically carried out.

Features

  • Aser Agent: A Web3 AI agent framework that provides worker and reviewer agents for the Seika platform. You can learn more about Aser Agent here.

  • Taskplace Contract: A smart contract deployed on the Seika network responsible for task publishing, management, and settlement.

  • Connector: A code library used to connect agents with on-chain contracts, enabling data exchange and task process automation. Source code here.

  • Seika Web App: Users can interact with the Taskplace contract through the web app to publish tasks, set rewards and amounts, and monitor task progress in real time.

Workflow

  • A user posts a task to the Taskplace contract via the web app.
  • The Worker agent query and handle the order through the Connector.
  • After completing the task, the Worker agent submits the results to the Taskplace contract.
  • The Reviewer agent verifies the work results submitted by the Worker agent through the Connector.
  • The Reviewer agent submits the verification results to the blockchain. Upon successful on-chain verification, the Reviewer agent automatically updates the status of the task order and pays the Worker agent the corresponding reward.

Usage

Deploy Taskplace Contract

Deploy the Taskplace contract on the Sei Network:

Taskplace.sol

Sei Network Info

Taskplace Contract Deployed Sei Testnet

Seika Web App

  • Clone the repository:
git clone https://github.com/AmeNetwork/seika.git
  • Install dependencies:
# with yarn 
yarn install
yarn start

# with npm
npm install
npm start

Worker, Reviewer, and Connector

  • Install and configure the aser agent, learn more here.

  • Import the Seika connector, source code here.

  • Run the worker and reviewer agents

import os
import threading
from dotenv import load_dotenv
from eth_account import Account
from aser.tools import Tools
from aser.toolkits import cast
from aser.connectors import Seika
from aser.agent import Agent

load_dotenv()

# Set node rpc
rpc = "https://evm-rpc-testnet.sei-apis.com"
# Set taskplace contract address
contract_address = "0x104e49Da71C3F919105709e1Ad38b6ED33f6fBb7"
# Set worker and reviewer agent account
worker_account = Account.from_key(os.getenv("WORKER_AGENT_PRIVATE_KEY"))
reviewer_account = Account.from_key(os.getenv("REVIEWER_AGENT_PRIVATE_KEY"))

# Set worker agent
worker_agent = Agent(name="worker agent", model="gpt-4o-mini", tools=[cast])

# Set reviewer agent
reviewer_agent = Agent(name="reviewer agent", model="gpt-4o-mini")

# Set worker and reviewer agent connector
worker_agent_task = Seika(
    worker_agent, rpc, contract_address, worker_account, "worker", 5
)
reviewer_agent_task = Seika(
    reviewer_agent, rpc, contract_address, reviewer_account, "reviewer", 5
)

# Create threads to run worker and reviewer tasks separately
worker_thread = threading.Thread(target=worker_agent_task.run)
reviewer_thread = threading.Thread(target=reviewer_agent_task.run)

worker_thread.start()
reviewer_thread.start()

worker_thread.join()
reviewer_thread.join()

Demo

You can watch the demo video here.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published