Skip to content

Liuhaai/quicksilver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quicksilver: Building Sentient AI with DEPIN Networks

License GitHub stars GitHub forks GitHub last commit TypeScript

Quicksilver is a framework designed to bridge the gap between Large Language Models (LLMs) and DEPIN networks for enhanced building sentient AI and agents.

input-ezgif com-video-to-gif-converter

Key Concepts

  • LLM (Large Language Model): An interface representing the LLM interaction. (Replace with your actual LLM integration, e.g., OpenAI, Gemini).
  • Tools: Custom modules for specific functionalities (e.g., API calls, data processing).
  • Memory: A component for storing and retrieving conversation history or context.
  • Workflow: The core logic that orchestrates interaction between the LLM, tools, and memory.
  • Agent: The main class that uses the workflow to handle user requests.

Project Structure

  • dist/: Compiled output (generated by tsc)
  • example/binoai.ts: Example usage
  • node_modules/: Node.js dependencies
  • src/agent.ts: Main agent logic
  • src/llm.ts: LLM interface and implementations
  • src/memory.ts: Memory management
  • src/tools/api_tool.ts: Base API tool class
  • src/tools/newsapi.ts: News API tool
  • src/tools/tool.ts: Tool interface
  • src/tools/weatherapi.ts: Weather API tool
  • src/workflow.ts: Logic for interaction orchestration
  • src/index.ts: Exports from src
  • .gitignore: Files to ignore in Git
  • package-lock.json: Lockfile for dependencies
  • package.json: Project configuration
  • README.md: Project documentation
  • tsconfig.json: TypeScript configuration

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone [https://github.com/your-username/quicksilver.git](https://github.com/your-username/quicksilver.git)
  2. Install dependencies:

    npm install

Configuration

  1. (Optional) Configure Environment Variables:

    Create a .env file in the root of your project and add your API keys:

    OPENAI_API_KEY=your_openai_api_key
    NUBILA_API_KEY=your_nubila_api_key
    NEWSAPI_API_KEY=your_newsapi_api_key
    

Running the Example

npx ts-node example/binoai.ts # Or node dist/example/binoai.js after compiling with tsc
Example Usage (example/binoai.ts)

Example Usage (example/binoai.ts)

import { OpenAILLM, Agent, SimpleMemory, NewsAPITool, WeatherTool, Tool } from '../src';
import * as dotenv from 'dotenv';
dotenv.config();

async function runBinoai() {
    // ... (LLM, API Key retrieval, tool instantiation, etc.)

    const inputs = [
        "What is the weather like?",
        "What are today's top headlines?",
        "Give me an update on the weather and some headlines.",
    ];

    for (const input of inputs) {
        console.log(`User Input: ${input}`);
        try {
            const response = await agent.run(input);
            console.log(`Binoai Response:\n${response}`);
        } catch (error) {
            console.error(`Binoai Error:`, error);
        }
        console.log("----");
    }
}

runBinoai();

Next Steps

  • Integrate a real DEPIN network: This is the core of Quicksilver's future vision. Research and implement a suitable DEPIN network integration.
  • Implement advanced memory types: Explore alternatives to SimpleMemory, such as conversation buffers or vector databases.
  • Develop more custom tools: Create tools for other functionalities, such as calendar access, task management, or data analysis.
  • Enhance the workflow: Improve the agent's decision-making logic to better utilize available tools.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 62.0%
  • JavaScript 38.0%