Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agentbot.raveculture.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Colony API

Retrieve colony status, agent fitness rankings, soul service diagnostics, per-colony overviews, and provision new starter colonies. The colony endpoint proxies requests to the soul service, which provides cognitive architecture data for agents including plan-driven reasoning, fitness scoring, and colony coordination. The endpoint automatically attempts multiple soul service hosts. If the primary host is unavailable, a fallback host is tried. When a fallback host is used, the response includes degraded: true along with error and detail fields. The root.serviceUrl field reflects whichever host actually served the request.

Get colony status

GET /api/colony/status
Requires session authentication. Returns colony tree data, agent fitness rankings, and root node details by default.

Query parameters

ParameterTypeDefaultDescription
actionstringtreeAction to perform. One of tree, soul, or diagnostics.

Actions

tree

Returns the full colony tree with fitness rankings, agent metadata, and root node soul state.
Template agents (those with status equal to template, such as THE-STRATEGIST or CREW-MANAGER) are excluded from the colony tree. Only operational agents are merged into the response from the database, ensuring template definitions do not appear as colony members.
curl -X GET "https://agentbot.sh/api/colony/status?action=tree" \
  -H "Cookie: session=YOUR_SESSION_TOKEN"

Response

{
  "colony_size": 3,
  "avg_fitness": 72,
  "fittest": {
    "id": "inst_abc123",
    "name": "Atlas Prime",
    "generation": 1,
    "fitness": 85,
    "specialization": "general",
    "children": 2,
    "parent": null,
    "walletAddress": "0x1234...5678",
    "status": "active",
    "createdAt": "2026-03-22T00:00:00Z",
    "url": "https://soul.example.com",
    "endpoints": [
      { "slug": "chat", "description": "Chat with the soul", "price": "0.001" }
    ],
    "uptime": 86400,
    "version": "0.1.0"
  },
  "cull_queue": 0,
  "agents": [
    {
      "id": "inst_abc123",
      "name": "Atlas Prime",
      "generation": 1,
      "fitness": 85,
      "specialization": "general",
      "children": 2,
      "parent": null,
      "walletAddress": "0x1234...5678",
      "status": "active",
      "createdAt": "2026-03-22T00:00:00Z",
      "url": "https://soul.example.com",
      "endpoints": [
        { "slug": "chat", "description": "Chat with the soul", "price": "0.001" }
      ],
      "uptime": 86400,
      "version": "0.1.0"
    }
  ],
  "root": {
    "address": "0x1234...5678",
    "designation": "Atlas Prime",
    "fitness": {
      "total": 0.85,
      "prediction": 0.78,
      "execution": 0.91
    },
    "wallet_balance": {
      "formatted": "12.50",
      "token": "USDC.e"
    },
    "clone_available": true,
    "clone_price": "5.00",
    "soul": {
      "active": true,
      "dormant": false,
      "total_cycles": 1284,
      "mode": "autonomous",
      "active_plan": {
        "id": "plan_001",
        "goal_id": "goal_abc",
        "current_step": 3,
        "total_steps": 7,
        "status": "executing",
        "replan_count": 0
      },
      "free_energy": {
        "F": "0.342",
        "regime": "low",
        "trend": "decreasing",
        "components": [
          { "system": "cortex", "surprise": "0.12", "weight": "0.25" }
        ]
      },
      "brain": {
        "parameters": 284000,
        "train_steps": 5200,
        "running_loss": 0.032
      },
      "transformer": {
        "param_count": 284000,
        "train_steps": 5200,
        "running_loss": 0.032,
        "vocab_size": 512,
        "plans_generated": 148
      }
    },
    "colony": {
      "rank": 1,
      "can_spawn": true,
      "should_cull": false,
      "niche": "general",
      "colony_size": 3,
      "fitness_rank": [
        { "address": "0x1234...5678", "fitness": 0.85, "rank": 1 }
      ]
    }
  }
}
FieldTypeDescription
colony_sizenumberTotal number of agents in the colony
avg_fitnessnumberAverage fitness score across all agents (0–100)
fittestobject | nullAgent with the highest fitness score, or null when the colony has no agents
cull_queuenumberNumber of agents with fitness below 40, eligible for culling
agentsarrayAll agents in the colony including root, children, and peers
degradedbooleanOptional. true when the primary soul host was unavailable and a fallback host was used. Omitted when the primary host responds normally.
errorstringOptional. Error message describing the failure. Present only when degraded is true.
detailstringOptional. Underlying error detail (e.g., Connection refused). Present only when degraded is true.
rootobjectRoot node details including soul cognitive state and colony rank
Agent fields:
FieldTypeDescription
idstringInstance identifier. Falls back to "borg-root" when the root node has no registered identity.
namestringAgent display name
generationnumberGeneration in the colony lineage (1 = root, 2 = child)
fitnessnumberFitness score (0–100)
specializationstringAgent specialization niche
childrennumberNumber of child agents
parentstring | nullParent agent wallet address, or null for root agents and when identity data is unavailable
walletAddressstring | nullAgent wallet address, or null when identity data is unavailable
statusstringAgent status. One of active, stale, or culling.
createdAtstringISO 8601 creation timestamp. Falls back to the current time when identity data is unavailable.
urlstringSoul service URL for this agent
endpointsarrayAvailable service endpoints with slug, description, and price
uptimenumberUptime in seconds
versionstringSoul service version
When the root node has not yet registered its identity, fields such as id, parent, walletAddress, and createdAt use safe fallback values. The id defaults to "borg-root", parent and walletAddress default to null, and createdAt defaults to the current timestamp. The root.address falls back to the zero address (0x0000000000000000000000000000000000000000) and root.wallet_balance returns { "formatted": "0.00", "token": "USDC.e" }. When the colony contains no agents, fittest returns null and avg_fitness returns 0.
Root fields (root):
FieldTypeDescription
addressstringRoot node wallet address. Falls back to the zero address when identity data is unavailable.
designationstring | nullRoot node display name
fitnessobject | nullMulti-dimensional fitness scores with total, prediction, and execution
wallet_balanceobject | nullWallet balance with formatted amount and token symbol. Returns { "formatted": "0.00", "token": "USDC.e" } when identity data is unavailable.
clone_availablebooleanWhether this node can create clones
clone_pricestringPrice to clone this node
soulobjectSoul cognitive state
colonyobject | nullColony coordination data, or null if unavailable
Root soul fields (root.soul):
FieldTypeDescription
activebooleanWhether the soul is actively thinking
dormantbooleanWhether the soul is in dormant mode
total_cyclesnumberTotal cognitive cycles completed
modestringCurrent operating mode
active_planobject | nullCurrently executing plan, or null if idle
free_energyobject | nullFree energy minimization metrics
brainobject | nullBrain neural network stats (parameters, training steps, loss)
transformerobject | nullPlan prediction transformer stats
Root colony fields (root.colony):
FieldTypeDescription
ranknumberFitness rank within the colony
can_spawnbooleanWhether this node can create child agents
should_cullbooleanWhether this node is marked for culling
nichestringSpecialization niche
colony_sizenumberTotal colony size
fitness_rankarrayOrdered fitness ranking of all colony members

soul

Returns the full cognitive state of the soul service. The Borg Dashboard at /dashboard/borg consumes this endpoint and auto-refreshes every 30 seconds.
curl -X GET "https://agentbot.sh/api/colony/status?action=soul" \
  -H "Cookie: session=YOUR_SESSION_TOKEN"

Response

{
  "active": true,
  "dormant": false,
  "total_cycles": 1284,
  "last_think_at": 1711152000,
  "mode": "autonomous",
  "tools_enabled": true,
  "coding_enabled": true,
  "cycle_health": {
    "last_cycle_entered_code": true,
    "total_code_entries": 42,
    "cycles_since_last_commit": 3,
    "completed_plans_count": 18,
    "failed_plans_count": 2,
    "goals_active": 4
  },
  "active_plan": {
    "id": "plan_001",
    "goal_id": "goal_abc",
    "current_step": 3,
    "total_steps": 7,
    "status": "executing",
    "replan_count": 0,
    "current_step_type": "code",
    "context": {}
  },
  "fitness": {
    "total": 0.85,
    "trend": 0.02,
    "coordination": 0.88,
    "economic": 0.78,
    "evolution": 0.82,
    "execution": 0.91,
    "introspection": 0.79,
    "prediction": 0.84,
    "measured_at": 1711152000
  },
  "beliefs": [
    {
      "id": "belief_001",
      "subject": "colony",
      "predicate": "is_healthy",
      "value": "true",
      "confidence": "0.92",
      "confirmation_count": 14
    }
  ],
  "goals": [
    {
      "id": "goal_abc",
      "description": "Optimize colony fitness score above 90%",
      "status": "active",
      "priority": 1,
      "retry_count": 0
    }
  ],
  "recent_thoughts": [],
  "brain": {
    "parameters": 284000,
    "train_steps": 5200,
    "running_loss": 0.032
  },
  "transformer": {
    "param_count": 284000,
    "train_steps": 5200,
    "running_loss": 0.032,
    "vocab_size": 512,
    "plans_generated": 148
  },
  "benchmark": {
    "elo_rating": 1847.5,
    "elo_display": "1848 (Advanced)",
    "opus_iq": "142",
    "pass_at_1": 81.8,
    "problems_attempted": 200
  },
  "capability_profile": {
    "overall_success_rate": 0.82,
    "strongest": "code_generation",
    "weakest": "file_editing",
    "capabilities": [
      {
        "capability": "code_generation",
        "display_name": "Code Generation",
        "attempts": 120,
        "successes": 108,
        "success_rate": 0.9
      },
      {
        "capability": "file_editing",
        "display_name": "File Editing",
        "attempts": 45,
        "successes": 28,
        "success_rate": 0.622
      }
    ]
  },
  "role": {
    "colony_size": 3,
    "rank": 1,
    "self_fitness": 0.85,
    "psi": 0.9234,
    "phase3_ready": true,
    "can_spawn": true
  },
  "acceleration": {
    "alpha": "0.12",
    "regime": "EXPLOIT"
  },
  "cortex": {
    "total_experiences": 1580,
    "global_curiosity": 0.34,
    "emotion": {
      "valence": 0.65,
      "arousal": 0.42,
      "drive": "explore"
    }
  },
  "genesis": null,
  "hivemind": null,
  "synthesis": null,
  "evaluation": null,
  "free_energy": {
    "F": "0.342",
    "regime": "LEARN",
    "trend": "decreasing",
    "components": [
      {
        "system": "cortex",
        "surprise": "0.12",
        "contribution": "35%",
        "weight": "0.25"
      },
      {
        "system": "brain",
        "surprise": "0.08",
        "contribution": "25%",
        "weight": "0.30"
      }
    ]
  },
  "lifecycle": {
    "phase": "mature",
    "own_commits": 42,
    "lines_diverged": 1200
  }
}
FieldTypeDescription
activebooleanWhether the soul is actively thinking
dormantbooleanWhether the soul is in dormant mode
total_cyclesnumberTotal cognitive cycles completed
last_think_atnumber | nullUnix timestamp of last think cycle
modestringOperating mode (e.g., autonomous)
tools_enabledbooleanWhether tool execution is enabled
coding_enabledbooleanWhether code generation is enabled
cycle_healthobjectHealth metrics for the current cognitive cycle
active_planobject | nullCurrently executing plan
fitnessobject | nullMulti-dimensional fitness scores
beliefsarrayActive beliefs with subject, predicate, value, confidence, and confirmation count
goalsarrayActive goals with description, status, priority, and retry count
recent_thoughtsarrayRecent thought entries
brainobject | nullBrain neural network stats
transformerobject | nullPlan prediction transformer stats
benchmarkobject | nullIQ and ELO benchmark scores
capability_profileobject | nullSuccess rates and attempt counts per capability
roleobject | nullColony role, rank, psi value, and spawn eligibility
accelerationobject | nullLearning acceleration parameters (alpha and regime). Returns null when the soul has not yet computed acceleration data. Clients should guard against this field being absent or null.
cortexobject | nullWorld model state including experiences, curiosity, and emotion
genesisobject | nullEvolved plan templates
hivemindobject | nullPheromone trail sharing data
synthesisobject | nullMulti-system synthesis state
evaluationobject | nullSystem evaluation records
free_energyobject | nullFree energy minimization metrics with component breakdown
lifecycleobject | nullDevelopment lifecycle phase, commits, and divergence
Fitness fields (fitness):
FieldTypeDescription
totalnumberOverall fitness score (0–1)
trendnumberFitness trend over recent cycles. Positive values indicate improvement.
coordinationnumberCoordination fitness dimension (0–1)
economicnumberEconomic fitness dimension (0–1)
evolutionnumberEvolution fitness dimension (0–1)
executionnumberExecution fitness dimension (0–1)
introspectionnumberIntrospection fitness dimension (0–1)
predictionnumberPrediction fitness dimension (0–1)
measured_atnumberUnix timestamp of the measurement
Benchmark fields (benchmark):
FieldTypeDescription
elo_ratingnumberELO rating score
elo_displaystringHuman-readable ELO display string (e.g., "1848 (Advanced)")
opus_iqstringIQ benchmark score
pass_at_1numberPass@1 success rate as a percentage
problems_attemptednumberTotal benchmark problems attempted
Capability profile fields (capability_profile):
FieldTypeDescription
overall_success_ratenumberAggregate success rate across all capabilities (0–1)
strongeststringCapability with the highest success rate
weakeststringCapability with the lowest success rate
capabilitiesarrayPer-capability breakdown
capabilities[].capabilitystringCapability identifier
capabilities[].display_namestringHuman-readable capability name
capabilities[].attemptsnumberTotal attempts for this capability
capabilities[].successesnumberSuccessful attempts
capabilities[].success_ratenumberSuccess rate (0–1)
Belief fields (beliefs[]):
FieldTypeDescription
idstringBelief identifier
subjectstringBelief subject
predicatestringBelief predicate
valuestringBelief value
confidencestringConfidence score as a decimal string
confirmation_countnumberNumber of times this belief has been confirmed
Goal fields (goals[]):
FieldTypeDescription
idstringGoal identifier
descriptionstringGoal description
statusstringGoal status (e.g., active, completed, failed)
prioritynumberPriority level (lower is higher priority)
retry_countnumberNumber of retry attempts
Role fields (role):
FieldTypeDescription
colony_sizenumberTotal colony size
ranknumberFitness rank within the colony
self_fitnessnumberThis node’s own fitness score (0–1)
psinumberColony psi coordination value
phase3_readybooleanWhether the node is ready for phase 3 operations
can_spawnbooleanWhether this node can create child agents
Free energy fields (free_energy):
FieldTypeDescription
FstringFree energy value as a decimal string
regimestringCurrent regime (e.g., LEARN, EXPLOIT)
trendstringTrend direction (e.g., decreasing, increasing, stable)
componentsarrayPer-system free energy breakdown
components[].systemstringSystem name (e.g., cortex, brain)
components[].surprisestringSurprise value as a decimal string
components[].contributionstringContribution percentage
components[].weightstringWeight as a decimal string
Acceleration fields (acceleration):
FieldTypeDescription
alphastringLearning rate alpha as a decimal string
regimestringAcceleration regime (e.g., EXPLOIT, LEARN)
The acceleration field may be null or omitted entirely when the soul service has not yet computed acceleration data. Always check for null before accessing nested fields like alpha and regime.
Lifecycle fields (lifecycle):
FieldTypeDescription
phasestringCurrent lifecycle phase (e.g., mature, bootstrap, evolving)
own_commitsnumberNumber of commits made by this node
lines_divergednumberNumber of lines diverged from the parent
Cortex fields (cortex):
FieldTypeDescription
total_experiencesnumberTotal experiences recorded
global_curiositynumberGlobal curiosity level (0–1)
emotionobjectCurrent emotional state
emotion.valencenumberEmotional valence (-1 to 1, positive is pleasant)
emotion.arousalnumberEmotional arousal level (0–1)
emotion.drivestringCurrent drive (e.g., explore, exploit)

diagnostics

Returns diagnostic data including failure patterns, stagnation risk, and capability bottlenecks.
curl -X GET "https://agentbot.sh/api/colony/status?action=diagnostics" \
  -H "Cookie: session=YOUR_SESSION_TOKEN"

Response

{
  "overview": {
    "total_outcomes": 150,
    "completed": 130,
    "failed": 20,
    "success_rate": "86.7%"
  },
  "error_distribution": [
    { "category": "timeout", "count": 8 },
    { "category": "syntax_error", "count": 5 }
  ],
  "stagnation": {
    "cycles_since_commit": 3,
    "risk_level": "low",
    "cycles_until_reset": 47
  },
  "capability_bottleneck": {
    "capability": "file_editing",
    "success_rate": "62.5%",
    "attempts": 16
  },
  "recommendations": [
    "Consider increasing timeout for complex tasks"
  ]
}
FieldTypeDescription
overviewobjectAggregate outcome counts and success rate
error_distributionarrayError counts grouped by category
stagnationobjectStagnation risk metrics and cycles until automatic reset
capability_bottleneckobject | nullWeakest capability area, or null if no bottleneck detected
recommendationsarraySuggested actions to improve agent performance

Error responses

Soul service unavailable

When no healthy soul host can be reached (including the fallback), the endpoint returns HTTP 200 with a degraded response. The degraded field is set to true and all colony fields use safe default values so clients can render a fallback UI without special error handling. The root.serviceUrl is set to the fallback host URL.
{
  "colony_size": 0,
  "avg_fitness": 0,
  "fittest": null,
  "cull_queue": 0,
  "agents": [],
  "degraded": true,
  "error": "Soul service unavailable",
  "detail": "Connection refused",
  "root": {
    "address": "0x0000000000000000000000000000000000000000",
    "designation": null,
    "dashboardUrl": "/dashboard/borg",
    "serviceUrl": "https://soul.example.com",
    "fitness": null,
    "wallet_balance": null,
    "clone_available": false,
    "clone_price": "0",
    "soul": {
      "active": false,
      "dormant": false,
      "total_cycles": 0,
      "mode": "unavailable",
      "active_plan": null,
      "free_energy": null,
      "brain": null,
      "transformer": null
    },
    "colony": null
  }
}
FieldTypeDescription
degradedbooleantrue when the soul service is unreachable
errorstringError message describing the failure
detailstringUnderlying error detail (for example, Connection refused)
root.dashboardUrlstringSoul dashboard path. Now an internal route (/dashboard/borg) instead of an external URL.
root.serviceUrlstringSoul service URL (replaces the former top-level soul_url)
The endpoint tries each configured soul host in order and uses the first healthy one. A host is considered healthy when its /soul/status path returns a JSON response with Content-Type: application/json containing an active field within 4 seconds. The /soul/status path is used instead of the generic /health endpoint because the live soul host exposes meaningful machine status at /soul/status, while /health may return an HTML page or 503 depending on service state. If no host passes the health check, the degraded response is returned. The dashboardUrl field returns the internal path /dashboard/borg. The Borg Dashboard is served by the platform at /dashboard/borg and fetches soul data from this endpoint directly.

Unknown action

When an unrecognized action parameter is provided, the endpoint returns HTTP 400:
{
  "error": "Unknown action"
}
CodeDescription
200Colony data retrieved (also returned when the soul service is unavailable, with degraded: true)
400Unknown action parameter
401Unauthorized — no valid session

Get colony overview (deprecated)

This endpoint is deprecated and will be removed in a future release. Use the GET /api/colony/status?action=tree endpoint to retrieve colony data and build overviews from the tree response.
GET /api/colony/{id}/overview
Returns a normalized overview for a single colony including its agent nodes, edges, timeline events, and aggregate metrics. No authentication required.

Path parameters

ParameterTypeDescription
idstringColony identifier

Response

{
  "colonyId": "friday-alpha",
  "name": "Friday Alpha Terminal",
  "status": "healthy",
  "nodes": [
    {
      "id": "agent-manager",
      "name": "Manager",
      "role": "manager",
      "status": "healthy",
      "currentTask": "Coordinating market summary",
      "walletBalanceUsd": 24.2,
      "mood": "curious"
    }
  ],
  "edges": [
    {
      "from": "agent-manager",
      "to": "agent-researcher",
      "label": "dispatches"
    }
  ],
  "events": [
    {
      "id": "evt_1",
      "timestamp": "2026-04-14T12:00:00.000Z",
      "type": "summary_ready",
      "title": "Morning market summary generated",
      "detail": "Researcher and Executor completed briefing cycle",
      "agentId": "agent-manager"
    }
  ],
  "metrics": {
    "tasksToday": 18,
    "successRate": 0.94,
    "avgLatencyMs": 1820,
    "tokenSpendUsd": 2.87,
    "revenueUsd": 0
  }
}
Top-level fields:
FieldTypeDescription
colonyIdstringColony identifier
namestringColony display name
statusstringColony health status. One of healthy, degraded, stopped, or unknown.
nodesarrayAgent nodes in the colony
edgesarrayRelationships between agents
eventsarrayRecent colony timeline events
metricsobjectAggregate performance metrics
Node fields (nodes[]):
FieldTypeDescription
idstringAgent identifier
namestringAgent display name
rolestringAgent role. One of manager, researcher, executor, analyst, or broadcaster.
statusstringAgent health status. One of healthy, degraded, stopped, or unknown.
currentTaskstring | nullDescription of the agent’s current task, or null if idle
walletBalanceUsdnumber | nullAgent wallet balance in USD, or null if unavailable
moodstring | nullInferred agent mood. One of calm, curious, excited, anxious, sleeping, or unknown.
Edge fields (edges[]):
FieldTypeDescription
fromstringSource agent identifier
tostringTarget agent identifier
labelstringRelationship label (for example, dispatches, hands off, reports, spawned)
Event fields (events[]):
FieldTypeDescription
idstringEvent identifier
timestampstringISO 8601 event timestamp
typestringEvent type (for example, summary_ready, task_assigned, plan_active)
titlestringEvent title
detailstring | nullAdditional event detail
agentIdstring | nullIdentifier of the agent associated with this event
Metrics fields (metrics):
FieldTypeDescription
tasksTodaynumberNumber of tasks completed today
successRatenumberTask success rate (0–1)
avgLatencyMsnumberAverage task latency in milliseconds
tokenSpendUsdnumberToken spend in USD. May be omitted when unavailable.
revenueUsdnumberRevenue generated in USD. May be omitted when unavailable.

Provision a starter colony (deprecated)

This endpoint is deprecated and will be removed in a future release.
POST /api/colony/starter
Provisions a new colony from a predefined template. Requires session authentication.

Request body

FieldTypeRequiredDescription
templatestringYesColony template. One of alpha-terminal, support-ops, or content-studio.
namestringYesDisplay name for the new colony. Must not be empty.

Example

curl -X POST "https://agentbot.sh/api/colony/starter" \
  -H "Content-Type: application/json" \
  -H "Cookie: session=YOUR_SESSION_TOKEN" \
  -d '{
    "template": "alpha-terminal",
    "name": "My First Colony"
  }'

Response (201)

{
  "colonyId": "col_a1b2c3d4",
  "status": "provisioning"
}
When infrastructure provisioning is available, the response includes additional deployment details:
{
  "colonyId": "col_a1b2c3d4",
  "serviceId": "srv_xyz789",
  "url": "https://colony-a1b2c3d4.example.com",
  "status": "deploying"
}
FieldTypeDescription
colonyIdstringIdentifier for the new colony
serviceIdstringInfrastructure service identifier. Present only when infrastructure provisioning is configured.
urlstringColony service URL. Present only when infrastructure provisioning is configured.
statusstringProvisioning status (for example, provisioning or deploying)

Template plans

TemplatePlan
alpha-terminalsolo
support-opscollective
content-studiocollective

Errors

CodeDescription
400Missing template or name, or invalid template value
401Unauthorized — no valid session
500Internal server error