Quickstart Guide

Build and test your first METAOS agent in under 5 minutes.

1. Install the CLI

npm install -g @metaoslabs/cli

Or for local development:

git clone https://github.com/BilBillions/metaos-labs-site
cd metaos-labs-site/cli
npm install
npm link

2. Initialize Your Project

mkdir my-agent && cd my-agent
metaos init

This creates a metaos.json configuration file:

{
  "backendUrl": "http://localhost:3001",
  "authToken": null,
  "agents": []
}

💡 Add your JWT token: Get it from /v1/auth/signup or login, then add to authToken

3. Start the Backend (Local Testing)

In the backend directory, start the development server:

cd metaos-labs-site/backend
pnpm install
pnpm prisma:generate
pnpm start:dev

# Backend starts on http://localhost:3001/v1

Note: Requires PostgreSQL with pgvector. Configure backend/.env first.

4. Test Your First Agent

Run an agent with the CLI. The backend currently supports storage.write for demo purposes:

metaos agent run travel --intent notes.write "Trip to Paris - remember Eiffel Tower"

# Output:
# 🤖 Running agent: travel
# 📝 Intent: notes.write
# 📦 Args: Trip to Paris - remember Eiffel Tower
# 
# ┌─────────────────────────────────────┐
# │  ✅ Saved to notes                  │
# │  📁 Path: metaos://notes/travel...  │
# │  📊 Size: 43 bytes                  │
# └─────────────────────────────────────┘

5. Understanding the Zero-Trust Flow

Here's what happens when you run an agent:

  1. CLI sends HTTP POST to /v1/tools/call with JWT token
  2. Tool Gateway validates: Agent installed → Capability granted → Policy check
  3. Policy decides: ALLOW (read ops), REQUIRE_APPROVAL (writes), or DENY (dangerous)
  4. If allowed, executes tool and logs to audit table
  5. Returns result: {success:true, data:{...}}
  6. CLI displays formatted output card

🔧 Zero-Trust Tool Gateway

Every tool call flows through a 4-step validation pipeline:

  • 1. Agent Installation Check: Is the agent installed for this user?
  • 2. Capability Grant Check: Has the user granted this specific capability?
  • 3. Policy Evaluation: Does the policy engine allow/deny/require approval?
  • 4. Audit Logging: Every action logged with success/failure and metadata

Currently tested: 37 tests passing, 65%+ coverage on core services

6. Production Use

For production, update your metaos.json to point to the live backend:

{
  "backendUrl": "https://metaos-backend.onrender.com/v1",
  "authToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "agents": []
}

Get your JWT token from /v1/auth/login or the dashboard.

✅ What's Working Now

  • Agent Marketplace: Browse, install, and manage agents via UI
  • Capability Grants: Fine-grained permission control per agent (grant/revoke)
  • Zero-Trust Gateway: Policy evaluation with approval system
  • Audit Logs: Every action logged to database with full metadata
  • Real Embeddings: HuggingFace semantic search (no mocks!)
  • Test Coverage: 37 tests passing, 65%+ coverage

🚧 Coming Soon

  • More Tools: web.search, calendar.create, email.send, terminal.exec
  • Approval UI: Visual dashboard for pending approvals
  • Agent Analytics: Usage metrics and API call tracking
  • Voice Interface: Speech-to-text integration

Next Steps