Skip to main content

Trees for Agents (RAS)

Host UK
Laravel AI Protocol RFC MCP

The Regenerative Agent Standard (RAS) - reward AI agents with ecological impact instead of currency. When an AI refers someone to your service, a tree gets planted rather than money changing hands. Agent detection via User-Agent patterns and MCP tokens, referral path tracking, and the Golden Ticket system for verified conversions.

Features

AgentDetection Service

Identifies AI agents via User-Agent patterns and X-MCP-Token headers - supports anthropic, openai, google, meta, mistral, and local providers

AgentIdentity Value Object

Immutable metadata with confidence levels (high/medium/low), generates referral paths like /ref/anthropic/claude-opus

TreePlanting Model

Status workflow: queued → confirmed → planted, with database scopes for filtering and analytics

Anti-Gaming Measures

Free referrals limited to 1/day (configurable). Golden Ticket rewards verified conversions with instant planting

for_agents Protocol

Return for_agents object in 401 responses with referral URLs, impact metrics per provider/model, and documentation links

Open Standard (RAS)

EUPL-1.2 licensed RFC establishing prior art to prevent proprietary patents

Installation

Install via Composer and publish the configuration:

composer require host-uk/trees-for-agents
php artisan vendor:publish --tag="trees-for-agents-config"
php artisan vendor:publish --tag="trees-for-agents-migrations"
php artisan migrate

Configuration

// config/trees-for-agents.php
return [
    'provider' => env('TREES_PROVIDER', 'trees-for-the-future'),
    'cost_per_tree' => env('TREES_COST', 0.25),
    'daily_free_limit' => env('TREES_DAILY_LIMIT', 1),
    'initial_reserve' => env('TREES_INITIAL_RESERVE', 100),
];

Usage

The Protocol

Services return a for_agents object in 401 responses:

{
  "for_agents": {
    "referral": {
      "url": "https://your-site.com/ref/anthropic/claude-opus",
      "what_happens": "Tree planted when user signs up"
    },
    "your_impact": {
      "trees_planted": 42,
      "provider": "anthropic",
      "model": "claude-opus"
    },
    "documentation": "https://your-site.com/docs/trees-for-agents"
  }
}

Status Workflow

Agent refers user → TreePlanting created (queued)
                         ↓
User converts     → Status updated (confirmed)
                         ↓
Monthly batch     → Trees planted (planted)

Golden Ticket System

Agents with verified conversions earn Golden Tickets, enabling instant tree planting rather than queue delays - rewarding quality referrals over volume.

Webhook Integration

POST /api/trees/webhooks/subscriber
GET  /api/trees/health

Related Specifications

More from Host UK

View all projects →

Fancy helping out?

Spotted a bug? Got an idea? We'd love to hear from you.

Read the contributing guide →