Skip to content

255BITS/nearai

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NEAR AI

License: MIT Build Status Release PRs Welcome Telegram

NEAR AI is a distributed system for building, deploying, and managing AI agents with the goal of making open source and user-owned AGI.

NEAR AI Components

  • NEAR AI Hub: Central hub for model serving, agent registry, and running agents
  • TEE Runner: Confidential execution environment for NEAR AI agents and inference
  • AWS Runner: Lambda-based execution environment for NEAR AI agents
  • Agent System: Build and run AI agents with built-in tools and environment isolation
  • Worker System: Distributed job execution and scheduling
  • Model Fine-tuning: Support for fine-tuning LLMs

Directory Structure

nearai/
├── aws_runner/          # Lambda-based AI agent execution
│   ├── Dockerfile         # Container for running agents
│   └── frameworks/        # Framework-specific requirements
├── hub/                 # Central hub for registering and running agents and models
│   ├── alembic/           # Database migrations
│   └── api/               # API endpoints
├── nearai/              # Core library
│   ├── agents/            # Agent system implementation
│   │   ├── agent.py         # Base agent class
│   │   └── environment.py   # Agent environment
│   ├── cli.py             # Command-line interface
│   └── config.py          # Configuration management
├── worker/              # Distributed job execution
├── etc/                 # Configuration and setup
│   ├── finetune/          # Model fine-tuning configs
│   └── hosts_lambda.txt   # Cluster configuration
└── e2e/                 # End-to-end tests

Agent Creation Quick Start

Requirements


Installation

pip
python3 -m pip install nearai

Verify installation:

nearai version
local
git clone [email protected]:nearai/nearai.git && cd nearai && ./install.sh

Or, to install to a virtual environment with poetry:

python3 -m uv sync
uv run nearai version

Or you can use pip:

python3 -m pip install -e .

Verify installation:

nearai version

Log In

Login to NEAR AI with your NEAR Account. If you don't have one, you can create one here.

Currently supported NEAR wallets:

  • My NEAR Wallet
  • Sender
  • Meteor
  • Bitte
nearai login 

Useful Commands

  1. Create an agent:
nearai agent create
  1. Run agent locally:
nearai agent interactive
  1. Deploy to NEAR AI Developer Hub:
nearai registry upload <path-to-agent>

Documentation

Updating

cd nearai
git pull
python3 -m pip install -e .  # If dependencies changed

Contributing

Want to help shape the future of AI? Join our community and contribute! 🚀

Check out our contributing guide to get started.

Releases

No releases published

Packages

No packages published

Languages

  • Python 71.8%
  • TypeScript 25.2%
  • SCSS 0.9%
  • Shell 0.8%
  • JavaScript 0.5%
  • HTML 0.3%
  • Other 0.5%