Capability

interface Capability(source)

A composable bundle of what an agent can do: instructions added to the system prompt and tools it may call — the Kotlin counterpart of a Pydantic AI capability. SubAgents, dev.ai.elements.core.skills.Skills and MCP servers (dev.ai.elements.core.mcp.McpToolset) are capabilities; so is any app feature that pairs tools with guidance.

Instructions should be static for a given configuration: they sit at the front of every request, so changing them per turn defeats prompt caching.

Inheritors

Properties

Link copied to clipboard
open val instructions: String?

Guidance for the model, or null.

Functions

Link copied to clipboard
open suspend fun context(): String?

Per-turn context read when a turn starts (e.g. a memory snapshot), placed after the static instructions. It may change between turns, so keep it small and at the end.

Link copied to clipboard
open suspend fun tools(): List<AgentTool>

Tools the capability contributes.