Repository navigation
Replies: 1 comment
|
option 1 feels less likely to become weird six months later. the generic invoke tool looks tidy until you’re trying to work out why it picked |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Background
A channel runtime run hit this catalog budget failure while preparing the initial LLM turn:
The current
feature/integratepath appears to treat selected connected-service API surface as final LLM tool catalog material:The failure is not caused by connected read/write count limits. The path uses the ordinary catalog budget, so read/write limits are effectively unbounded here. The failure is caused by total canonical schema bytes: 123 KB selected vs 48 KB budget.
The design question is broader than the immediate exception: should a connected service OpenAPI surface be converted into LLM tools first, or should we use a lighter operation-selection layer before any execution boundary is exposed to the model?
For example, a Google Workspace service may not be one of many services for a given agent, but a single service can still contain many endpoints across Drive, Calendar, Gmail, etc. Treating the whole service as a tool catalog is likely to exceed context and safety budgets.
Goals
Non-goals
Current design: expand selected API operations as tools
Shape
Benefits
Problems
Option 1: exact-tool materialization after operation selection
Shape
The operation index would be much lighter than full tool schemas. Example card fields:
Benefits
Risks / tradeoffs
Mitigations for missed endpoints
search_connected_service_operationscapability so the agent can request more candidates if current exact tools are insufficient.Option 2: one generic invoke tool with server-side validation
Shape
The LLM sees one generic invocation tool:
The operation id must come from a server-selected operation set for the current turn.
Required server checks
operation_idis in the current selected operation set.Benefits
Risks / tradeoffs
argumentscan become an untyped bag unless validation is strict.Mitigation
Show compact selected-operation input contracts in prompt/context:
If validation fails, return a structured validation error and let the agent repair arguments or ask the user for missing data.
Option 3: no LLM tool call; use structured command/event invocation
Shape
The model does not call provider tools. It emits a structured operation request, which the actor/runtime turns into a command/event:
{ "kind": "connected_service_operation_request", "service_slug": "google-workspace", "operation_id": "calendar.events.create", "arguments": { "calendarId": "primary", "summary": "Team sync", "start": { "dateTime": "..." }, "end": { "dateTime": "..." } } }Runtime validates and dispatches this as a typed command through the normal actor/event path.
Benefits
Risks / tradeoffs
Option 4: skill-driven service workflows
Shape
Skills represent stable tasks such as:
A skill can use operation index lookup and operation invocation internally.
Benefits
Risks / tradeoffs
Option 5: require endpoint allowlists at registration/publish time
Shape
A channel registration that selects a connected service must either:
Publish/validate can compute expected endpoint count, write count, and estimated schema bytes before sealing.
Benefits
Risks / tradeoffs
Suggested direction
My preference is a layered design rather than choosing only one mechanism:
Short-term pragmatic fix:
endpoint_namesis empty, run operation selection or return disambiguation instead of selecting every endpoint.Medium-term design:
search_connected_service_operationscapability or internal selector API.Execution boundary preference:
OperationInvocationCommand/ event pipeline. Tool calling can remain a provider-facing convenience, but connected-service execution should not depend on all endpoints being materialized as LLM tools.In short: OpenAPI is the service capability catalog, operation index is the selection layer, and the per-turn execution boundary should be small, authorized, validated, and auditable. Full service APIs should not be converted into LLM tools before selection.
All reactions