<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Snow leopard</title>
    <description>The latest articles on DEV Community by Snow leopard (@snowleopard-io).</description>
    <link>https://dev.to/snowleopard-io</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4057860%2Fe05c018b-c260-445c-bedf-d4a438742c52.jpg</url>
      <title>DEV Community: Snow leopard</title>
      <link>https://dev.to/snowleopard-io</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/snowleopard-io"/>
    <language>en</language>
    <item>
      <title>CogitoAgent: An Open-Source, Local-First AI Agent That Thinks Continuously and Runs 200+ Tools</title>
      <dc:creator>Snow leopard</dc:creator>
      <pubDate>Sat, 01 Aug 2026 11:17:29 +0000</pubDate>
      <link>https://dev.to/snowleopard-io/cogitoagent-an-open-source-local-first-ai-agent-that-thinks-continuously-and-runs-200-tools-5ae0</link>
      <guid>https://dev.to/snowleopard-io/cogitoagent-an-open-source-local-first-ai-agent-that-thinks-continuously-and-runs-200-tools-5ae0</guid>
      <description>&lt;h1&gt;
  
  
  CogitoAgent: An Open-Source, Local-First AI Agent That Thinks Continuously and Runs 200+ Tools
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Think continuously. Act autonomously. Stay private.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most AI agents today fall into one of two camps: they either upload your files to a third-party cloud, or they sit idle until you type another prompt. &lt;strong&gt;CogitoAgent&lt;/strong&gt; is an open-source project that takes a different stance — your files stay on your machine, and the agent keeps thinking on its own.&lt;/p&gt;

&lt;p&gt;In this post, I'll walk through what CogitoAgent is, how it's architected, and why you might want to give it a star.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/SnowLeopard-io/CogitoAgent" rel="noopener noreferrer"&gt;https://github.com/SnowLeopard-io/CogitoAgent&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gitee (China mirror):&lt;/strong&gt; &lt;a href="https://gitee.com/cnt-code/cogito-agent" rel="noopener noreferrer"&gt;https://gitee.com/cnt-code/cogito-agent&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;License:&lt;/strong&gt; Apache 2.0&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stack:&lt;/strong&gt; TypeScript 5.x · Node.js ≥ 22.12 · Electron · isolated-vm&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Current version:&lt;/strong&gt; v2.3.2&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyqn4pfz2d8nvoor63655.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyqn4pfz2d8nvoor63655.png" alt="show" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is CogitoAgent?
&lt;/h2&gt;

&lt;p&gt;CogitoAgent is an open-source autonomous agent framework that runs &lt;strong&gt;directly inside your local workspace&lt;/strong&gt;. It calls the LLM API of your choice (any OpenAI-compatible endpoint, BYO key) to drive reasoning and decisions, while &lt;strong&gt;your files, code, git repos, and databases never leave your machine&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The key phrase is &lt;strong&gt;"cloud-driven, local-executed."&lt;/strong&gt; It is &lt;em&gt;not&lt;/em&gt; a fully offline local LLM (that's on the roadmap). Instead, only the conversation context is sent to your specified LLM API — file I/O, code execution, git operations, and database queries all happen locally.&lt;/p&gt;

&lt;p&gt;If you've used AutoGPT, Claude Code, or Cline, here's how CogitoAgent positions itself:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;th&gt;CogitoAgent&lt;/th&gt;
&lt;th&gt;AutoGPT&lt;/th&gt;
&lt;th&gt;Claude Code&lt;/th&gt;
&lt;th&gt;Cline&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Files stay local&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;⚠️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Continuous thinking (auto-cycle)&lt;/td&gt;
&lt;td&gt;✅ 3s&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Desktop GUI (Electron)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MCP support&lt;/td&gt;
&lt;td&gt;✅ Server&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅ Client&lt;/td&gt;
&lt;td&gt;✅ Client&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plugin system&lt;/td&gt;
&lt;td&gt;✅ Dynamic&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-agent cluster&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Code sandbox (isolated-vm)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;200+ built-in tools&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Open source&lt;/td&gt;
&lt;td&gt;✅ Apache 2.0&lt;/td&gt;
&lt;td&gt;✅ MIT&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅ Apache 2.0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Core Features at a Glance
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript core&lt;/strong&gt; — Full TypeScript rewrite with compile-time type safety.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy first&lt;/strong&gt; — Workspace files stay local; only conversation context is sent to your LLM API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Continuous thinking&lt;/strong&gt; — &lt;code&gt;thinkCycle()&lt;/code&gt; auto-triggers every 3 seconds (configurable).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool execution&lt;/strong&gt; — 28 tool modules, 200+ tools, covering file ops, code, git, databases, OCR, Office, GIS, bioinformatics, medicine, chemistry, finance, and more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security sandbox&lt;/strong&gt; — JavaScript runs in &lt;code&gt;isolated-vm&lt;/code&gt; for process-level isolation; Python via subprocess.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-session management&lt;/strong&gt; — Independent sessions with persistent storage and auto-compression (150 turns / 100k tokens).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Desktop mode&lt;/strong&gt; — Electron windows communicate with the terminal agent via WebSocket (port 9527).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP protocol&lt;/strong&gt; — Exposes all tools as an MCP Server (JSON-RPC 2.0 on port 3001) for integration with other AI clients.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plugin system&lt;/strong&gt; — Dynamically load custom tool plugins.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thought chain visualization&lt;/strong&gt; — Real-time visualization of the reasoning process and tool executions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent cluster&lt;/strong&gt; — Sub-agent spawning, task delegation, and multi-agent collaboration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WeChat integration&lt;/strong&gt; — QR login, message send/receive, dedicated session (via iLink protocol, optional).&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Architecture: Think Loop + State Machine + Registry
&lt;/h2&gt;

&lt;p&gt;The cleanest way to understand CogitoAgent is through three core components.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Think Loop (&lt;code&gt;Agent.ts&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;This is what makes the agent "think on its own." A reasoning cycle fires every 3 seconds (configurable):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;thinkCycle() fires
   ↓
streamChat()  →  SSE stream to LLM API
   ↓
tool-parser.ts parses [TOOL] fn(args) [/TOOL]
   ↓
executeTool()  →  registry lookup, run tool
   ↓
scheduleNextCycle()  →  loop control
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tool calls are expressed via a custom &lt;code&gt;[TOOL] functionName(args) [/TOOL]&lt;/code&gt; tag format, parsed by &lt;code&gt;tool-parser.ts&lt;/code&gt;. The advantage of this approach over native function calling: &lt;strong&gt;it's model-agnostic&lt;/strong&gt; — any model that can emit text can drive tools, which is why CogitoAgent works with GPT, Claude, or any OpenAI-compatible provider.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The State Machine (&lt;code&gt;state.ts&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;The agent cycles through three states:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;AWAITING_INPUT&lt;/code&gt; — waiting for user input&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;THINKING&lt;/code&gt; — currently reasoning&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AWAITING_CONFIRMATION&lt;/code&gt; — waiting for user approval (for dangerous ops)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;code&gt;AWAITING_CONFIRMATION&lt;/code&gt; state pairs with a &lt;code&gt;DANGEROUS_OPERATIONS&lt;/code&gt; mechanism — destructive actions (file deletion, &lt;code&gt;git push&lt;/code&gt;, etc.) require explicit user confirmation before executing. This is how CogitoAgent balances autonomy with safety.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The Tool Registry (&lt;code&gt;registry.ts&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;All tools are registered in a single &lt;code&gt;TOOL_REGISTRY&lt;/code&gt;, queried by &lt;code&gt;executeTool()&lt;/code&gt;. Centralizing this gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Observability via stats&lt;/strong&gt; — &lt;code&gt;stats.ts&lt;/code&gt; tracks tool call counts and success rates per category.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tracing&lt;/strong&gt; — &lt;code&gt;tracing.ts&lt;/code&gt; logs tool execution events with durations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unified extensibility&lt;/strong&gt; — plugins (&lt;code&gt;plugin.ts&lt;/code&gt;) and MCP (&lt;code&gt;mcp.ts&lt;/code&gt;) both inject into the same registry; the main loop is unaware of the source.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff4t3qvh98r34n84gfqum.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff4t3qvh98r34n84gfqum.png" alt="show" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Tool System: 200+ Tools Across 28 Modules
&lt;/h2&gt;

&lt;p&gt;This is the thickest part of the project. A sample of the modules:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Representative Tools&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;File ops&lt;/td&gt;
&lt;td&gt;&lt;code&gt;file.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ls / read / write / copy / move / rename / delete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Browser automation&lt;/td&gt;
&lt;td&gt;&lt;code&gt;browser.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;initBrowser / clickElement / fillField / takeScreenshot / searchOnEngine / downloadFile&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Code execution&lt;/td&gt;
&lt;td&gt;&lt;code&gt;code.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;executeCode / runJavaScript / runPython / formatCode&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Security sandbox&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sandbox.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;createJavaScriptSandbox / runJavaScriptSandbox / runPythonSandbox&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;gitInit / gitClone / gitCommit / gitPush / gitBranchCreate / gitMerge / gitDiff&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task management&lt;/td&gt;
&lt;td&gt;&lt;code&gt;task.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;createTask / splitTask / updateTask / getTaskStats&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory&lt;/td&gt;
&lt;td&gt;&lt;code&gt;memory.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;addMemory / searchMemory / getRelatedMemories (tag-based semantic retrieval)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data processing&lt;/td&gt;
&lt;td&gt;&lt;code&gt;data.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;readCSV / writeJSON / csvToJSON / queryData / aggregateData&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;&lt;code&gt;db.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;executeSQL / createTable / executeTransaction (via sql.js)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Email&lt;/td&gt;
&lt;td&gt;&lt;code&gt;email.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;sendEmail / sendHtmlEmail / sendEmailWithAttachments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;System monitoring&lt;/td&gt;
&lt;td&gt;&lt;code&gt;monitor.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;getCPUInfo / getMemoryInfo / getProcesses / monitorSystem&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scheduler&lt;/td&gt;
&lt;td&gt;&lt;code&gt;scheduler.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;addScheduleTask / toggleScheduleTask / startScheduler&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Office docs&lt;/td&gt;
&lt;td&gt;&lt;code&gt;office.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;createPpt / createWord / createExcel / readExcel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vision&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ocr.ts&lt;/code&gt; / &lt;code&gt;vision.ts&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;ocr / ocrBatch / vision / visionFromUrl&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cluster&lt;/td&gt;
&lt;td&gt;&lt;code&gt;cluster.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;spawnAgent / delegateTask / parallelExecute / pipeline / voting / panelDiscussion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GIS&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gis.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;convertCoord / calcDistance / calcArea / readGeoJSON / geoJSONToKML&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bioinformatics&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bio.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;dnaComplement / gcContent / tmEstimate / parseFASTA / codonUsage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Medicine&lt;/td&gt;
&lt;td&gt;&lt;code&gt;med.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;bmi / bsa / egfr / crcl / calculateDose / vitalsReport&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chemistry&lt;/td&gt;
&lt;td&gt;&lt;code&gt;chem.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;molWeight / molarity / dilution / phFromH / idealGasLaw&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Finance&lt;/td&gt;
&lt;td&gt;&lt;code&gt;finance.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;npv / irr / roi / loanPayment / amortizationSchedule / volatility&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Math / stats&lt;/td&gt;
&lt;td&gt;&lt;code&gt;math.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;describe / correlation / linearRegression / matrixInverse / factorial&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;The takeaway:&lt;/strong&gt; CogitoAgent isn't just a "coding agent." It bundles scientific computing (bioinformatics, molecular weight, medical formulas), geospatial processing, financial calculations, document generation, browser automation, and more into a single registry. For researchers, analysts, and office-automation tinkerers, this breadth often matters more than raw code generation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Extending the tool set
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plugin system&lt;/strong&gt; (&lt;code&gt;plugin.ts&lt;/code&gt;) — dynamically load custom tool plugins. The repo ships three example plugins under &lt;code&gt;plugins/&lt;/code&gt;: &lt;code&gt;biopython-bio&lt;/code&gt;, &lt;code&gt;pubmed-research&lt;/code&gt;, and &lt;code&gt;rdkit-chem&lt;/code&gt; (bioinformatics / literature search / cheminformatics).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP protocol&lt;/strong&gt; (&lt;code&gt;mcp.ts&lt;/code&gt;) — expose all 200+ tools as an MCP Server, so any MCP-compatible AI client can reuse CogitoAgent's tool ecosystem.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm4y7uhyqfdpy5krw431e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm4y7uhyqfdpy5krw431e.png" alt="show" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Multi-Agent Cluster: From "One Helper" to "A Team"
&lt;/h2&gt;

&lt;p&gt;One of the most interesting features. Via &lt;code&gt;orchestrator.ts&lt;/code&gt; and &lt;code&gt;cluster.ts&lt;/code&gt;, the main agent can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/spawn &amp;lt;persona&amp;gt; &amp;lt;name&amp;gt; &amp;lt;instruction&amp;gt;&lt;/code&gt;&lt;/strong&gt; — create a sub-agent with a given persona&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/delegate &amp;lt;agentId&amp;gt; &amp;lt;task&amp;gt;&lt;/code&gt;&lt;/strong&gt; — delegate a task to a sub-agent&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;parallelExecute&lt;/code&gt;&lt;/strong&gt; — run sub-agents in parallel&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;pipeline&lt;/code&gt;&lt;/strong&gt; — chain sub-agents in a sequential pipeline&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;voting&lt;/code&gt; / &lt;code&gt;panelDiscussion&lt;/code&gt;&lt;/strong&gt; — voting or round-table decision patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sub-agent state transitions are standardized:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;idle → thinking → tool_executing → thinking → ... → done
  ↓                                                    ↓
  └────────────────── error ←──────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A dedicated &lt;strong&gt;monitor panel&lt;/strong&gt; (a separate Electron window, 16:9 layout) provides three real-time visualizations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Thought Chain&lt;/strong&gt; — live reasoning steps with parameters, status, and duration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool Statistics&lt;/strong&gt; — an ECharts bar chart of call counts and success rates per category; color intensity encodes success rate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cluster Topology&lt;/strong&gt; — a Canvas-rendered ring topology with the main agent at the center and sub-agents around it; active nodes pulse.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This means you can not only delegate work — you can &lt;em&gt;watch the agents work&lt;/em&gt;, which is genuinely useful for debugging multi-agent behavior and studying agent observability.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqrp01ka6v8o62gmi60v3.png" alt="show" width="800" height="398"&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Persona System: Programmers, Doctors, Knights-Errant...
&lt;/h2&gt;

&lt;p&gt;CogitoAgent ships with 20+ preset personas in the &lt;code&gt;personas/&lt;/code&gt; directory, split into two families:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Modern professional roles&lt;/strong&gt; — Programmer, Doctor, Biologist, Chemist, Computational-Scientist, Scholar, Detective, Psychologist, Teacher, Chef, Painter, Strategist, Merchant...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Historical / regional roles&lt;/strong&gt; — Knight-Errant, Imperial-Critic, Scholar-Official, Mongolian-Youth, Shaanbei-Youth, Tibetan-Youth, Warrior, Shadow-Guard, Hermit...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Personas load via &lt;code&gt;system-prompt.ts&lt;/code&gt; and can be hot-swapped with &lt;code&gt;/persona &amp;lt;name&amp;gt;&lt;/code&gt;. Each persona has its own &lt;code&gt;persona.md&lt;/code&gt; file; some include portrait images.&lt;/p&gt;

&lt;p&gt;Combined with the cluster feature, this lets you &lt;strong&gt;spawn a Scholar sub-agent for literature review, a Programmer sub-agent to write code, and a Critic sub-agent to review it&lt;/strong&gt; — different "personalities" each owning a slice of the task.&lt;/p&gt;




&lt;h2&gt;
  
  
  Three Usage Modes
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;npm start&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Setup wizard&lt;/td&gt;
&lt;td&gt;First-time config or modifying settings (API URL, key, model, workspace, persona)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;npm run electron:desktop&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Desktop mode&lt;/td&gt;
&lt;td&gt;Electron overlay window + terminal agent, daily desktop use&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;npm run electron:dashboard&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Dashboard mode&lt;/td&gt;
&lt;td&gt;Full-screen dashboard with session management, tool viz, and monitor panel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;npm run cli&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;CLI mode&lt;/td&gt;
&lt;td&gt;Pure terminal, no Electron — servers / headless / CI&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Requirements:&lt;/strong&gt; Node.js ≥ 22.12, npm or yarn, Python 3.x (optional, for Python code execution).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/SnowLeopard-io/CogitoAgent.git
&lt;span class="nb"&gt;cd &lt;/span&gt;CogitoAgent
npm &lt;span class="nb"&gt;install
&lt;/span&gt;npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First launch asks for five things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;API base URL&lt;/strong&gt; — any OpenAI-compatible endpoint&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API key&lt;/strong&gt; — your key&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model name&lt;/strong&gt; — e.g. &lt;code&gt;gpt-4o&lt;/code&gt;, &lt;code&gt;claude-3-sonnet&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workspace path&lt;/strong&gt; — the directory the agent can access (use a dedicated folder, not your home dir)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persona&lt;/strong&gt; — pick a preset role&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Docker one-liner also works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note for users in China:&lt;/strong&gt; if &lt;code&gt;npm install&lt;/code&gt; fails to fetch the Electron binary, set &lt;code&gt;ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/&lt;/code&gt; before installing. A Gitee mirror is also available for faster cloning: &lt;a href="https://gitee.com/cnt-code/cogito-agent" rel="noopener noreferrer"&gt;https://gitee.com/cnt-code/cogito-agent&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Handy commands
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/sessions&lt;/code&gt; &lt;code&gt;/new&lt;/code&gt; &lt;code&gt;/switch &amp;lt;id&amp;gt;&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;multi-session management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/persona &amp;lt;name&amp;gt;&lt;/code&gt; &lt;code&gt;/personas&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;switch / list personas&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/tools&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;list all available tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/status&lt;/code&gt; &lt;code&gt;/config&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;show status / config&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/spawn&lt;/code&gt; &lt;code&gt;/agents&lt;/code&gt; &lt;code&gt;/delegate&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;multi-agent cluster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ENTER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;interrupt thinking, enter input mode&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Safety tip:&lt;/strong&gt; always scope the "workspace path" to a dedicated folder. When the agent attempts a destructive op, it enters &lt;code&gt;AWAITING_CONFIRMATION&lt;/code&gt; — review carefully before approving.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Who Is This For?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Researchers / data analysts&lt;/strong&gt; — bio, chem, med, GIS, and finance tools out of the box; let the agent run sequence analysis, compute molecular weights, or do financial calculations directly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Office automation enthusiasts&lt;/strong&gt; — Office docs, email, scheduler, browser automation in one place.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI agent developers / researchers&lt;/strong&gt; — a fairly complete open-source reference for multi-agent collaboration, agent observability, and the MCP protocol.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy-conscious developers&lt;/strong&gt; — if you don't want your code and files uploaded to a cloud, and you're fine bringing your own LLM key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WeChat bot / private-domain automation tinkerers&lt;/strong&gt; — iLink protocol + 200+ tools is a powerful playground (evaluate ToS risk yourself).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Roadmap Highlights
&lt;/h2&gt;

&lt;p&gt;Recent releases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;v2.3.2&lt;/strong&gt; (2025-07) — full TypeScript migration; 6 new professional modules (GIS, Bio, Med, Chem, Finance, Math); CI/CD pipelines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;v2.3.1&lt;/strong&gt; — WeChat iLink protocol integration with QR login and messaging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;v2.3.0&lt;/strong&gt; — multi-session, sandbox upgrade, MCP protocol, plugin system, OCR/vision, thought-chain visualization.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What's coming next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local LLM support&lt;/strong&gt; (Ollama / LM Studio — no API key needed)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VS Code extension&lt;/strong&gt; and &lt;strong&gt;MCP Client mode&lt;/strong&gt; (connect to external MCP servers)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long-term memory&lt;/strong&gt; via local vector DB, and &lt;strong&gt;scheduled autonomous tasks&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Long-term: mobile companion app, plugin marketplace, enterprise features (RBAC, audit, SSO)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Honest Limitations
&lt;/h2&gt;

&lt;p&gt;To keep this honest:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Not fully offline&lt;/strong&gt; — it still calls a cloud LLM API. True local inference is on the roadmap but not shipped yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not beginner-friendly&lt;/strong&gt; — you need an API key, Node.js, and basic terminal literacy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Continuous thinking = continuous token spend&lt;/strong&gt; — the 3s loop is a no-op when idle, but pair it with task management to avoid burning tokens on nothing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WeChat automation carries ToS risk&lt;/strong&gt; — use with personal accounts and at your own risk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breadth over depth&lt;/strong&gt; — 200+ tools cover a lot of ground, but some domain tools (bio, chem) are suited for lightweight calculations, not heavy-duty workloads.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Community &amp;amp; Contributing
&lt;/h2&gt;

&lt;p&gt;CogitoAgent is Apache 2.0 and actively welcomes community contributions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⭐ &lt;strong&gt;Star the repo:&lt;/strong&gt; &lt;a href="https://github.com/SnowLeopard-io/CogitoAgent" rel="noopener noreferrer"&gt;https://github.com/SnowLeopard-io/CogitoAgent&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🐛 &lt;strong&gt;Report bugs / request features:&lt;/strong&gt; &lt;a href="https://github.com/SnowLeopard-io/CogitoAgent/issues" rel="noopener noreferrer"&gt;https://github.com/SnowLeopard-io/CogitoAgent/issues&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💬 &lt;strong&gt;Join discussions:&lt;/strong&gt; &lt;a href="https://github.com/SnowLeopard-io/CogitoAgent/discussions" rel="noopener noreferrer"&gt;https://github.com/SnowLeopard-io/CogitoAgent/discussions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🌱 &lt;strong&gt;Good First Issues:&lt;/strong&gt; &lt;a href="https://github.com/SnowLeopard-io/CogitoAgent/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22" rel="noopener noreferrer"&gt;https://github.com/SnowLeopard-io/CogitoAgent/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The repo ships with 10 labeled beginner-friendly tasks under &lt;code&gt;.github/good-first-issues/&lt;/code&gt; (e.g. "add unit tests for finance/math tools," "add JSDoc to tool functions," "add YAML processing tools," "add timezone/date utility tools"). Perfect for a first open-source PR.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;CogitoAgent's slogan — &lt;em&gt;"Think continuously. Act autonomously. Stay private."&lt;/em&gt; — borrows from Descartes' &lt;em&gt;Cogito, ergo sum&lt;/em&gt;. In a market flooded with AI agents, it picks a less flashy but solid path: &lt;strong&gt;keep execution local, make tools thick, build multi-agent for real, and keep the protocol open.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're looking for an agent framework that lives on your machine, thinks on its own, calls a pile of tools, and doesn't ship your files to the cloud — give it a try, star the repo, or pick a Good First Issue. The next version might just include your code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/SnowLeopard-io/CogitoAgent" rel="noopener noreferrer"&gt;https://github.com/SnowLeopard-io/CogitoAgent&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Gitee (China mirror): &lt;a href="https://gitee.com/cnt-code/cogito-agent" rel="noopener noreferrer"&gt;https://gitee.com/cnt-code/cogito-agent&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Good First Issues: &lt;a href="https://github.com/SnowLeopard-io/CogitoAgent/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22" rel="noopener noreferrer"&gt;https://github.com/SnowLeopard-io/CogitoAgent/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Discussions: &lt;a href="https://github.com/SnowLeopard-io/CogitoAgent/discussions" rel="noopener noreferrer"&gt;https://github.com/SnowLeopard-io/CogitoAgent/discussions&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, consider sharing it with someone who'd like a local-first AI agent. Comments and feedback are welcome — I read every one.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>typescript</category>
      <category>node</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
