Advancing Agent-Driven Protocol Development
Wei develops autonomous agents for blockchain protocol development and governance, focusing on creating specialized agents that participate in core development, protocol optimization, and governance processes within the Ethereum ecosystem.
- 📖 Vision & Mission - Lite Paper
- 📋 Internal Documentation - Nethermind Notion
- 💬 Telegram - @AgentWei
- 🔗 GitHub - Main Repository
This repository is a Rust workspace with two crates: crates/agent
and crates/indexer
.
- Rust toolchain: Install via
rustup
(https://rustup.rs
) - PostgreSQL 14+: Local or Docker (for running migrations)
- Example with Docker:
docker run --name wei-postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres:16
- Example with Docker:
- (Optional) sqlx-cli for managing migrations from the terminal:
cargo install sqlx-cli --no-default-features --features native-tls,postgres
- Ensure stable toolchain is installed and default:
rustup toolchain install stable && rustup default stable
- From the workspace root, fetch dependencies:
cargo fetch
- Build everything:
cargo build --workspace
- Build a single crate:
- Agent:
cargo build -p agent
- Indexer:
cargo build -p indexer
- Agent:
- Run a specific crate:
- Agent:
cargo run -p agent
- Indexer:
cargo run -p indexer
- Agent:
- All tests:
cargo test
- Per crate:
- Agent:
cargo test -p agent
- Indexer:
cargo test -p indexer
- Agent:
- Format:
cargo fmt --all
- Lint:
cargo clippy --workspace --all-targets -- -D warnings
- Note: The workspace denies
missing_docs
; add doc comments to public items to avoid build failures.
Each crate has its own migrations under crates/<crate>/migrations/
.
- Create databases (example):
createdb wei_agent
andcreatedb wei_indexer
(or use your preferred method)
- Run migrations via sqlx-cli:
- Agent:
export DATABASE_URL=postgres://postgres:postgres@localhost:5432/wei_agent
sqlx migrate run --source crates/agent/migrations
- Indexer:
export DATABASE_URL=postgres://postgres:postgres@localhost:5432/wei_indexer
sqlx migrate run --source crates/indexer/migrations
- Agent:
- Example
.env
for Agent:
todo
- Example
.env
for Indexer:
todo
Note:
- The binaries currently initialize logging and then wait for Ctrl+C. As services are implemented (API, DB pool, background tasks), they will use the above configuration and databases.