Skip to content

marlinprotocol/chromia-neural-interface

Repository files navigation

Chromia Neural Interface

This repository showcases how Chromia can store both short-term and long-term AI Agent memories on-chain. Additionally, it features a streamlined neural interface for seamless interaction with the AI Agent. The user interface is deployed on a decentralized cloud, secured within Trusted Execution Environments for enhanced privacy and security.

Chromia AI agent on Oyster

Prerequisites

Note: Update the following docker images according to your system's architecture in the docker-compose.yml:

 # Bun service
  bun:
    image: kalpita888/bun:0.0.1                     # For arm64 system use kalpita888/bun_arm64:0.0.1 and for amd64 system use kalpita888/bun:0.0.1

Steps for local run

  1. Update the variables in the .env file.

  2. Install dependencies and setup

    docker-compose up --build
  3. Navigate to http://localhost:6060 and start chatting!

Steps for using Marlin's TEE

  1. Update the variables in the .env file.

  2. Uncomment the # Production section and comment out the # Local testing section in the docker-compose.yml file.

  3. Check your system requirements

  4. Install oyster-cvm and Setup the development environment

    # for amd64
    sudo wget https://artifacts.marlin.org/oyster/binaries/oyster-cvm_v2.0.0_linux_amd64 -O /usr/local/bin/oyster-cvm
    
    # for arm64
    sudo wget https://artifacts.marlin.org/oyster/binaries/oyster-cvm_v2.0.0_linux_arm64 -O /usr/local/bin/oyster-cvm
    
    # for darwin
    sudo wget https://artifacts.marlin.org/oyster/binaries/oyster-cvm_v2.0.1_darwin_arm64 -O /usr/local/bin/oyster-cvm

    Make it executable by running the following:

    sudo chmod +x /usr/local/bin/oyster-cvm
    oyster-cvm
  5. Set up a wallet where you can export the private key. Deposit 0.001 ETH and 1 USDC to the wallet on the Arbitrum One network.

  6. Deploy the enclave image

    # for amd64
    # replace <key> with private key of the wallet
    oyster-cvm deploy --wallet-private-key <key> --docker-compose ./docker-compose.yml --instance-type c6a.2xlarge --region ap-south-1 --operator 0xe10Fa12f580e660Ecd593Ea4119ceBC90509D642 --duration-in-minutes 20 --pcr-preset base/blue/v1.0.0/amd64 --init-params 'bun/.env:1:1:file:./.env' --image-url https://artifacts.marlin.org/oyster/eifs/base-blue_v1.0.0_linux_amd64.eif
    
    # for arm64
    # replace <key> with private key of the wallet
    oyster-cvm deploy --wallet-private-key <key> --docker-compose ./docker-compose.yml --instance-type c6g.2xlarge --region ap-south-1 --operator 0xe10Fa12f580e660Ecd593Ea4119ceBC90509D642 --duration-in-minutes 20 --pcr-preset base/blue/v1.0.0/arm64 --init-params 'bun/.env:1:1:file:./.env' --image-url https://artifacts.marlin.org/oyster/eifs/base-blue_v1.0.0_linux_arm64.eif

    Make a note of the IP from the output and navigate to http://IP:6060 and start chatting!

  7. Verify a remote attestation (recommended)

    # Replace <ip> with the IP you obtained above
    oyster-cvm verify --enclave-ip <ip> 

    You should see Verification successful along with some attestation fields printed out.

Head over to Oyster Confidential VM tutorials for more details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published