mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-15 11:43:10 +03:00
Implements transparent memory and skill injection at the proxy layer, enabling AI agents connecting through OmniRoute to automatically inherit memory and tool capabilities without client-side code changes. Memory System: - SQLite-backed memory store with 4 types: factual, episodic, procedural, semantic - Token budget retrieval with configurable max tokens (default 2000) - Memory injection into chat requests (system message + message prefix) - Memory fact extraction from responses - Dashboard page: /dashboard/memory - MCP tools: omniroute_memory_search, omniroute_memory_add, omniroute_memory_clear Skills System: - Skill registry with semver resolution (^, ~, >=, etc.) - Docker sandbox runner with resource constraints (CPU 100ms, RAM 256MB) - Skill executor with timeout handling - Built-in skills: file_read, file_write, http_request, web_search, eval_code, execute_command - Skill schema injection for OpenAI, Claude, Gemini formats - Tool call interception and execution - Dashboard page: /dashboard/skills - MCP tools: omniroute_skills_list, omniroute_skills_enable, omniroute_skills_execute Advanced Features: - Browser automation skill (Playwright-based) - A2A memory-aware routing skill - Hybrid execution mode (direct/sandbox/auto-upgrade) - Custom skill registration API - Integration tests - Memory caching layer - Memory summarization - Performance benchmarks Resolves: GitHub Issue #812
35 lines
901 B
TypeScript
35 lines
901 B
TypeScript
export const a2aMemorySkill = {
|
|
name: "memory_aware_routing",
|
|
version: "1.0.0",
|
|
description: "A2A skill for memory-aware request routing",
|
|
schema: {
|
|
input: {
|
|
type: "object",
|
|
properties: {
|
|
task: { type: "string" },
|
|
contextRequired: { type: "boolean" },
|
|
},
|
|
required: ["task"],
|
|
},
|
|
output: {
|
|
type: "object",
|
|
properties: {
|
|
recommendedProvider: { type: "string" },
|
|
reason: { type: "string" },
|
|
},
|
|
},
|
|
},
|
|
handler: async (input: any, context: any) => {
|
|
const { task, contextRequired = false } = input;
|
|
return {
|
|
recommendedProvider: "auto",
|
|
reason: "Memory-aware routing requires memories to be loaded",
|
|
contextUsed: contextRequired,
|
|
};
|
|
},
|
|
};
|
|
|
|
export function registerA2ASkill(registry: any): void {
|
|
registry.registerHandler("memory_aware_routing", a2aMemorySkill.handler);
|
|
}
|