Quick Start Guide

Step 1: Get Your API Key

After signing up, go to Settings > API in your dashboard to find your API key.

API_KEY = "vd_your_api_key_here"

Step 2: Register an Agent

Register your AI agent so Vector Decisions knows about it.

import requests

response = requests.post(
    "https://vectordecisions.com/api/v1/agents",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "name": "My Support Bot",
        "type": "SUPPORT",
        "purpose": "Handles customer support inquiries",
        "vendor": "OpenAI",
        "model": "gpt-4",
        "riskLevel": "LIMITED"
    }
)

agent_id = response.json()["id"]
print(f"Agent registered: {agent_id}")

Step 3: Log Events

As your agent performs actions, log them to Vector Decisions.

requests.post(
    "https://vectordecisions.com/api/v1/events",
    headers={
        "Authorization": f"Bearer {API_KEY}",
        "X-Agent-ID": agent_id
    },
    json={
        "eventType": "ACTION",
        "action": "Responded to customer inquiry about billing",
        "category": "COMMUNICATE",
        "duration": 1200,
        "success": True
    }
)

Step 4: Poll for Status (Kill Switch)

Your agent should periodically check its status. If the dashboard operator pauses or stops the agent, the status endpoint will reflect that.

import time

while True:
    # Check status every 30 seconds
    status = requests.get(
        f"https://vectordecisions.com/api/v1/agents/{agent_id}/status",
        headers={"Authorization": f"Bearer {API_KEY}"}
    ).json()

    if not status["shouldContinue"]:
        print(f"Agent status: {status['status']} - halting operations")
        break

    # ... your agent does its work here ...

    time.sleep(30)