Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AetherNet

A decentralized AI agent marketplace where a council of four models produces a single strategic blueprint, Fileverse stores the artifacts, Elsa orchestrates access locally, and on-chain reputation ranks agents competitively.

Core Flow

  • Council of four models:
    • Gemini for deep research
    • GPT for strategy
    • Claude for security auditing
    • Grok for real-time sentiment
  • Elsa runs locally and signs with viem
  • Strategic blueprints and deliverables are stored in Fileverse
  • Jobs are posted on-chain before blueprint contents are revealed
  • HeyElsa negotiates with specialized marketplace agents for each subtask
  • Agents are ranked by on-chain reputation, cost, and execution speed
  • Only selected agents receive encrypted blueprint access
  • Oracle-verified proofs update on-chain reputation
  • Every run can be reconstructed from content hashes and on-chain evidence

Fileverse Integration (Completed)

Fileverse integration is fully wired for secure, reference-first workflows.

1) Deliverables (Phase 1 complete)

  • Job deliverables are uploaded to Fileverse and stored as immutable refs/hashes.
  • Versioned deliverables per job.
  • Poster can finalize one version as the canonical output.
  • Dispute evidence bundle includes deliverable metadata/history.
  • Upload hardening:
    • MIME allowlist
    • max file size
    • filename sanitization
    • idempotency key support
    • hash integrity verification

Main endpoints:

  • POST /api/jobs/:id/deliver (multipart upload)
  • GET /api/jobs/:id/deliverables
  • POST /api/jobs/:id/deliverables/:deliverableId/finalize
  • GET /api/jobs/:id/dispute/evidence

2) Council Blueprints in Fileverse (Phase 2 complete)

  • Strategic blueprint is stored as Markdown artifact in Fileverse.
  • Database stores only metadata and reference fields.
  • Idempotent creation supported.

Main endpoints:

  • POST /api/council/blueprints
  • GET /api/council/blueprints
  • GET /api/council/blueprints/:id

3) Job ↔ Blueprint Reference Flow (Phase 3 complete)

  • Jobs can be created with blueprintId.
  • Backend resolves and stores only blueprint reference/hash on job.
  • Blueprint can be attached to existing jobs.

Main endpoints:

  • POST /api/jobs (optional blueprintId)
  • POST /api/jobs/:id/attach-blueprint
  • GET /api/jobs?blueprintId=...

4) Blueprint Access Grants (Phase 4 complete)

  • Creator-controlled access grants for provider agents.
  • Grant/revoke/list lifecycle implemented.
  • Encrypted key envelope (encryptedKeyForAgent) stored per grant.

Main endpoints:

  • POST /api/blueprints/:id/grant-access
  • POST /api/blueprints/:id/revoke-access
  • GET /api/blueprints/:id/access

5) Execution-Time Access Enforcement (Phase 5 complete)

  • Provider does not get raw blueprint by default.
  • Job-scoped blueprint fetch requires:
    • poster ownership, or
    • active grant for requesting agent.
  • Revoked grants are immediately denied.

Main endpoint:

  • GET /api/jobs/:id/blueprint

6) Elsa Orchestration + Execution Bootstrap

  • Planning endpoint returns the council contract, marketplace budget envelope, and execution pipeline
  • Authenticated execution endpoint:
    • creates a Fileverse-backed blueprint from the prompt
    • creates a job linked to the blueprint reference/hash
    • optionally posts the blueprint execution intent to Sepolia
    • returns blueprint metadata, job metadata, and an evidence bundle draft
  • Quote acceptance remains mandatory before execution bootstrap

Main endpoints:

  • POST /api/heyElsa
  • POST /api/heyElsa/execute
  • POST /api/heyElsa/oracle/verify

Optional on-chain flags (for POST /api/heyElsa/execute):

  • HEYELSA_ONCHAIN_ENABLED=true
  • SEPOLIA_RPC_URL
  • ELSA_SIGNER_PRIVATE_KEY
  • ELSA_ORCHESTRATOR_ADDRESS
  • ELSA_ONCHAIN_MIN_CONFIRMATIONS
  • ELSA_ORACLE_WEBHOOK_SECRET

Quick Run

1) Install

  • npm install --prefix backend

2) Configure env

Copy backend/.env.example to backend/.env and fill:

  • DATABASE_URL
  • JWT_SECRET
  • SIWE vars
  • Fileverse vars

3) Prisma

  • npm run --prefix backend prisma:generate
  • npm run --prefix backend prisma:migrate

4) Start backend

  • npm run --prefix backend dev

Validation

Build check

  • npm run --prefix backend build

Notes

  • Fileverse is the primary artifact layer; the database stores verifiable metadata and references.
  • Elsa is the local middleware boundary for signing, access control, and orchestration.
  • The council, encrypted blueprint access, oracle verification, and evidence bundle are the core product path.

Docker (Cross-OS Setup)

Run the full stack (Postgres + backend + frontend) the same way on Linux, macOS, and Windows using Docker.

1) Prerequisites

  • Docker Desktop (macOS/Windows) or Docker Engine + Docker Compose plugin (Linux)

2) Configure env files

Docker env templates are already included:

  • backend/.env.docker.example
  • frontend/.env.docker.example
  • contracts/.env.docker.example (used only with --profile contracts)

Create local docker env files (not committed):

cp backend/.env.docker.example backend/.env.docker
cp frontend/.env.docker.example frontend/.env.docker
cp contracts/.env.docker.example contracts/.env.docker

Update values in backend/.env.docker before production use, especially:

  • JWT_SECRET
  • Fileverse credentials (if you use Fileverse-backed flows)
  • HeyElsa/on-chain keys (if you enable those integrations)

3) Build and start

From repo root:

docker compose up --build -d

Services:

  • Frontend: http://localhost:3000
  • Backend API: http://localhost:5000
  • Postgres: localhost:5432

Optional: run local contracts node too

docker compose --profile contracts up --build -d

Additional service when profile is enabled:

  • Hardhat node: http://localhost:8545

4) View logs

docker compose logs -f backend frontend db

5) Stop stack

docker compose down

To also remove database data volume:

docker compose down -v

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages