Skip to content

Get Agents By Capability

GET
/api/agents/agents/by-capability/{capability}

Find agents that match a specific capability.

Searches all registered agents for those with the requested capability and returns them ranked by match quality.

Path Parameters: capability: The capability to search for (e.g., “lore_consistency”, “code_analysis”)

Returns: CapabilityRoutingResponse with matching agents and scores

Raises: HTTPException 503: If communication hub is not available HTTPException 500: For unexpected errors

capability
required
Capability
string

Successful Response

CapabilityRoutingResponse

Response model for capability-based routing queries.

Returns agents that match a specific capability for targeted task routing.

Fields: status: Operation status capability: Requested capability matches: List of matching agents with scores total_matches: Number of matching agents best_match: Best matching agent ID reasoning: Explanation of matching logic

Usage: GET /api/agents/routing/agents/by-capability/{capability}

object
status
Status

Operation status

string
default: success
capability
required
Capability

Requested capability

string
matches
required
Matches

Matching agents

Array<object>
CapabilityMatchInfo

Agent capability match information for capability-based routing.

Fields: agent_id: Agent identifier capability_match: How well agent matches requested capability has_capability: Whether agent has the exact capability related_capabilities: Related capabilities agent has confidence_score: Match confidence

object
agentId
required
Agentid

Agent identifier

string
capabilityMatch
required
Capabilitymatch

Match score

number
hasCapability
required
Hascapability

Has exact capability

boolean
relatedCapabilities
Any of:
Array<string>
confidenceScore
required
Confidencescore

Confidence score

number
totalMatches
required
Totalmatches

Total matches

integer
bestMatch
Any of:
string
reasoning
required
Reasoning

Matching reasoning

string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object