symfonic.capabilities.tools.procedural¶
procedural ¶
Narrow an Agent's palette on cue-matched procedural skills (CORE-227).
The owner contract, composed for a native Agent or an AgentHost
composer: only a procedural row selected by cue match narrows the palette.
Importance-fallback and empty-cue rows are not routing evidence, so the turn
keeps every registered tool and its routing stage says why. A layer that
cannot report row origin is refused at composition instead of being routed
origin-blind. A router over no registered tools has no palette to resolve: it
composes no routing stage and reads nothing, so the turn stays native and one
AgentHost composer need not branch on a tenant's empty tool set (the owner
decision for zero registered tools). A decline here is a router's no-match
answer, not an unavailable report, so nothing is counted under
tools.routing_unavailable.
Narrowing on a matched cue is an Agent improvement, not legacy bind_tools
parity. Narrowing selects what the model is offered; it does not authorise or
forbid a call -- preconditions do that.
The layer is read structurally (retrieve_report). On Agent and
AgentHost the router reads the TenantScope it was composed for: their
turns state no scope. Only a caller that builds a kernel TurnRequest with
scope= itself routes on that scope, and a stated scope that is not a
TenantScope reads nothing and allows every tool.
CueMatchedPalette
dataclass
¶
CueMatchedPalette(entries_for: Callable[[Any], Any] | None = None, registered: tuple[str, ...] = (), cue_from: Callable[[Any], str] = lambda request: str(getattr(request, 'prompt', '') or ''), stages: tuple[Any, ...] = (), preconditions: tuple[Any, ...] = (), routing_unavailable: RoutingUnavailable | None = None, warning_already_issued: bool = False, count_unavailable: bool = True, declined: dict = dict())
Bases: ToolsCapability
A router whose decline names the origins it would not narrow on.
The resolver reads an empty match as "no skills in the procedural layer", which is false when unmatched rows exist; the reason is restated per turn.
procedural_router ¶
procedural_router(layer: Any, scope: Any, *, registered: Sequence[str], top_k: int = 10, stages: Sequence[Any] = (), preconditions: Sequence[Any] = ()) -> CueMatchedPalette
A ToolsCapability that narrows only on cue-matched skills of layer.
The composed Agent must also be granted memory-read
(GrantEffects("memory-read")): the router reads the procedural layer.
With nothing registered it composes no router: no routing stage, no
memory-read, no count. stages and preconditions still compose.
Raises:
| Type | Description |
|---|---|
ConfigurationError
|
|