Resolution Flow
When you send a request to POST /v1/resolve, it passes through a pipeline designed to maximize speed and minimize cost.
The Pipeline
Section titled “The Pipeline”graph TD A[Request] --> B{Auth & Rate Limit} B -->|Pass| C{Cache Check} C -->|Hit| D[Return Cached Result] C -->|Miss| E[Memory Bank Search] E --> F[Compute] F --> G[Cache Update] G --> I[Return Computed Result]
D -.-> J[Billed: 1 request] I -.-> K[Billed: 1 request]1. Authentication & Middleware
Section titled “1. Authentication & Middleware”The request is validated for:
- Valid API Key/JWT.
- Rate limits (based on your subscription).
- Sufficient request balance.
- Request body size limits.
2. Cache Check
Section titled “2. Cache Check”The system checks the cache for a matching result.
- With Standard Cache, identical and similar queries return cached results via fuzzy text matching.
- With Advanced Cache, semantic similarity is also checked — queries that mean the same thing but are phrased differently can still hit the cache.
- Cache Hit: Returns the result immediately. Billed: 1 request.
- Cache Miss: Proceeds to compute. Billed: 1 request.
See Advanced Cache for details on cache modes.
3. Memory Bank Search
Section titled “3. Memory Bank Search”If your App has assigned Memory Banks, the system:
- Searches your Memory Banks for similar past examples.
- Retrieves the top matching examples to provide context.
4. Compute
Section titled “4. Compute”The system processes:
- Your
query. - Your defined
tools. - Retrieved Memory Bank examples (context).
- Optional
contextstring you provided. - Optional
historyof recent tool calls.
It resolves the intent to a tool call.
5. Cache Update
Section titled “5. Cache Update”The result is stored in the cache for future use. The system also learns a canonical form of the query, so future similar queries can be served from cache without compute.
Optional Fields
Section titled “Optional Fields”Context
Section titled “Context”You can provide a context string (max 1,000 characters) to give the LLM additional situational information. This helps when the same query could resolve to different tools depending on the situation.
{ "query": "show me the details", "toolsets": ["crm-v1"], "context": "User is viewing the orders page"}History
Section titled “History”You can provide a history array (max 5 entries) of recently-run tools. This helps the LLM understand conversational context for multi-turn interactions.
{ "query": "add the first one to my cart", "toolsets": ["shop-v1"], "history": [ { "tool": "search_products", "query": "red sneakers" } ]}Each entry has tool (string) and query (string).