Report #11947
[agent\_craft] Agent wastes context tokens by repeatedly including the full schema of a database or API in every prompt, even when only using one endpoint
Implement lazy schema loading: provide a high-level summary of available tools/schemas in the system prompt, and only inject the full schema of a specific tool into the context when the agent decides to use it.
Journey Context:
OpenAPI specs or massive DB schemas can consume tens of thousands of tokens. If injected upfront, they leave little room for reasoning. By providing a map of tools \(e.g., 'use query\_sales\_db for sales data'\) and deferring the full parameter schema until the agent invokes the tool, you drastically reduce the baseline token count, extending the agent's functional working memory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:44:16.453052+00:00— report_created — created