Giter VIP home page Giter VIP logo

Arcmind Autonomous AI Agent

ArcMind AI brings Generative AI to organizations using Autonomous AI Agent and Vector DB running on Internet Computer blockchain, in a privacy-centric and decentralized way. It supercharges your AI workforce with increased LLM faithfulness powered by Chain of Thoughts & Long Term Memory.

Technically, ArcMind AI is a Long-Running Agent equipped with a primary main loop that can orchestrate various tools and memory stores to accomplish numerous sub-tasks that make up a larger task. Utilizing the power of LLMs such as GPT-3/4 or other open-source alternatives, these agents can retain both short-term and long-term memory for optimized task execution. For ArcMind, we leverage ArcMind Vector DB Canister as a long-term memory vector store for semantic search, enabling efficient and accurate task execution.

  • Every user will have their own suite of Canisters and long-term memory, that can be accessed by their NFID with ArcMindWeb
  • ArcMind AI can communicate with other Canister smart contracts to take action on behalf of users e.g connect to BeamFi smart contracts to stream payment to other users
  • Written in robust Rust language

Demo

User: Explain the benefits of Vitamin D for sleep

Chain of Thoughts Example 1

See the full demo screenshots of the question at samples

We also have a set of other sample Chain of Thoughts questions and responses in the samples folder for you to explore but they use the old Web UI. Simply download the mhtml file with mhtml extension and open it in your browser.

A full video demo is coming soon.

Prerequisites

cargo install cargo-audit

Quick Start

Setup Environment Variables

  1. OPENAI_API_KEY Register an OpenAI account and obtain the API key

  2. GOOGLE_API_KEY & GOOGLE_SEARCH_ENGINE_ID Follow the instructions to obtain the API key and search engine ID

  3. OWNER_PRINCIPAL

dfx identity get-principal
  1. BEAMFI_PRINCIPAL You can use the same principal as OWNER_PRINCIPAL for testing if you don't have BeamFi canister deployed.

  2. BILLING_KEY You can enter 1234567890 for testing.

ICP Ledger

Since ArcMind AI has BeamFi Stream Plugin to interact with BeamFi smart contracts, you need to set up the ICP Ledger locally.

Follow the instructions to set up the ICP Ledger locally: https://internetcomputer.org/docs/current/developer-docs/integrations/ledger/ledger-local-setup

We suggest using dfx-nns approach as it's easier to install.

Running locally

Once the environment variables and local ICP Ledger are all set up, you can run the following commands:

# Starts the replica, running in the background
dfx start --background

# Deploys controller and brain canisters to the local replica
./scripts/provision-instance.sh

The provision script will deploy a suite of canisters.

Diagrams

Architecture

Architecture

Chain of Thoughts Chain Of Thoughts

Canisters

ArcMind is composed of 4 canisters with a Main loop controller being the orchestrator and short-term memory store, a brain canister that connects to LLM e.g GPT3.5 / GPT-4, tools, Tools canister that can do Google Search and browse website, and a Vector DB canister that stores long-term memory.

  1. Main loop controller
  2. Brain connecting to LLM
  3. Tools
  4. Vector DB - Git submodule, an individual Github repository at ArcMind Vector

The brain canister could either connect to LLM remotely or locally hosted open-source LLM like LLama2 in the future.

Interacting with the canisters

All users interactions are done via Main loop controller canister. We have some sample shell scripts to interact with the controller but the best way is to use ArcmindWeb to interact with the canisters, which we will make open source soon for the community to contribute. We will provide instructions to run the web app locally.

Roadmap

  • Backend - Design and implement basic Autonomous AI Agent with primary-secondary canisters architecture that is solely controlled and owned by a user who can send basic commands, and run through the secondary canister connecting to external LLM models e.g GPT-4
  • Backend - Research and implement the Chain of Thoughts technique in the Primary Canister
  • Backend - Implement Web Agent as the first Autonomous AI Agent Tools
  • Backend - Research and implement primary canister as long-term VectorStore with Nearest Neighbours distance metric and indexing
  • Frontend - Develop basic webapp with NFID to interact with Autonomous AI Agent
  • Backend - Develop BeamFi Plugin to allow Autonomous AI Agent to send Beam payments to other ArcMind users
  • Payment - Integrate with Stripe payment with a subscription model so that early adopters can start paying for the service to create their own Autonomous Agent and Canisters and fund LLM and API services
  • DevOps - Implement an automated ArcMind AI instance provisioning system in GitHub Actions with Canisters and Stripe integration
  • Frontend - Show Goals History, and allow users to open and resume history chat from the existing goals
  • Backend - Self-hosted LLM models for improved performance and privacy
  • Backend/Frontend - Add a new Chain of Thoughts (Cof) command to allow ArcMind AI to ask user question, and prompt user to answer
  • Backend - Add ability to perform independent multi tasks in parallel e.g browser multiple websites and process at the same time
  • Efficient AI - Research on hosting open source Small Language Model (SLM) on Internet Computer for inferencing workflow to improve Chain of thoughts engine performance and user privacy
  • AI Safety - Create Supervisor AI companion to oversee Autonomous Agent (Chain of thoughts) to improve faithfulness and safety
  • AI Safety - Research on problem decomposition approach to encourage context independent reasoning
  • AI Safety - Introduce mentor agent for Cof agent to proactively seek help from when it needs, with a new set of commands and resources
  • AI Safety - Improve prompt engineering to introduce human values and ethics into the AI
  • Integration - Connect to Zapier and IFTTT to allow users to connect to other services and define their own commands for Chain of Thoughts process

Setting up Github Action CI / CD

Get the string using commands below then put it into Github Secrets. Note: Replace default by the identity name you need.

DFX_IDENTITY

awk 'NF {sub(/\r/, ""); printf "%s\\r\\n",$0;}' ~/.config/dfx/identity/default/identity.pem

DFX_WALLETS

cat ~/.config/dfx/identity/default/wallets.json

Update arcmindvector Git submodule to the latest

  • make sure arcmindvector Git project has the latest changes pushed to the main branch
  • update the submodule in the parent project arcmindai:
git submodule update --remote

License

See the License file for license rights and limitations (MIT).

Contributing

See CONTRIBUTING.md for details about how to contribute to this project.

Authors

Ideas, Code & Architecture: Henry Chan, [email protected], Twitter: @kinwo

References

arcmindai's Projects

arcmindai icon arcmindai

Arcmind Autonomous AI Agent powered by Dfinity's Internet Computer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.