LIMITED TIME: Get 50% OFF your first year! Use code LAUNCH50 Claim Now →

1-833-GOSITEME Call Us 24/7 - Toll Free
1-833-GOSITEME
Toll-Free 24/7
AI Hosting Token Packs SSL Certificates Training Server Support Build AI Server
GoCodeMe Online Download Editor Alfred AI — 875+ Tools Voice & AI Products — From $3/mo
Tool Directory Marketplace Pricing About Us Use Cases Compare Enterprise Documentation Changelog Fleet Dashboard Conference Rooms API Reference Getting Started Developer Portal Extensions IVR Builder
Power-Up Add-Ons Domains News Contact Affiliate Program — Earn 20%
Français Login Get Started

Alfred Documentation

Everything you need to build with Alfred AI — 875+ tools at your fingertips

Quick Start

Get up and running with Alfred AI in under 5 minutes. Alfred provides 875+ AI tools accessible via REST API, voice commands, and the web dashboard.

Tip: You can try Alfred for free with a 14-day trial. No credit card required.

Step 1: Create an Account

Sign up at gositeme.com/alfred.php or use the API:

cURL
curl -X POST https://gositeme.com/api/auth.php \
  -H "Content-Type: application/json" \
  -d '{
    "action": "register",
    "email": "you@example.com",
    "password": "your-secure-password",
    "name": "Your Name"
  }'

Step 2: Get Your API Key

After registration, log in to retrieve your session token:

cURL
curl -X POST https://gositeme.com/api/auth.php \
  -H "Content-Type: application/json" \
  -d '{
    "action": "login",
    "email": "you@example.com",
    "password": "your-secure-password"
  }'

# Response:
# {
#   "success": true,
#   "token": "sess_abc123...",
#   "user": { "id": 42, "name": "Your Name", "plan": "starter" }
# }

Step 3: Call Your First Tool

Execute any of 875+ tools with a single API call:

JavaScript
const response = await fetch('https://gositeme.com/api/tools.php?action=execute', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer sess_abc123...'
  },
  body: JSON.stringify({
    tool_name: 'summarize_text',
    args: {
      text: 'Your long article text here...',
      max_length: 200
    }
  })
});

const data = await response.json();
console.log(data.result); // Summarized text

Installation

Alfred is primarily a cloud-based API — no installation required. Access it via REST endpoints, the web dashboard, or voice calls.

Web Dashboard

Visit gositeme.com/alfred.php to use Alfred directly in your browser. Log in and start chatting immediately.

Desktop App (GoCodeMe)

Download GoCodeMe for a native desktop experience with built-in Alfred integration:

Linux
# Download GoCodeMe AppImage
wget https://gositeme.com/downloads/GoCodeMe-Linux-x64.AppImage
chmod +x GoCodeMe-Linux-x64.AppImage
./GoCodeMe-Linux-x64.AppImage

API Integration

Integrate Alfred into any application using REST API calls. All endpoints are at https://gositeme.com/api/. See the API Reference for full details.

Voice Access

Call 1-833-GOSITEME (1-833-467-4836) to interact with Alfred via phone. Voice integration uses VAPI for natural language processing and tool execution.

First Steps

Now that you have an account, here's what to explore first:

1. Browse Available Tools

Alfred has 875+ tools organized into 21 categories. Browse them:

JavaScript
// Get all tool categories
const categories = await fetch('https://gositeme.com/api/tools.php?action=categories')
  .then(r => r.json());

console.log(categories);
// ["legal", "healthcare", "education", "devops", "media", "finance", ...]

// List tools in a category
const legalTools = await fetch('https://gositeme.com/api/tools.php?action=list&category=legal')
  .then(r => r.json());

console.log(legalTools.tools.length); // 43 legal tools

2. Create Your First Fleet

Fleets let you deploy AI agents for specific tasks:

JavaScript
const fleet = await fetch('https://gositeme.com/api/fleet.php?action=create', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer sess_abc123...'
  },
  body: JSON.stringify({
    name: 'Customer Support Fleet',
    description: 'Handles inbound support questions',
    tools: ['summarize_text', 'search_knowledge_base', 'create_ticket'],
    max_agents: 5
  })
}).then(r => r.json());

console.log(fleet); // { id: "fleet_xyz", name: "Customer Support Fleet", status: "active" }

3. Set Up Voice

Configure your VAPI webhook to enable voice commands. See VAPI Setup.

4. Choose a Plan

View plans at /pricing.php or via the API:

cURL
curl https://gositeme.com/api/stripe.php?action=plans

# Response:
# {
#   "plans": [
#     { "name": "Starter", "price": "$3.99/mo", "tools": 875, "calls": 50 },
#     { "name": "Professional", "price": "$9.99/mo", "tools": 875, "calls": "unlimited" },
#     { "name": "Enterprise", "price": "$24.99/mo", "tools": 875, "calls": "unlimited", "fleets": "unlimited" }
#   ]
# }

Authentication API

All API requests require authentication via session token. Obtain a token by logging in.

POST /api/auth.php — Login

POST /api/auth.php
ParameterTypeRequiredDescription
actionstringYesSet to "login"
emailstringYesUser email address
passwordstringYesUser password
cURL
curl -X POST https://gositeme.com/api/auth.php \
  -H "Content-Type: application/json" \
  -d '{"action":"login","email":"user@example.com","password":"secret"}'

# 200 OK
# {"success":true,"token":"sess_abc123","user":{"id":1,"name":"John","plan":"professional"}}

POST /api/auth.php — Register

POST /api/auth.php
ParameterTypeRequiredDescription
actionstringYesSet to "register"
emailstringYesEmail address
passwordstringYesMin 8 characters
namestringYesDisplay name
Python
import requests

response = requests.post('https://gositeme.com/api/auth.php', json={
    'action': 'register',
    'email': 'newuser@example.com',
    'password': 'securePassword123',
    'name': 'Jane Doe'
})

data = response.json()
print(data['token'])  # sess_xyz789...

GET /api/auth.php — Check Session

GET /api/auth.php?action=check

Verify current session validity. Include token in Authorization header.

PHP
$ch = curl_init('https://gositeme.com/api/auth.php?action=check');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer sess_abc123'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);

if ($response['authenticated']) {
    echo "Logged in as: " . $response['user']['name'];
}

Tools API

The Tools API gives you access to all 875+ Alfred tools. Browse categories, search tools, and execute them programmatically.

GET /api/tools.php — List Categories

GET /api/tools.php?action=categories
JavaScript
const res = await fetch('https://gositeme.com/api/tools.php?action=categories');
const data = await res.json();
// { "categories": ["legal","healthcare","education","devops","media",...], "total": 21 }

GET /api/tools.php — List Tools by Category

GET /api/tools.php?action=list&category=legal
ParameterTypeRequiredDescription
actionstringYes"list"
categorystringYesCategory slug (e.g. "legal", "devops")
Python
import requests

response = requests.get('https://gositeme.com/api/tools.php', params={
    'action': 'list',
    'category': 'legal'
})

tools = response.json()['tools']
for tool in tools:
    print(f"{tool['name']}: {tool['description']}")
# draft_motion: Draft a legal motion
# case_research: Research case law
# ...

GET /api/tools.php — Search Tools

GET /api/tools.php?action=search&q=homework
cURL
curl "https://gositeme.com/api/tools.php?action=search&q=homework"

# {"results":[
#   {"name":"homework_helper","category":"education","description":"Help solve homework problems step by step"},
#   {"name":"essay_writer","category":"education","description":"Generate essay drafts with citations"},
#   ...
# ],"total":12}

POST /api/tools.php — Execute Tool

POST /api/tools.php?action=execute
ParameterTypeRequiredDescription
tool_namestringYesTool identifier (e.g. "summarize_text")
argsobjectVariesTool-specific arguments
PHP
$ch = curl_init('https://gositeme.com/api/tools.php?action=execute');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: Bearer sess_abc123'
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'tool_name' => 'dns_lookup',
        'args' => ['domain' => 'example.com', 'type' => 'A']
    ]),
    CURLOPT_RETURNTRANSFER => true
]);

$result = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($result);
// ["result" => ["records" => [["type"=>"A","value"=>"93.184.216.34","ttl"=>3600]]]]
Rate Limits: Starter plan: 50 tool calls/day. Professional: unlimited. Enterprise: unlimited + priority queue.

Fleet API

Manage AI agent fleets programmatically. Create, monitor, and scale your fleet deployments.

GET /api/fleet.php — List Fleets

GET /api/fleet.php?action=list
JavaScript
const fleets = await fetch('https://gositeme.com/api/fleet.php?action=list', {
  headers: { 'Authorization': 'Bearer sess_abc123' }
}).then(r => r.json());

fleets.data.forEach(fleet => {
  console.log(`${fleet.name} — ${fleet.agent_count} agents — ${fleet.status}`);
});
// Customer Support Fleet — 3 agents — active
// Sales Outreach — 2 agents — active

POST /api/fleet.php — Create Fleet

POST /api/fleet.php?action=create
ParameterTypeRequiredDescription
namestringYesFleet name
descriptionstringNoFleet description
toolsarrayNoList of tool names to assign
max_agentsintNoMax agents (default: 5)
Python
import requests

fleet = requests.post('https://gositeme.com/api/fleet.php?action=create',
    headers={'Authorization': 'Bearer sess_abc123'},
    json={
        'name': 'Legal Research Team',
        'description': 'Automated legal research agents',
        'tools': ['case_research', 'draft_motion', 'statute_lookup'],
        'max_agents': 10
    }
).json()

print(f"Fleet created: {fleet['id']}")  # fleet_abc123

GET /api/fleet.php — Dashboard Stats

GET /api/fleet.php?action=dashboard
cURL
curl -H "Authorization: Bearer sess_abc123" \
  "https://gositeme.com/api/fleet.php?action=dashboard"

# {
#   "total_fleets": 3,
#   "total_agents": 12,
#   "active_tasks": 5,
#   "completed_today": 142,
#   "avg_response_time": "1.2s"
# }

Stripe Billing API

Manage subscriptions, create checkout sessions, and access the customer portal via the Stripe integration.

POST /api/stripe.php — Create Checkout

POST /api/stripe.php?action=create_checkout
JavaScript
const checkout = await fetch('https://gositeme.com/api/stripe.php?action=create_checkout', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer sess_abc123'
  },
  body: JSON.stringify({ plan: 'professional' })
}).then(r => r.json());

// Redirect user to Stripe Checkout
window.location.href = checkout.url;

POST /api/stripe.php — Customer Portal

POST /api/stripe.php?action=create_portal
cURL
curl -X POST https://gositeme.com/api/stripe.php?action=create_portal \
  -H "Authorization: Bearer sess_abc123"

# {"url":"https://billing.stripe.com/p/session/..."}

GET /api/stripe.php — Plans

GET /api/stripe.php?action=plans
Python
import requests

plans = requests.get('https://gositeme.com/api/stripe.php?action=plans').json()

for plan in plans['plans']:
    print(f"{plan['name']}: ${plan['price']}/mo — {plan['description']}")
# Starter: $3.99/mo — 50 tool calls/day, 1 fleet
# Professional: $9.99/mo — Unlimited tools, 5 fleets, voice
# Enterprise: $24.99/mo — Unlimited everything, SLA, SSO

GET /api/stripe.php — Subscription Status

GET /api/stripe.php?action=status
PHP
$ch = curl_init('https://gositeme.com/api/stripe.php?action=status');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer sess_abc123']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$status = json_decode(curl_exec($ch), true);
curl_close($ch);

echo "Plan: " . $status['plan'];           // professional
echo "Status: " . $status['status'];       // active
echo "Renews: " . $status['renews_at'];    // 2026-04-04
echo "Tool calls today: " . $status['usage']['tool_calls_today']; // 42

VAPI Setup

Alfred integrates with VAPI for voice-first AI interactions. Users can call Alfred via phone or browser-based voice.

Webhook Configuration

Set up your VAPI assistant to point to the Alfred webhook endpoint:

Webhook URL
https://gositeme.com/api/vapi-webhook.php

VAPI Tool Format

Tools exposed to VAPI follow this schema:

JSON
{
  "type": "function",
  "function": {
    "name": "weather_lookup",
    "description": "Get current weather for a location",
    "parameters": {
      "type": "object",
      "properties": {
        "location": {
          "type": "string",
          "description": "City name or zip code"
        }
      },
      "required": ["location"]
    }
  }
}
Note: VAPI tool calls are routed through /api/vapi-tools.php which maps voice requests to Alfred's 875+ tool engine.

Voice Commands

Alfred understands natural language voice commands. Here are some examples:

Sample Voice Commands

  • "Hey Alfred, summarize this article" — Triggers summarize_text
  • "Schedule a meeting for tomorrow at 3pm" — Triggers create_calendar_event
  • "What's the weather in Montreal?" — Triggers weather_lookup
  • "Draft a demand letter for unpaid rent" — Triggers draft_demand_letter
  • "Check my website's DNS records" — Triggers dns_lookup
  • "How many agents are in my fleet?" — Triggers fleet_dashboard
  • "Create a support ticket" — Triggers create_ticket
  • "Translate this to French" — Triggers translate_text

Voice Response Format

Alfred responds in natural language. Tool results are converted to spoken responses automatically via VAPI's text-to-speech engine.

JSON — VAPI Response
{
  "results": [{
    "toolCallId": "call_abc123",
    "result": "The current weather in Montreal is -5°C with light snow. Wind chill brings it to -12°C."
  }]
}

Phone Agent

Deploy an AI phone agent using Alfred + VAPI. Your agent can answer calls, route inquiries, and execute tools on behalf of callers.

Setting Up Outbound Calls

JavaScript
const call = await fetch('https://gositeme.com/api/vapi-outbound.php', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer sess_abc123'
  },
  body: JSON.stringify({
    phone_number: '+15145551234',
    assistant_id: 'asst_xyz',
    first_message: 'Hi, this is Alfred from GoSiteMe. How can I help you today?'
  })
}).then(r => r.json());

console.log(call.call_id); // call_abc123

Tool Categories

Alfred's 875+ tools are organized into 21 categories:

Legal — 43 tools
Healthcare — 38 tools
Education — 52 tools
DevOps — 48 tools
Media — 35 tools
Finance — 41 tools
E-Commerce — 22 tools
Security — 29 tools
Creative — 44 tools
Data — 33 tools
Web Hosting — 56 tools
Demographics — 287 tools
Consciousness — 12 tools
Voice & Telephony — 31 tools
Real Estate — 18 tools
Developer — 62 tools
Translation — 14 tools
Automation — 27 tools
Communication — 15 tools
Analytics — 24 tools
Utilities — 23 tools

Using Tools

Every tool follows the same execution pattern: send a POST request with the tool name and arguments.

Request Format

JSON
{
  "tool_name": "tool_identifier",
  "args": {
    "param1": "value1",
    "param2": "value2"
  }
}

Response Format

JSON
{
  "success": true,
  "tool": "tool_identifier",
  "result": { ... },
  "execution_time": "0.45s",
  "credits_used": 1
}

Error Handling

JavaScript
try {
  const res = await fetch('https://gositeme.com/api/tools.php?action=execute', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer sess_abc123'
    },
    body: JSON.stringify({ tool_name: 'dns_lookup', args: { domain: 'example.com' } })
  });

  const data = await res.json();
  
  if (!data.success) {
    console.error(`Error: ${data.error} (code: ${data.code})`);
    // Error codes: 401 (unauthorized), 429 (rate limit), 400 (bad request), 500 (server error)
  }
} catch (err) {
  console.error('Network error:', err);
}

Custom Tools

Enterprise users can create custom tools that integrate into Alfred's tool engine. Custom tools appear alongside built-in tools and can be used via API, voice, and the dashboard.

Defining a Custom Tool

JSON
{
  "name": "lookup_inventory",
  "description": "Check product inventory levels",
  "category": "custom",
  "parameters": {
    "type": "object",
    "properties": {
      "sku": { "type": "string", "description": "Product SKU" },
      "warehouse": { "type": "string", "description": "Warehouse code" }
    },
    "required": ["sku"]
  },
  "webhook_url": "https://your-api.com/inventory/check",
  "auth_header": "X-API-Key: your-key"
}
Custom tools are available on Enterprise plans. Contact sales at enterprise to get started.

Creating Fleets

Fleets are groups of AI agents that work together on tasks. Each fleet can have its own tools, personality, and deployment target.

Fleet Configuration

JavaScript
const fleet = await fetch('https://gositeme.com/api/fleet.php?action=create', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer sess_abc123'
  },
  body: JSON.stringify({
    name: 'Healthcare Triage',
    description: 'Routes patient inquiries to appropriate departments',
    tools: ['symptom_checker', 'appointment_scheduler', 'insurance_verify'],
    max_agents: 10,
    personality: 'professional, empathetic, HIPAA-aware',
    auto_scale: true
  })
}).then(r => r.json());

console.log(`Fleet ${fleet.id} created with ${fleet.tools.length} tools`);

Agent Deployment

Deploy agents within a fleet to handle specific channels (web chat, phone, email).

Python
import requests

agent = requests.post('https://gositeme.com/api/fleet.php?action=deploy_agent',
    headers={'Authorization': 'Bearer sess_abc123'},
    json={
        'fleet_id': 'fleet_abc123',
        'channel': 'phone',
        'name': 'Support Agent Alpha',
        'greeting': 'Hello! You\'ve reached GoSiteMe support. How can I help?'
    }
).json()

print(f"Agent deployed: {agent['agent_id']} on {agent['channel']}")

Monitoring

Monitor fleet performance in real-time via the Fleet Dashboard API or the web UI at /fleet-dashboard.php.

cURL
curl -H "Authorization: Bearer sess_abc123" \
  "https://gositeme.com/api/fleet.php?action=dashboard"

# {
#   "total_fleets": 3,
#   "total_agents": 12,
#   "active_tasks": 5,
#   "completed_today": 142,
#   "avg_response_time": "1.2s",
#   "uptime": "99.97%",
#   "top_tools": ["summarize_text","dns_lookup","create_ticket"]
# }

Creating Conference Rooms

Voice conference rooms let multiple AI agents and humans collaborate in real-time using LiveKit integration.

JavaScript
const room = await fetch('https://gositeme.com/api/voice-manage.php', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer sess_abc123'
  },
  body: JSON.stringify({
    action: 'create_room',
    name: 'Legal Strategy Session',
    max_participants: 6,
    recording: true
  })
}).then(r => r.json());

console.log(`Room created: ${room.room_name}`);
console.log(`Join URL: ${room.join_url}`);

Adding Agents to Rooms

Invite AI agents into a conference room to participate in discussions, take notes, or execute tools.

Python
import requests

# Add an AI agent to the room
result = requests.post('https://gositeme.com/api/voice-manage.php', json={
    'action': 'add_agent',
    'room_name': 'Legal Strategy Session',
    'agent_type': 'legal_researcher',
    'voice': 'en-US-Neural2-F',
    'tools': ['case_research', 'statute_lookup', 'draft_motion']
}, headers={'Authorization': 'Bearer sess_abc123'}).json()

print(f"Agent {result['agent_id']} joined the room")

Recording

Conference rooms support real-time transcription and recording. Access recordings and transcripts via the API.

cURL
# Get recording and transcript
curl -H "Authorization: Bearer sess_abc123" \
  "https://gositeme.com/api/voice-manage.php?action=recording&room=Legal+Strategy+Session"

# {
#   "recording_url": "https://storage.gositeme.com/recordings/room_abc.mp4",
#   "transcript": [
#     {"speaker":"Human","time":"0:00","text":"Let's discuss the Smith case."},
#     {"speaker":"Legal AI","time":"0:05","text":"Based on my research, Smith v. Jones (2024)..."},
#     ...
#   ],
#   "duration": "14:32",
#   "participants": 4
# }

Plans

Alfred offers three subscription tiers:

Starter — $3.99/mo

  • 875+ tools
  • 50 calls/day
  • 1 fleet
  • Community support

Professional — $9.99/mo

  • 875+ tools
  • Unlimited calls
  • 5 fleets
  • Voice commands
  • Priority support

Enterprise — $24.99/mo

  • 875+ tools
  • Unlimited everything
  • Unlimited fleets
  • SSO & teams
  • SLA guarantee
  • 24/7 support

Checkout

Create a Stripe Checkout session to subscribe users:

JavaScript
async function subscribeToPlan(plan) {
  const res = await fetch('https://gositeme.com/api/stripe.php?action=create_checkout', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer sess_abc123'
    },
    body: JSON.stringify({
      plan: plan,  // 'starter', 'professional', or 'enterprise'
      success_url: 'https://gositeme.com/dashboard.php?upgraded=1',
      cancel_url: 'https://gositeme.com/pricing.php'
    })
  });
  
  const { url } = await res.json();
  window.location.href = url; // Redirect to Stripe Checkout
}

Customer Portal

Let users manage their subscription, update payment methods, and view invoices via the Stripe Customer Portal:

PHP
// Redirect user to Stripe Customer Portal
$ch = curl_init('https://gositeme.com/api/stripe.php?action=create_portal');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $_SESSION['token']],
    CURLOPT_RETURNTRANSFER => true
]);
$portal = json_decode(curl_exec($ch), true);
curl_close($ch);

header('Location: ' . $portal['url']);
exit;

Webhooks

Receive real-time notifications for billing events via Stripe webhooks:

Webhook Events

  • checkout.session.completed — User subscribed successfully
  • customer.subscription.updated — Plan changed
  • customer.subscription.deleted — Subscription cancelled
  • invoice.payment_failed — Payment failed
PHP — Webhook Handler
// Your webhook endpoint receives Stripe events
$payload = file_get_contents('php://input');
$sig = $_SERVER['HTTP_STRIPE_SIGNATURE'];
$event = \Stripe\Webhook::constructEvent($payload, $sig, $webhook_secret);

switch ($event->type) {
    case 'checkout.session.completed':
        $session = $event->data->object;
        // Activate user subscription
        activateSubscription($session->client_reference_id, $session->subscription);
        break;
    case 'customer.subscription.deleted':
        // Downgrade user to free
        downgradeUser($event->data->object->metadata->user_id);
        break;
}

JavaScript SDK

Use Alfred in any JavaScript environment — browser, Node.js, Deno, Bun.

JavaScript
class AlfredClient {
  constructor(token) {
    this.token = token;
    this.baseURL = 'https://gositeme.com/api';
  }

  async execute(toolName, args = {}) {
    const res = await fetch(`${this.baseURL}/tools.php?action=execute`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${this.token}`
      },
      body: JSON.stringify({ tool_name: toolName, args })
    });
    return res.json();
  }

  async listTools(category) {
    const res = await fetch(`${this.baseURL}/tools.php?action=list&category=${category}`, {
      headers: { 'Authorization': `Bearer ${this.token}` }
    });
    return res.json();
  }

  async search(query) {
    const res = await fetch(`${this.baseURL}/tools.php?action=search&q=${encodeURIComponent(query)}`, {
      headers: { 'Authorization': `Bearer ${this.token}` }
    });
    return res.json();
  }

  async createFleet(config) {
    const res = await fetch(`${this.baseURL}/fleet.php?action=create`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${this.token}`
      },
      body: JSON.stringify(config)
    });
    return res.json();
  }
}

// Usage
const alfred = new AlfredClient('sess_abc123');

const result = await alfred.execute('summarize_text', { text: 'Long article...', max_length: 100 });
console.log(result);

Python SDK

Python
import requests

class AlfredClient:
    BASE_URL = 'https://gositeme.com/api'

    def __init__(self, token: str):
        self.token = token
        self.session = requests.Session()
        self.session.headers.update({
            'Authorization': f'Bearer {token}',
            'Content-Type': 'application/json'
        })

    def execute(self, tool_name: str, args: dict = None) -> dict:
        """Execute an Alfred tool."""
        return self.session.post(
            f'{self.BASE_URL}/tools.php?action=execute',
            json={'tool_name': tool_name, 'args': args or {}}
        ).json()

    def list_tools(self, category: str) -> dict:
        """List tools in a category."""
        return self.session.get(
            f'{self.BASE_URL}/tools.php?action=list&category={category}'
        ).json()

    def search(self, query: str) -> dict:
        """Search tools by keyword."""
        return self.session.get(
            f'{self.BASE_URL}/tools.php?action=search&q={query}'
        ).json()

    def create_fleet(self, name: str, tools: list, **kwargs) -> dict:
        """Create a new agent fleet."""
        return self.session.post(
            f'{self.BASE_URL}/fleet.php?action=create',
            json={'name': name, 'tools': tools, **kwargs}
        ).json()

    def fleet_dashboard(self) -> dict:
        """Get fleet dashboard stats."""
        return self.session.get(
            f'{self.BASE_URL}/fleet.php?action=dashboard'
        ).json()


# Usage
alfred = AlfredClient('sess_abc123')

# Execute a tool
result = alfred.execute('dns_lookup', {'domain': 'example.com', 'type': 'MX'})
print(result)

# Search tools
matches = alfred.search('homework')
for tool in matches['results']:
    print(f"  {tool['name']}: {tool['description']}")

PHP SDK

PHP
class AlfredClient {
    private string $token;
    private string $baseURL = 'https://gositeme.com/api';

    public function __construct(string $token) {
        $this->token = $token;
    }

    public function execute(string $toolName, array $args = []): array {
        return $this->post('/tools.php?action=execute', [
            'tool_name' => $toolName,
            'args' => $args
        ]);
    }

    public function listTools(string $category): array {
        return $this->get("/tools.php?action=list&category={$category}");
    }

    public function search(string $query): array {
        return $this->get("/tools.php?action=search&q=" . urlencode($query));
    }

    public function createFleet(string $name, array $tools, array $options = []): array {
        return $this->post('/fleet.php?action=create', array_merge([
            'name' => $name, 'tools' => $tools
        ], $options));
    }

    private function get(string $endpoint): array {
        $ch = curl_init($this->baseURL . $endpoint);
        curl_setopt_array($ch, [
            CURLOPT_HTTPHEADER => ["Authorization: Bearer {$this->token}"],
            CURLOPT_RETURNTRANSFER => true
        ]);
        $result = json_decode(curl_exec($ch), true);
        curl_close($ch);
        return $result;
    }

    private function post(string $endpoint, array $data): array {
        $ch = curl_init($this->baseURL . $endpoint);
        curl_setopt_array($ch, [
            CURLOPT_POST => true,
            CURLOPT_HTTPHEADER => [
                "Authorization: Bearer {$this->token}",
                'Content-Type: application/json'
            ],
            CURLOPT_POSTFIELDS => json_encode($data),
            CURLOPT_RETURNTRANSFER => true
        ]);
        $result = json_decode(curl_exec($ch), true);
        curl_close($ch);
        return $result;
    }
}

// Usage
$alfred = new AlfredClient('sess_abc123');

$result = $alfred->execute('summarize_text', ['text' => 'Your article...', 'max_length' => 200]);
print_r($result);

$tools = $alfred->listTools('legal');
echo count($tools['tools']) . " legal tools available\n";

cURL Examples

Use cURL for quick testing and shell scripts. Here are common patterns:

Login & Store Token

Bash
#!/bin/bash
# Login and save token
TOKEN=$(curl -s -X POST https://gositeme.com/api/auth.php \
  -H "Content-Type: application/json" \
  -d '{"action":"login","email":"user@example.com","password":"secret"}' \
  | jq -r '.token')

echo "Token: $TOKEN"

# Execute a tool
curl -s -X POST "https://gositeme.com/api/tools.php?action=execute" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"tool_name":"weather_lookup","args":{"location":"Montreal"}}' | jq .

# List fleets
curl -s -H "Authorization: Bearer $TOKEN" \
  "https://gositeme.com/api/fleet.php?action=list" | jq .

# Check subscription status
curl -s -H "Authorization: Bearer $TOKEN" \
  "https://gositeme.com/api/stripe.php?action=status" | jq .

Search & Execute in One Script

Bash
#!/bin/bash
TOKEN="sess_abc123"

# Search for DNS tools
echo "=== DNS Tools ==="
curl -s -H "Authorization: Bearer $TOKEN" \
  "https://gositeme.com/api/tools.php?action=search&q=dns" | jq '.results[].name'

# Execute DNS lookup
echo "=== DNS Lookup ==="
curl -s -X POST "https://gositeme.com/api/tools.php?action=execute" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "tool_name": "dns_lookup",
    "args": {"domain": "gositeme.com", "type": "A"}
  }' | jq '.result'

Someone from somewhere

just launched website.com

Just now