hackquest logo

Pharos Agent Kit

Pharos Agent Kit is a comprehensive toolkit designed to simplify AI agents' interactions with Pharos blockchain

Videos

Description


NPM Package : https://www.npmjs.com/package/pharos-agent-kit


๐Ÿค– Empowering AI Agents with Blockchain Capabilities ๐Ÿ”—

๐Ÿš€ An open-source toolkit for connecting AI agents to Pharos protocols. Now, any agent, using any model can autonomously perform various Pharos Blockchain actions:

โœจ Key Features

  • ๐Ÿ’ฐ Check ETH balance

  • ๐Ÿ”„ Check ERC20 token balances

  • ๐Ÿ’ธ Transfer ETH or ERC20 tokens

  • ๐Ÿ“Š Get token pricing data

  • ๐Ÿ“ˆ Fetch trending tokens

  • ๐Ÿ“‰ Monitor market movements

  • ๐Ÿฆ Access DeFi protocols

  • ๐ŸŽฏ And more...


๐ŸŒ Anyone can bring their AI agents trained with any model and seamlessly integrate with Pharos blockchain.

๐Ÿ”ง Core Blockchain Features

๐Ÿ’Ž Token Operations

  • ๐Ÿ’ณ Check ERC20 token balances

  • ๐Ÿ’ฑ Transfer ERC20 tokens

๐Ÿ“Š Market Data Integration

  • ๐ŸฆŽ CoinGecko Pro API integration

  • โšก Real-time token price data

  • ๐Ÿ“ˆ Trending tokens and pools

  • ๐Ÿš€ Top gainers analysis

  • ๐Ÿ” Token information lookup

๐Ÿฆ DeFi Data Access

  • ๐Ÿ“Š Protocol TVL tracking with DeFiLlama

  • ๐Ÿ’น Price feeds and aggregation

  • ๐Ÿ“‰ Token trading data

๐ŸŒ Social Data

  • ๐Ÿค– Elfa AI social media insights

  • ๐Ÿ“Š Trending tokens by social activity

  • ๐Ÿ“ฑ Smart mentions tracking

  • ๐Ÿ‘ฅ Social account analysis

๐Ÿค– AI Integration Features

๐Ÿ”— LangChain Integration

  • ๐Ÿ› ๏ธ Ready-to-use LangChain tools for blockchain operations

  • ๐ŸŽฏ DynamicStructuredTool-based implementation

  • โœ… Zod schema validation

  • ๐Ÿ›ก๏ธ Comprehensive error handling

๐Ÿš€ Vercel AI SDK Integration

  • ๐Ÿ”Œ Vercel AI SDK for AI agent integration

  • ๐ŸŒ Framework agnostic support

  • โšก Quick and easy toolkit setup

๐Ÿ“ก MCP Integration

  • ๐Ÿค Support for the Model Context Protocol

  • ๐Ÿ—๏ธ Action-based architecture

  • ๐Ÿ“ Structured schema definitions

๐ŸŽจ AI Tools

  • ๐ŸŽจ DALL-E integration for image generation

  • ๐Ÿ—ฃ๏ธ Natural language processing for blockchain commands

  • ๐Ÿ“Š Price feed integration for market analysis

๐Ÿ“ฆ Installation

npm install pharos-agent-kit

๐Ÿš€ Quick Start

import { PharosAgentKit, createPharosTools } from "pharos-agent-kit";

// Initialize with private key and optional RPC URL
const agent = new PharosAgentKit(
  "your-wallet-private-key",
  "https://rpc-url.example.com",
  { OPENAI_API_KEY: "your-openai-api-key" } // optional config
);

// Create LangChain tools
const tools = createPharosTools(agent);

๐Ÿ“š Dependencies

The toolkit relies on several key libraries:

  • ๐Ÿ”ง viem for blockchain interactions

  • ๐Ÿค– @langchain/core for AI agent tools

  • โœ… zod for schema validation

  • ๐ŸฆŽ CoinGecko API for market data

Progress During Hackathon

๐Ÿšง Progress During the Hackathon During the hackathon, I successfully implemented full integration with the Pharos Blockchain through the PharosAgentKit. This included: - โœ… Developed and deployed core functionalities for: - ๐Ÿ” Checking native and ERC-20 token balances - ๐Ÿ’ธ Transferring ETH and ERC-20 tokens - ๐Ÿ“Š Fetching real-time token prices via CoinGecko - ๐Ÿ“ˆ Tracking trending tokens and market data - ๐Ÿฆ Accessing DeFi TVL and protocol data from DeFiLlama - ๐Ÿ“ฑ Integrating social insights via Elfa AI - โš™๏ธ Built developer-friendly interfaces using: - ๐Ÿง  LangChain tools (via DynamicStructuredTool) - ๐Ÿงช Zod for input validation - ๐Ÿ“ฆ Seamless integration with Vercel AI SDK and Model Context Protocol (MCP) - ๐Ÿค– Designed the system to be model-agnostic, allowing any AI agent to interact with Pharos onchain via natural language commands. - ๐Ÿงช Thoroughly tested all functions and documented how developers can extend the toolkit with custom tools and actions. - ๐Ÿš€ Overall, this work delivers a production-ready SDK that opens up the Pharos Blockchain to the AI agent ecosystem.

Tech Stack

Node
Web3
Ethers
Solidity
Rust
Typescript
Pharos
Langchain

Fundraising Status

๐Ÿ’ฐ Fundraising Status We are actively seeking funding to accelerate the development and adoption of the PharosAgentKit. Weโ€™re open to angel investors, VCs, and ecosystem grants aligned with our mission.