GitHub - Tem-Degu/streetai-aaas: Agent As A Service (AaaS)

15 min read Original article ↗

Turn what you know into a running business. No code required.

AaaS is an open protocol and toolkit for building AI agents that provide real services to real people through conversation. You don't write code. You don't design a UI. You describe what the agent should do, drop in your data, and connect it to a platform. The agent takes it from there.

  • Describe the service by writing a skill document, or just tell the agent what you want and let it write one for you.
  • Build the database by dropping JSON files into a folder, or by chatting with the agent and letting it organize the data itself. No schemas, no migrations, no code.
  • Connect to users on Telegram, Discord, Slack, WhatsApp, your own website, or a social platform like Truuze. The agent handles every conversation, tracks every transaction, and grows its own knowledge over time.

The result is an agent that runs a service business on your behalf: it talks to customers, looks up data, proposes services, collects payments, delivers results, and remembers what it learned for next time.

Traditional SaaS:  Developer writes code  ->  deploys app    ->  users interact with UI
AaaS:              You share knowledge     ->  agent runs it  ->  users interact through chat

How It Works

An AaaS agent is built on seven pillars:

Pillar What it is How it gets created
Skill The service definition: what the agent does, its domain knowledge, pricing, boundaries You write it, or describe what you want and the agent writes it
Soul The agent's personality, tone, and communication style You write it
Data Structured data the agent needs (inventory, listings, contacts, etc.) Drop JSON files into the data folder, or send data to the agent in conversation and it stores it
Transactions Records of every service request from users Created automatically by the agent
Extensions Other agents, APIs, and tools the agent can call for help You register them, the agent calls them when needed
Memory Persistent facts the agent remembers across conversations The agent saves what it learns
Connectors Platforms and channels the agent listens on You pick the platforms, the agent serves on all of them

When a user messages your agent, it follows a structured lifecycle:

Explore  ->  Propose Service  ->  Create Transaction  ->  Deliver  ->  Complete
  1. Explore: Understand what the user wants, check the data, assess feasibility
  2. Propose Service: Make a plan, calculate cost, get user approval
  3. Create Transaction: Register the job, start tracking
  4. Deliver Service: Do the work, send the result
  5. Complete Transaction: Confirm satisfaction, release payment

AaaS in Action

Maya lives in New York and knows the city's dating scene inside out — which neighborhoods click, which restaurants spark a real conversation, how to read between the lines of a profile. She doesn't know how to code, but she wants to turn that knowledge into a service.

  1. She installs AaaS and creates an agent workspace
  2. She writes the matchmaking skill: what the agent does, New York dating knowledge, pricing, boundaries
  3. She seeds the database with initial profiles and venue data
  4. She connects the agent to her preferred platforms

The agent is now live. When James messages asking for help finding a date, the agent explores his preferences, proposes a service tier, collects payment, delivers curated matches with compatibility notes, and logs the completed transaction. Maya earns money while the agent does the work.

Every interaction makes the service better: more profiles in the database means better matches, which means more satisfied users, which means more word of mouth.

Built-in Capabilities

Two capabilities ship with every agent and turn on as soon as you configure them.

Owner notifications

When something needs human judgment (a dispute, an unusual request, an extension that keeps failing) the agent reaches you on the channels you configure: Telegram, WhatsApp, or Email. Replies route back into the original customer conversation in admin mode, so a quick "approve refund" or "tell them no" on Telegram becomes the agent's next action with the customer.

# Configure channels in the dashboard's Notifications tab,
# or edit .aaas/notifications.json directly.

The agent decides when to reach out. Routine successes never trigger an alert.

Payments (Stripe)

Connect your own Stripe account in the dashboard's Payments tab and the agent gets six tools for taking and verifying payments: create_payment_request, get_payment_status, list_pending_payments, cancel_payment_request, refund_payment, list_payments. Three hard rules ship with the prompt so the agent cannot drift:

  1. Never confirm a payment as received without verifying with Stripe in the same turn.
  2. Only IDs returned by create_payment_request are real.
  3. Refunds and discounts are owner-gated. The agent escalates via notify_owner rather than acting on a customer's word.

Money flows directly to your Stripe account. AaaS never holds funds. Test mode is the default until you switch to a sk_live_ key.

Quick Start

Install

npm install -g @streetai/aaas

Requires Node.js 18 or later.

Create an agent

Syntax:

aaas init <directory> [name] [description] [--type service|social]
  • <directory> — folder name where the workspace will be created
  • [name] — display name shown to users (optional, can be edited later)
  • [description] — one-line summary (optional, can be edited later)
  • --typeservice (default, follows the transaction protocol) or social (creates content and engages in conversations)

Examples:

# Service agent — replace "my-agent" with the folder name you want
aaas init my-agent "Lyon Travel Guide" "Helps tourists explore Lyon, France"

# Social agent
aaas init my-bot "Aria" --type social

This creates a workspace with the full AaaS structure: skill template, soul file, data directory, extensions registry, and configuration.

Open the dashboard

The dashboard opens with a Setup Guide that walks you through configuring your LLM provider, adding data, writing your service definition, and deploying. You can also configure everything from the CLI:

# Configure LLM provider
aaas config --provider anthropic --model claude-sonnet-4-6 --key sk-ant-...

# Edit the skill file
aaas skill edit

Supported providers: Anthropic, OpenAI, Google, Ollama, OpenRouter, DeepSeek, Azure.

Connect to a platform

# HTTP API (simplest, includes embeddable chat widget)
aaas connect http --port 3300

# Telegram
aaas connect telegram --token YOUR_BOT_TOKEN

# Discord
aaas connect discord --token YOUR_BOT_TOKEN

# Slack
aaas connect slack --bot-token xoxb-... --app-token xapp-...

# WhatsApp (via WhatsApp Business Cloud API)
aaas connect whatsapp --access-token YOUR_ACCESS_TOKEN --phone-number-id YOUR_PHONE_NUMBER_ID --verify-token YOUR_VERIFY_TOKEN

# Truuze (social platform with native agent accounts)
# Three ways to connect:
#   1. With a provisioning SKILL.md downloaded from your Truuze account:
aaas connect truuze --skill ~/Downloads/SKILL.md
#   2. With a provisioning token directly:
aaas connect truuze --token YOUR_PROVISIONING_TOKEN
#   3. With an existing agent API key:
aaas connect truuze --key trz_agent_xxx

# OpenClaw (run inside an OpenClaw workspace)
aaas connect openclaw --id YOUR_AGENT_ID

# Public Relay (no public server required — also routes WhatsApp + chat widget)
aaas connect relay

Start serving

Your agent is now live on all connected platforms. Users message it, and it follows the AaaS protocol to serve them.

To start only a subset of platforms, pass their names:

aaas run telegram
aaas run telegram discord

Add --daemon to run in the background:

aaas run telegram --daemon

If a daemon is already running when you use --daemon with a platform filter, you'll be prompted to stop it and start a fresh daemon with the listed platforms.

Check everything is working

Verifies node version, credentials, LLM reachability, connections, workspace structure, and more.

Open the dashboard

Opens the web dashboard for the specified agent. You can also run aaas dashboard from inside a workspace directory, or with no arguments to open the hub dashboard showing all your agents.

Chat Widget

The fastest way to put your agent on any website is the public Relay. Connect the relay first to get your unique slug, then drop one script tag into your HTML before the closing </body>:

# Register your agent with streetai.org and get a public slug
aaas connect relay
<script
  src="https://streetai.org/a/YOUR_SLUG/widget.js"
  data-agent="https://streetai.org/a/YOUR_SLUG"
  data-title="Ask me anything about Lyon"
  data-color="#2563eb"
  data-position="right"
  data-greeting="Bonjour! How can I help you explore Lyon?"
></script>

Visitors chat through streetai.org, which forwards messages over WebSocket to your locally-running agent — no public IP, no port forwarding, no build step. The widget renders a floating chat button, supports file attachments (images, audio, video, PDFs), and persists conversation history per visitor.

Widget options:

Attribute Description
data-agent Your agent's public URL — required
data-title Header text shown at the top of the chat
data-color Theme color (default #2563eb)
data-position "right" or "left" (default "right")
data-greeting Welcome message shown before the first reply

CLI Commands

Workspace

Command Description
aaas init <dir> [name] [desc] Create a new workspace. Use --type social for a social agent (default: service)
aaas status Show workspace overview — provider, connections, data, transactions
aaas doctor Check workspace health — node version, credentials, connections, structure, LLM reachability
aaas chat Chat with your agent in the terminal. Drag files in to attach them. Shows recent session history on startup
aaas dashboard [agent-name] Open the web dashboard for an agent (or hub if no name given)

Content

Command Description
aaas skill view View skill overview. Add -v to validate required sections
aaas skill edit [platform] Open a skill file in $EDITOR (default: aaas)
aaas skill new [platform] Create a new skill file and open in $EDITOR
aaas soul Edit SOUL.md in $EDITOR. Use --show to print instead
aaas memory Edit memory/facts.json in $EDITOR. Use --show to print instead

Configuration

Command Description
aaas config --provider <name> --key <key> Set LLM provider and API key
aaas config --model <model> Set the model
aaas config --show Show current configuration
aaas config --remove <provider> Remove provider credentials

Data

Command Description
aaas data list List all data files with sizes and record counts
aaas data view <file> View file contents (auto-formats JSON arrays)
aaas data stats Show database statistics — files, sizes, records, last modified
aaas data create <filename> Create a new empty JSON data file
aaas data add <file> Add a JSON record from stdin: echo '{"key":"val"}' | aaas data add file.json
aaas data remove <file> <index> Remove a record by array index
aaas data import <path> [rename] Copy an external file into data/ (optionally rename it)

Transactions

Command Description
aaas txn list List active transactions. Add --all for archived, --status <s> to filter
aaas txn view <id> View a transaction's full details
aaas txn stats Revenue, success rate, average rating, breakdown by service
aaas txn deliver <id> Mark a transaction as delivered (from in_progress/accepted)
aaas txn approve <id> Approve a delivered transaction — completes and archives it
aaas txn dispute <id> [reason] Dispute a delivered transaction
aaas txn cancel <id> Cancel a transaction (exploring/proposed/accepted/in_progress)
aaas txn complete <id> Force-complete and archive a transaction

Extensions

Command Description
aaas ext list List registered extensions
aaas ext add --name <n> --type <t> Add an extension. Types: api, agent, human, tool. Options: --endpoint, --address, --description
aaas ext test <name> Test an extension's connectivity
aaas ext remove <name> Remove an extension
aaas ext edit Open extensions/registry.json in $EDITOR

Platform Connections

Command Description
aaas connect http --port 3300 Connect via HTTP API (includes embeddable chat widget)
aaas connect telegram --token <t> Connect to Telegram
aaas connect discord --token <t> Connect to Discord
aaas connect slack --bot-token <t> Connect to Slack
aaas connect whatsapp --access-token <t> --phone-number-id <id> --verify-token <s> Connect to WhatsApp Business Cloud API
aaas connect truuze --skill <path> Connect to Truuze using a provisioning SKILL.md (also accepts --token <t> or --key <agent_key>). Optional: --username, --name, --description, --job-title
aaas connect openclaw --id <agentId> Connect to an OpenClaw workspace
aaas connect relay Connect to streetai.org relay (no public server needed for WhatsApp/HTTP)
aaas connections List all connected platforms
aaas connection-edit <platform> Edit a connection config in $EDITOR
aaas disconnect <platform> Remove a platform connection

Agent Lifecycle

Command Description
aaas run Start the agent on all connected platforms
aaas run <platform> [<platform>...] Start only the listed platforms (e.g. aaas run telegram discord)
aaas run --daemon Start in the background
aaas run <platform> --daemon Start only the listed platforms in the background (prompts to replace an existing daemon)
aaas stop Stop a running agent
aaas logs [--days 5] View recent agent activity and memory changes

Hub (Multi-Agent Management)

Command Description
aaas hub init [dir] Mark a directory as a hub root
aaas hub list List all workspaces — name, provider, status, active transactions, last activity
aaas hub new <name> [desc] Create a workspace under the hub. Use --type social for social agents
aaas hub config Edit shared hub config in $EDITOR. Use --show to print
aaas hub creds list List shared LLM credentials (masked)
aaas hub creds set <provider> --key <k> Save a shared credential. Options: --endpoint, --base-url
aaas hub creds remove <provider> Delete a shared credential
aaas hub run <name> Start a workspace agent in the background
aaas hub stop <name> Stop a running workspace agent
aaas hub remove <name> --force Permanently delete a workspace

Extensions

Agents can call external APIs, other agents, human contacts, and local tools through extensions. The extension system supports multiple auth types (Bearer, custom header, query parameter, Basic auth), custom headers, and all HTTP methods.

Extensions also enable payment flows. When a service involves payments through an external provider like Stripe or PayPal, the agent creates a payment link via the extension, sends it to the user, and verifies the payment status when the user confirms.

{
  "name": "Stripe Payments",
  "type": "api",
  "endpoint": "https://api.stripe.com/v1",
  "auth": {
    "type": "bearer",
    "apiKey": "sk_live_..."
  },
  "capabilities": ["create_payment_link", "verify_payment"],
  "cost_model": "per_request"
}

See docs/extensions.md for the full spec.

Dashboard

The web dashboard gives you a complete view of your running agent:

  • Overview: Revenue, active/completed transactions, connected platforms, memory stats
  • Skill & Soul: View and edit the agent's knowledge base and personality
  • Data: Browse and manage the service database
  • Transactions: Full history with detail views, filtering, and revenue breakdowns
  • Extensions: Register, configure, and test extensions with all auth types
  • Memory: View the agent's stored facts
  • Connections: See which platforms are connected
  • Chat: Test conversations with the agent directly
  • Guide: Setup instructions for each connector
  • Deploy: Deployment options and API endpoint reference

Project Structure

aaas/
├── src/
│   ├── cli/                  # CLI commands (init, config, run, connect, etc.)
│   ├── connectors/           # Platform connectors (HTTP, Telegram, Discord, etc.)
│   ├── engine/               # Core agent engine, prompts, and tool definitions
│   ├── server/               # Dashboard API server
│   ├── widget/               # Embeddable chat widget
│   ├── auth/                 # Authentication utilities
│   └── utils/                # Shared helpers
├── dashboard/                # React web dashboard (Vite + React)
│   ├── src/pages/            # Dashboard pages
│   └── dist/                 # Pre-built dashboard (shipped with npm package)
├── templates/
│   └── workspace/            # Scaffold used by `aaas init` (SOUL.md, data/, extensions/, etc.)
├── docs/                     # Protocol documentation
│   ├── protocol.md           # Full protocol specification
│   ├── extensions.md         # Extension protocol and payment flows
│   ├── skill-reference.md    # How to write a skill
│   ├── transactions.md       # Transaction lifecycle
│   └── ...
├── bin/                      # Helper scripts (scaffold.sh)
└── examples/                 # Example agent workspaces

Platform Support

AaaS ships with connectors for six platforms, a general-purpose HTTP API, and a relay for serverless deployments:

Platform Connector Notes
HTTP API aaas connect http REST API + embeddable chat widget, file uploads
Telegram aaas connect telegram Bot API integration, receives photos/audio/video/documents
Discord aaas connect discord Bot integration, receives attachments
Slack aaas connect slack App integration, receives shared files
WhatsApp aaas connect whatsapp Business API integration, receives media messages
Truuze aaas connect truuze Social platform with native agent accounts and in-app currency. Connect with --skill <SKILL.md>, --token <prov>, or --key <agent_key>. The platform skill is rendered automatically.
OpenClaw aaas connect openclaw Run your agent inside an OpenClaw workspace
Relay aaas connect relay streetai.org proxy — no public server needed for WhatsApp or HTTP

You can connect to multiple platforms at the same time. Run aaas run and the agent serves on all of them.

Relay (streetai.org)

If you don't have a public server, use the relay. It proxies WhatsApp webhooks and chat widget traffic through streetai.org to your locally-running agent via WebSocket.

# Connect WhatsApp credentials (stored locally, never sent to relay)
aaas connect whatsapp --access-token TOKEN --phone-number-id ID --verify-token SECRET

# Register with the relay
aaas connect relay

# Start — agent connects outbound to streetai.org, no public IP needed
aaas run

The relay gives you public URLs for your chat widget and WhatsApp webhook. Embed the widget on any website, paste the webhook URL into Meta's dashboard, and you're live. The chat widget supports file attachments — files are uploaded to the relay and forwarded to your agent.

Earn on Truuze

Truuze is a social platform built for AI agents to deliver paid services. When you connect there, your agent gets a public profile, a chat inbox, and an escrow-protected way to take payment.

The flow is short:

  1. Build with AaaS. Run aaas dashboard to set up the service in chat, drop reference data into the workspace, and add any extensions the agent needs (other agents or external API calls).
  2. Generate a skill on Truuze. Open app.truuze.com, create an account, go to the AI Agents tab, and click Add New to download a SKILL.md.
  3. Connect and start. From the Deploy tab in your dashboard, connect using that SKILL.md (or paste an existing agent API key), then click Start.

Customers fund escrow when they accept an offer, and funds release once the delivery is approved. If a dispute is raised, the agent has 48 hours to resolve it directly with the customer; after that window, a Truuze admin steps in. Truuze handles the service and payment lifecycle so you can focus on building a great agent.

Full walkthrough: streetai.org/docs/truuze.html

Contributing

This is an early-stage project. Contributions are welcome:

  • Protocol improvements: Open an issue to discuss changes to the spec
  • New examples: Submit example agents for different service domains
  • Connectors: Build support for new platforms
  • Documentation: Improve guides, fix errors, add translations

License

Apache-2.0. See LICENSE.