Serchio

20250803_1520_cipher_mcp_log

Aug 3rd, 2025
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 16.05 KB | None | 0 0
  1. 2025-08-03 15:16:55 [INFO]: Loading agent config from /home/serchio/.cipher/cipher.yml
  2. 2025-08-03 15:16:55 [DEBUG]: Loading cipher config from: /home/serchio/.cipher/cipher.yml
  3. 2025-08-03 15:16:55 [DEBUG]: MemAgent created
  4. 2025-08-03 15:16:55 [DEBUG]: Starting MemAgent...
  5. 2025-08-03 15:16:55 [DEBUG]: MemAgent: Using standard services
  6. 2025-08-03 15:16:55 [DEBUG]: Initializing event manager...
  7. 2025-08-03 15:16:55 [DEBUG]: ServiceEventBus initialized
  8. 2025-08-03 15:16:55 [DEBUG]: EventManager initialized
  9. 2025-08-03 15:16:55 [DEBUG]: Event emitted
  10. 2025-08-03 15:16:56 [DEBUG]: Event emitted
  11. 2025-08-03 15:16:56 [DEBUG]: Client manager initialized with 1 MCP server(s)
  12. 2025-08-03 15:16:56 [DEBUG]: Event emitted
  13. 2025-08-03 15:16:56 [DEBUG]: Initializing embedding manager...
  14. 2025-08-03 15:16:56 [DEBUG]: [EMBEDDING:MANAGER] Simple embedding manager initialized
  15. 2025-08-03 15:16:56 [DEBUG]: Found explicit embedding configuration in YAML, using it
  16. 2025-08-03 15:16:56 [DEBUG]: [EMBEDDING:MANAGER] Creating embedder from YAML configuration
  17. 2025-08-03 15:16:56 [DEBUG]: Creating embedder
  18. 2025-08-03 15:16:56 [DEBUG]: [EMBEDDING] Ollama embedder initialized
  19. 2025-08-03 15:16:56 [INFO]: [EMBEDDING:MANAGER] Embedder registered successfully from YAML
  20. 2025-08-03 15:16:56 [INFO]: Embedding manager initialized successfully
  21. 2025-08-03 15:16:56 [DEBUG]: Event emitted
  22. 2025-08-03 15:16:56 [DEBUG]: Initializing vector storage manager...
  23. 2025-08-03 15:16:56 [DEBUG]: Reflection memory enabled, using dual collection vector manager
  24. 2025-08-03 15:16:56 [DEBUG]: ServiceCache: Cache miss, creating dualCollectionVectorStore:3371929337
  25. 2025-08-03 15:16:56 [DEBUG]: MilvusConnectionPool: Creating new connection
  26. 2025-08-03 15:16:56 [DEBUG]: MilvusConnectionPool: Connection created and pooled
  27. 2025-08-03 15:16:56 [DEBUG]: MilvusConnectionPool: Reusing existing connection
  28. 2025-08-03 15:16:56 [DEBUG]: ServiceCache: Cached dualCollectionVectorStore:3371929337
  29. 2025-08-03 15:16:56 [DEBUG]: Dual collection vector storage manager initialized successfully
  30. 2025-08-03 15:16:56 [DEBUG]: Initializing knowledge graph manager...
  31. 2025-08-03 15:16:57 [DEBUG]: Knowledge graph manager initialized successfully
  32. 2025-08-03 15:16:57 [DEBUG]: Agent state manager initialized
  33. 2025-08-03 15:16:57 [DEBUG]: Initializing LLM service...
  34. 2025-08-03 15:16:57 [DEBUG]: ServiceCache: Cache miss, creating contextManager:26449362832
  35. 2025-08-03 15:16:57 [DEBUG]: Created context manager
  36. 2025-08-03 15:16:57 [DEBUG]: ContextManager initialized with formatter
  37. 2025-08-03 15:16:57 [DEBUG]: ServiceCache: Cached contextManager:26449362832
  38. 2025-08-03 15:16:57 [DEBUG]: Verified API key
  39. 2025-08-03 15:16:57 [INFO]: LLM service initialized successfully
  40. 2025-08-03 15:16:57 [INFO]: InternalToolRegistry: Initializing...
  41. 2025-08-03 15:16:57 [INFO]: InternalToolRegistry: Initialized successfully
  42. 2025-08-03 15:16:57 [DEBUG]: Workspace memory is disabled - excluding all workspace tools
  43. 2025-08-03 15:16:57 [DEBUG]: Knowledge graph enabled, loading knowledge graph tools
  44. 2025-08-03 15:16:57 [INFO]: Internal tools registration completed
  45. 2025-08-03 15:16:57 [DEBUG]: Unified tool manager initialized
  46. 2025-08-03 15:16:57 [DEBUG]: SessionManager: Starting initialization...
  47. 2025-08-03 15:16:57 [INFO]: SessionManager: Initializing persistence storage...
  48. 2025-08-03 15:16:57 [DEBUG]: SessionManager: Attempting to initialize PostgreSQL storage...
  49. 2025-08-03 15:16:57 [DEBUG]: SessionManager: Using PostgreSQL individual parameters
  50. 2025-08-03 15:16:57 [DEBUG]: TokenizerCache: Cache miss, creating new tokenizer
  51. 2025-08-03 15:16:57 [DEBUG]: Creating tokenizer
  52. 2025-08-03 15:16:57 [DEBUG]: TokenizerCache: Tokenizer cached
  53. 2025-08-03 15:16:57 [DEBUG]: ServiceCache: Cache miss, creating compressionStrategy:25840307394
  54. 2025-08-03 15:16:57 [DEBUG]: Creating compression strategy
  55. 2025-08-03 15:16:57 [DEBUG]: MiddleRemovalStrategy initialized
  56. 2025-08-03 15:16:57 [DEBUG]: OldestRemovalStrategy initialized
  57. 2025-08-03 15:16:57 [DEBUG]: HybridStrategy initialized
  58. 2025-08-03 15:16:57 [DEBUG]: ServiceCache: Cached compressionStrategy:25840307394
  59. 2025-08-03 15:16:57 [DEBUG]: [TokenAware] Token count reset (no messages or tokenizer)
  60. 2025-08-03 15:16:57 [DEBUG]: Token-aware compression configured
  61. 2025-08-03 15:16:57 [DEBUG]: Token-aware compression configured for LLM service
  62. 2025-08-03 15:16:57 [DEBUG]: OpenAI tokenizer initialized with tiktoken
  63. 2025-08-03 15:16:57 [INFO]: SessionManager: PostgreSQL persistence storage initialized successfully
  64. 2025-08-03 15:16:57 [INFO]: SessionManager: Storage initialized with database backend: postgres
  65. 2025-08-03 15:16:57 [INFO]: SessionManager: Found 0 session keys in storage with prefix 'cipher:sessions:'
  66. 2025-08-03 15:16:57 [DEBUG]: SessionManager.loadAllSessions: No sessions found in storage
  67. 2025-08-03 15:16:57 [DEBUG]: SessionManager: Initialization complete. No sessions found in storage. Current in-memory sessions: 0
  68. 2025-08-03 15:16:57 [DEBUG]: SessionManager initialized with max sessions: 100, TTL: 3600000ms
  69. 2025-08-03 15:16:57 [DEBUG]: Session manager with unified tools initialized
  70. 2025-08-03 15:16:57 [DEBUG]: Event emitted
  71. 2025-08-03 15:16:57 [DEBUG]: Event emitted
  72. 2025-08-03 15:16:57 [DEBUG]: MemAgent started successfully
  73. 2025-08-03 15:16:57 [DEBUG]: [MCP Handler] Initializing agent card resource
  74. 2025-08-03 15:16:57 [INFO]: [MCP Mode] Creating stdio transport for default MCP server
  75. 2025-08-03 15:16:57 [INFO]: [MCP Handler] Creating stdio transport
  76. 2025-08-03 15:16:57 [INFO]: [MCP Mode] Initializing default MCP server with agent capabilities
  77. 2025-08-03 15:16:57 [INFO]: [MCP Handler] Initializing MCP server with agent capabilities (mode: default)
  78. 2025-08-03 15:16:57 [DEBUG]: [MCP Handler] Registering agent tools (default mode - ask_cipher only)
  79. 2025-08-03 15:16:57 [INFO]: [MCP Handler] Registering 1 MCP tools: ask_cipher
  80. 2025-08-03 15:16:57 [DEBUG]: [MCP Handler] Registering agent resources
  81. 2025-08-03 15:16:57 [DEBUG]: [MCP Handler] Registering agent prompts
  82. 2025-08-03 15:16:57 [INFO]: [MCP Handler] MCP server initialized successfully (mode: default)
  83. 2025-08-03 15:16:57 [INFO]: [MCP Handler] Agent is now available as MCP server for external clients
  84. 2025-08-03 15:16:57 [INFO]: [MCP Mode] Cipher agent is now running as default MCP server
  85. 2025-08-03 15:17:07 [DEBUG]: MilvusConnectionPool: Connection expired
  86. 2025-08-03 15:17:07 [DEBUG]: MilvusConnectionPool: Connection closed and removed
  87. 2025-08-03 15:17:07 [DEBUG]: MilvusConnectionPool: Health check completed
  88. 2025-08-03 15:17:12 [INFO]: [MCP Handler] Tool called: ask_cipher
  89. 2025-08-03 15:17:15 [INFO]: [MCP Handler] Tool called: ask_cipher
  90. 2025-08-03 15:17:15 [INFO]: [MCP Handler] Processing ask_cipher request
  91. 2025-08-03 15:17:15 [DEBUG]: SessionManager: Session default not found in memory (0 active sessions), attempting to restore from persistent storage...
  92. 2025-08-03 15:17:15 [DEBUG]: SessionManager: No serialized data found for session default
  93. 2025-08-03 15:17:15 [DEBUG]: SessionManager: Session default not found in persistent storage either
  94. 2025-08-03 15:17:15 [DEBUG]: SessionManager: Creating new session default...
  95. 2025-08-03 15:17:15 [DEBUG]: SessionManager: Creating session default with storage manager: available
  96. 2025-08-03 15:17:15 [DEBUG]: SessionEventBus initialized
  97. 2025-08-03 15:17:15 [DEBUG]: SessionEventBus created
  98. 2025-08-03 15:17:15 [DEBUG]: Event emitted
  99. 2025-08-03 15:17:15 [INFO]: Session event emitted
  100. 2025-08-03 15:17:15 [INFO]: Session default: Serialized with 0 messages
  101. 2025-08-03 15:17:15 [DEBUG]: SessionManager: Saved session default to persistent storage with 0 messages
  102. 2025-08-03 15:17:15 [INFO]: SessionManager: Session default created and saved to persistent storage. Total active sessions: 1
  103. 2025-08-03 15:17:15 [DEBUG]: MemAgent.run: using session default
  104. 2025-08-03 15:17:15 [DEBUG]: ConversationSession.run called
  105. 2025-08-03 15:17:15 [DEBUG]: Running session default with input: quicksort implementation in javascript and imageDataInput: undefined and stream: false
  106. 2025-08-03 15:17:15 [DEBUG]: Using configured evalLlm for evaluation tasks
  107. 2025-08-03 15:17:15 [DEBUG]: ConversationSession: Reasoning services initialized
  108. 2025-08-03 15:17:15 [DEBUG]: Verified API key
  109. 2025-08-03 15:17:15 [DEBUG]: Session default: LLM service lazy-initialized
  110. 2025-08-03 15:17:15 [DEBUG]: Adding user message: [
  111.   {
  112.     "type": "text",
  113.     "text": "quicksort implementation in javascript"
  114.   }
  115. ]
  116. 2025-08-03 15:17:15 [DEBUG]: Adding message to context: {
  117.   "role": "user",
  118.   "content": [
  119.     {
  120.       "type": "text",
  121.       "text": "quicksort implementation in javascript"
  122.     }
  123.   ]
  124. }
  125. 2025-08-03 15:17:15 [DEBUG]: Total messages in context: 1
  126. 2025-08-03 15:17:15 [INFO]: Token counting: tiktoken count
  127. 2025-08-03 15:17:15 [INFO]: [TokenAware] Token count updated: 6 tokens for 1 messages
  128. 2025-08-03 15:17:15 [INFO]: UnifiedToolManager: Getting tools for provider: openrouter
  129. 2025-08-03 15:17:15 [DEBUG]: UnifiedToolManager: Getting all tools
  130. 2025-08-03 15:17:15 [DEBUG]: UnifiedToolManager: Default MCP mode - only ask_cipher tool exposed
  131. 2025-08-03 15:17:15 [INFO]: UnifiedToolManager: Got 1 total tools
  132. 2025-08-03 15:17:15 [INFO]: UnifiedToolManager: Formatting tools for OpenAI
  133. 2025-08-03 15:17:15 [DEBUG]: Tools in OpenRouter response: 1
  134. 2025-08-03 15:17:15 [DEBUG]: [SystemPrompt] Built complete system prompt (959 chars)
  135. 2025-08-03 15:17:15 [DEBUG]: Formatted 2 messages from history of 1 messages
  136. 2025-08-03 15:17:15 [DEBUG]: TokenizerCache: Cache hit
  137. 2025-08-03 15:17:15 [DEBUG]: ServiceCache: Cache hit for compressionStrategy:25840307394
  138. 2025-08-03 15:17:15 [INFO]: [TokenAware] Token count updated: 6 tokens for 1 messages
  139. 2025-08-03 15:17:15 [DEBUG]: Token-aware compression configured
  140. 2025-08-03 15:17:15 [DEBUG]: Token-aware compression configured for LLM service
  141. 2025-08-03 15:17:34 [DEBUG]: Adding message to context: {
  142.   "role": "assistant",
  143.   "content": "# QuickSort Implementation in JavaScript\n\nHere's a clean and efficient implementation of the QuickSort algorithm in JavaScript:\n\n```javascript\nfunction quickSort(arr, low = 0, high = arr.length - 1) {\n    if (low < high) {\n        // Partition the array and get the pivot index\n        const pivotIndex = partition(arr, low, high);\n        \n        // Recursively sort elements before and after partition\n        quickSort(arr, low, pivotIndex - 1);\n        quickSort(arr, pivotIndex + 1, high);\n    }\n    return arr;\n}\n\nfunction partition(arr, low, high) {\n    // Choose the rightmost element as pivot\n    const pivot = arr[high];\n    \n    // Index of smaller element (indicates right position of pivot)\n    let i = low - 1;\n    \n    for (let j = low; j < high; j++) {\n        // If current element is smaller than or equal to pivot\n        if (arr[j] <= pivot) {\n            i++; // Increment index of smaller element\n            [arr[i], arr[j]] = [arr[j], arr[i]]; // Swap elements\n        }\n    }\n    \n    // Place pivot in its correct position\n    [arr[i + 1], arr[high]] = [arr[high], arr[i + 1]];\n    \n    // Return the position where partition is done\n    return i + 1;\n}\n\n// Example usage:\nconst array = [10, 7, 8, 9, 1, 5];\nconsole.log(\"Original array:\", array);\nconst sortedArray = quickSort([...array]); // Using spread to avoid mutating original\nconsole.log(\"Sorted array:\", sortedArray);\n```\n\n## How it works:\n\n1. **Divide**: Choose a pivot element and partition the array around it, placing smaller elements to the left and larger elements to the right\n2. **Conquer**: Recursively apply the same process to the sub-arrays\n3. **Combine**: No explicit combining step is needed as the array is sorted in-place\n\n## Key Features:\n\n- **Time Complexity**: \n  - Average case: O(n log n)\n  - Worst case: O(n²) - when the pivot is always the smallest or largest element\n  - Best case: O(n log n)\n  \n- **Space Complexity**: O(log n) due to recursive call stack\n\n- **In-place**: Sorts the array without requiring additional storage\n\n- **Not stable**: May change the relative order of equal elements\n\nThe implementation uses the last element as the pivot and follows the Lomuto partition scheme. For better performance with certain data distributions, you might consider using a randomized pivot selection strategy."
  144. }
  145. 2025-08-03 15:17:34 [DEBUG]: Total messages in context: 2
  146. 2025-08-03 15:17:34 [INFO]: [TokenAware] Token count updated: 567 tokens for 2 messages
  147. 2025-08-03 15:17:34 [DEBUG]: Starting background memory operations
  148. 2025-08-03 15:17:34 [DEBUG]: ConversationSession.enforceMemoryExtraction called
  149. 2025-08-03 15:17:34 [DEBUG]: enforceMemoryExtraction: unifiedToolManager at entry
  150. 2025-08-03 15:17:34 [DEBUG]: ConversationSession: Enforcing memory extraction for interaction
  151. 2025-08-03 15:17:34 [DEBUG]: ConversationSession: Memory tools to execute
  152. 2025-08-03 15:17:34 [DEBUG]: ConversationSession: Extracted comprehensive interaction data
  153. 2025-08-03 15:17:34 [DEBUG]: UnifiedToolManager: Executing tool 'cipher_extract_and_operate_memory' (without loading)
  154. 2025-08-03 15:17:34 [DEBUG]: UnifiedToolManager: Routing 'cipher_extract_and_operate_memory' to internal tool manager (without loading)
  155. 2025-08-03 15:17:34 [DEBUG]: InternalToolManager: Executing tool 'cipher_extract_and_operate_memory'
  156. 2025-08-03 15:17:34 [DEBUG]: ExtractAndOperateMemory: Using knowledge collection
  157. 2025-08-03 15:17:34 [DEBUG]: ExtractAndOperateMemory: Processing fact 1/2
  158. 2025-08-03 15:17:34 [DEBUG]: [EMBEDDING] Starting Ollama embedding
  159. 2025-08-03 15:17:34 [DEBUG]: [EMBEDDING] Updating dimension from 768 to 1024
  160. 2025-08-03 15:17:34 [DEBUG]: [EMBEDDING] Ollama embedding completed
  161. 2025-08-03 15:17:34 [WARN]: ExtractAndOperateMemory: Failed to search similar memories for fact 1
  162. 2025-08-03 15:17:34 [DEBUG]: ExtractAndOperateMemory: Similarity search completed for fact 1
  163. 2025-08-03 15:17:34 [DEBUG]: OpenRouterService: Direct generate call (bypassing conversation context)
  164. 2025-08-03 15:17:45 [DEBUG]: OpenRouterService: Direct generate completed
  165. 2025-08-03 15:17:45 [DEBUG]: ExtractAndOperateMemory: LLM decision for fact 1
  166. 2025-08-03 15:17:45 [DEBUG]: ExtractAndOperateMemory: Processing fact 2/2
  167. 2025-08-03 15:17:45 [DEBUG]: [EMBEDDING] Starting Ollama embedding
  168. 2025-08-03 15:17:45 [DEBUG]: [EMBEDDING] Ollama embedding completed
  169. 2025-08-03 15:17:45 [WARN]: ExtractAndOperateMemory: Failed to search similar memories for fact 2
  170. 2025-08-03 15:17:45 [DEBUG]: ExtractAndOperateMemory: Similarity search completed for fact 2
  171. 2025-08-03 15:17:45 [DEBUG]: OpenRouterService: Direct generate call (bypassing conversation context)
  172. 2025-08-03 15:17:48 [DEBUG]: OpenRouterService: Direct generate completed
  173. 2025-08-03 15:17:48 [DEBUG]: ExtractAndOperateMemory: LLM decision for fact 2
  174. 2025-08-03 15:17:48 [DEBUG]: ExtractAndOperateMemory: Starting memory persistence operations
  175. 2025-08-03 15:17:48 [DEBUG]: [EMBEDDING] Starting Ollama embedding
  176. 2025-08-03 15:17:48 [DEBUG]: [EMBEDDING] Ollama embedding completed
  177. 2025-08-03 15:17:48 [ERROR]: ExtractAndOperateMemory: ADD operation failed, continuing with others
  178. 2025-08-03 15:17:48 [WARN]: [EMBEDDING:MANAGER] Embedding operation failed but will retry
  179. 2025-08-03 15:17:48 [DEBUG]: [EMBEDDING] Starting Ollama embedding
  180. 2025-08-03 15:17:48 [DEBUG]: [EMBEDDING] Ollama embedding completed
  181. 2025-08-03 15:17:48 [ERROR]: ExtractAndOperateMemory: ADD operation failed, continuing with others
  182. 2025-08-03 15:17:48 [WARN]: [EMBEDDING:MANAGER] Embedding operation failed but will retry
  183. 2025-08-03 15:17:48 [DEBUG]: ExtractAndOperateMemory: Memory persistence completed
  184. 2025-08-03 15:17:48 [DEBUG]: InternalToolManager: Tool 'cipher_extract_and_operate_memory' executed successfully
  185. 2025-08-03 15:17:48 [DEBUG]: ConversationSession: Default memory tool executed successfully
  186. 2025-08-03 15:17:48 [DEBUG]: ConversationSession: Memory extraction completed
  187. 2025-08-03 15:17:48 [DEBUG]: UnifiedToolManager: Getting all tools
  188. 2025-08-03 15:17:48 [DEBUG]: UnifiedToolManager: Default MCP mode - only ask_cipher tool exposed
  189. 2025-08-03 15:17:48 [DEBUG]: ConversationSession: Enforcing reflection memory processing
  190. 2025-08-03 15:17:48 [DEBUG]: ConversationSession: Reflection memory processing skipped
  191. 2025-08-03 15:17:48 [DEBUG]: Background memory operations completed successfully
Advertisement
Add Comment
Please, Sign In to add comment