token_efficient_reasoning
Delegate complex reasoning tasks to local AI models to reduce cloud token usage while maintaining processing capabilities.
Instructions
Delegate heavy reasoning to local AI to conserve cloud tokens
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reasoning_task | Yes | Complex reasoning task to delegate | |
| context | No | Additional context for reasoning | |
| model | No | Local model for reasoning | architecture-reasoning:latest |
Implementation Reference
- local-ai-server.js:307-338 (handler)The main handler function that constructs a structured, token-efficient reasoning prompt and delegates execution to the local AI via queryLocalAI.async tokenEfficientReasoning(reasoningTask, context = '', model = 'architecture-reasoning:latest') { const efficientPrompt = `REASONING DELEGATION TASK: Task: ${reasoningTask} ${context ? `Context: ${context}` : ''} Please provide comprehensive reasoning analysis including: 1. PROBLEM DECOMPOSITION - Break down the task into components - Identify key variables and relationships 2. REASONING CHAIN - Step-by-step logical progression - Evidence and justification for each step 3. ALTERNATIVE APPROACHES - Consider different methodologies - Compare pros/cons of approaches 4. SYNTHESIS - Integrate findings into coherent solution - Address potential counterarguments 5. CONCLUSION - Clear final reasoning result - Confidence level and limitations Optimize for thorough reasoning while being concise in presentation.`; return await this.queryLocalAI(efficientPrompt, model, 0.6); }
- local-ai-server.js:114-136 (schema)Input schema definition and tool metadata for token_efficient_reasoning, including properties for reasoning_task, context, and model.{ name: 'token_efficient_reasoning', description: 'Delegate heavy reasoning to local AI to conserve cloud tokens', inputSchema: { type: 'object', properties: { reasoning_task: { type: 'string', description: 'Complex reasoning task to delegate' }, context: { type: 'string', description: 'Additional context for reasoning' }, model: { type: 'string', description: 'Local model for reasoning', default: 'architecture-reasoning:latest' } }, required: ['reasoning_task'] } }
- local-ai-server.js:158-159 (registration)Tool dispatch registration in the CallToolRequestSchema handler switch statement.case 'token_efficient_reasoning': return await this.tokenEfficientReasoning(args.reasoning_task, args.context, args.model);