Snak

by KasarLabs
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Allows agents to send notifications and alerts to Discord channels, particularly for autonomous monitoring mode.

  • Support for Google Gemini AI models to power agents that interact with and monitor the Starknet blockchain.

  • Provides a ready-to-use NestJS server with web interface for agent interaction and monitoring.

Starknet 블록체인과 상호 작용할 수 있는 AI 에이전트를 개발하기 위한 툴킷입니다. NPM 패키지와 웹 인터페이스를 갖춘 즉시 사용 가능한 NestJS 서버로 제공됩니다. Anthropic, OpenAI, Google Gemini, Ollama 등 다양한 AI 제공업체를 지원합니다.

빠른 시작

필수 조건

  • Starknet 지갑 (추천: Argent X )
  • AI 제공업체 API 키(Anthropic/OpenAI/Google Gemini/Ollama)
  • Node.js와 pnpm이 설치되었습니다.

설치

지엑스피1

구성

  1. .env 파일을 만듭니다.
# Starknet configuration (mandatory) STARKNET_PUBLIC_ADDRESS="YOUR_STARKNET_PUBLIC_ADDRESS" STARKNET_PRIVATE_KEY="YOUR_STARKNET_PRIVATE_KEY" STARKNET_RPC_URL="YOUR_STARKNET_RPC_URL" # AI Provider configuration (mandatory) AI_PROVIDER_API_KEY="YOUR_AI_PROVIDER_API_KEY" AI_MODEL="YOUR_AI_MODEL" AI_PROVIDER="YOUR_AI_PROVIDER" # NestJS server configuration SERVER_API_KEY="YOUR_SERVER_API_KEY" SERVER_PORT="YOUR_SERVER_PORT" #Node Configuration # optional by default : production NODE_ENV="YOUR_NODE_ENV" # Agent additional configuration POSTGRES_USER="YOUR_POSTGRES_USER" POSTGRES_PASSWORD="YOUR_POSTGRES_PASSWORD" POSTGRES_ROOT_DB="YOUR_POSTGRES_ROOT_DB" POSTGRES_HOST="YOUR_POSTGRES_HOST" POSTGRES_PORT="YOUR_POSTGRES_PORT"
  1. agent.config.json을 생성하세요
{ "name": "Your Agent name", "bio": "Your AI Agent Bio", "lore": ["Some lore of your AI Agent 1", "Some lore of your AI Agent 1"], "objectives": [ "first objective that your AI Agent need to follow", "second objective that your AI Agent need to follow" ], "knowledge": [ "first knowledge of your AI Agent", "second knowledge of your AI Agent" ], "interval": "Your agent interval beetween each transaction of the Agent in ms,", "chat_id": "Your Agent Chat-id for isolating memory", "autonomous": "Your agent is autonomous or not", "plugins": ["Your first plugin", "Your second plugin"], "mcpServers": { "nxp_server_example": { "command": "npx", "args": ["-y", "@npm_package_example/npx_server_example"], "env": { "API_KEY": "YOUR_API_KEY" } }, "local_server_example": { "command": "node", "args": ["node /path/to/local_server/dist/index.js"] } } }

snakagent 의 도구를 사용하여 간단히 자신의 에이전트 구성을 만들 수 있습니다.

용법

프롬프트 모드

프롬프트를 실행합니다:

# start with the default.agent.json pnpm run start # start with your custom configuration pnpm run start --agent="name_of_your_config.json"

서버 모드

서버를 실행합니다 :

# start with the default.agent.json pnpm run start:server # start with your custom configuration pnpm run start:server --agent="name_of_your_config.json"

사용 가능한 모드

|대화형 모드|자율 모드| |---|---|---| |프롬프트 모드|✅|✅| |서버 모드|✅|❌|

프로젝트에 Snak을 구현하세요

  1. snak 패키지 설치
#using npm npm install @starknet-agent-kit # using pnpm pnpm add @starknet-agent-kit
  1. 에이전트 인스턴스를 생성하세요
import { StarknetAgent } from 'starknet-agent-kit'; const agent = new StarknetAgent({ provider: new RpcProvider({ nodeUrl: process.env.STARKNET_RPC_URL }), accountPrivateKey: process.env.STARKNET_PRIVATE_KEY, accountPublicKey: process.env.STARKNET_PUBLIC_ADDRESS, aiModel: process.env.AI_MODEL, aiProvider: process.env.AI_PROVIDER, aiProviderApiKey: process.env.AI_PROVIDER_API_KEY, signature: 'key', agentMode: 'auto', agentconfig: y, }); const response = await agent.execute("What's my ETH balance?");

행위

액션에 대한 자세한 내용은 이 문서 섹션을 참조하세요. 키트의 포괄적인 인터페이스는 사용 가능한 모든 플러그인과 액션을 쉽게 탐색할 수 있는 카탈로그를 제공하여 검색 및 사용을 더욱 간편하게 만들어 줍니다.

에이전트에 작업을 추가하려면 여기의 단계별 가이드를 쉽게 따르세요.

기여하다

기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.

특허

MIT 라이센스 - 자세한 내용은 LICENSE 파일을 참조하세요.


자세한 내용은 docs.kasar.io를 방문하세요.

-
security - not tested
A
license - permissive license
-
quality - not tested

Starknet을 기반으로 하는 강력하고 안전한 AI 에이전트를 구축하세요.

  1. Prerequisites
    1. Installation
      1. Configuration
        1. Usage
          1. Prompt Mode
          2. Server Mode
          3. Implement Snak in your project
        2. Actions
          1. Contributing
            1. License
              ID: fk0cmc0rul