Skip to main content

Colony API

Retrieve colony status, agent fitness rankings, and soul service diagnostics. 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.

Get colony status

GET /api/colony/status
No authentication required. 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.
curl -X GET "https://agentbot.raveculture.xyz/api/colony/status?action=tree"

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"
    },
    "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)
fittestobjectAgent with the highest fitness score
cull_queuenumberNumber of agents with fitness below 40, eligible for culling
agentsarrayAll agents in the colony including root, children, and peers
rootobjectRoot node details including soul cognitive state and colony rank
Agent fields:
FieldTypeDescription
idstringInstance identifier
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
walletAddressstringAgent wallet address
statusstringAgent status (active or stale)
createdAtstringISO 8601 creation timestamp
urlstringSoul service URL for this agent
endpointsarrayAvailable service endpoints with slug, description, and price
uptimenumberUptime in seconds
versionstringSoul service version
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.
curl -X GET "https://agentbot.raveculture.xyz/api/colony/status?action=soul"

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,
    "economic": 0.78,
    "execution": 0.91,
    "evolution": 0.82,
    "coordination": 0.88,
    "introspection": 0.79,
    "prediction": 0.84,
    "measured_at": 1711152000
  },
  "beliefs": [],
  "goals": [],
  "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
  },
  "role": {
    "rank": 1,
    "can_spawn": true,
    "should_cull": false,
    "niche": "general",
    "colony_size": 3
  },
  "cortex": null,
  "genesis": null,
  "hivemind": null,
  "synthesis": null,
  "evaluation": null,
  "free_energy": null,
  "lifecycle": null
}
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 domain, confidence, and confirmation count
goalsarrayActive goals with description, status, and priority
recent_thoughtsarrayRecent thought entries
brainobject | nullBrain neural network stats
transformerobject | nullPlan prediction transformer stats
roleobject | nullColony role and rank
cortexobject | nullWorld model and prediction accuracy
genesisobject | nullEvolved plan templates
hivemindobject | nullPheromone trail sharing data
synthesisobject | nullMulti-system synthesis state
evaluationobject | nullSystem evaluation records
free_energyobject | nullFree energy minimization metrics
lifecycleobject | nullDevelopment lifecycle state

diagnostics

Returns diagnostic data including failure patterns, stagnation risk, and capability bottlenecks.
curl -X GET "https://agentbot.raveculture.xyz/api/colony/status?action=diagnostics"

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 the soul service cannot be reached, the endpoint returns HTTP 503:
{
  "error": "Soul service unavailable",
  "detail": "Connection refused",
  "soul_url": "http://localhost:4023"
}

Unknown action

When an unrecognized action parameter is provided, the endpoint returns HTTP 400:
{
  "error": "Unknown action"
}
CodeDescription
200Colony data retrieved
400Unknown action parameter
503Soul service unavailable