<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>权限 on 虫子樱桃</title>
    <link>https://czyt.eu.org/tags/%E6%9D%83%E9%99%90/</link>
    <description>Recent content in 权限 on 虫子樱桃</description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    <copyright>{year} 虫子樱桃</copyright>
    <lastBuildDate>Thu, 17 Sep 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://czyt.eu.org/tags/%E6%9D%83%E9%99%90/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Memoh 源码解读：一个多 Agent 平台的架构设计参考</title>
      <link>https://czyt.eu.org/post/memoh-source-code-analysis/</link>
      <pubDate>Thu, 17 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://czyt.eu.org/post/memoh-source-code-analysis/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;本文基于 &lt;a href=&#34;https://github.com/felinics/Memoh&#34; class=&#34;prose-external&#34;&gt;felinics/Memoh&lt;span class=&#34;prose-external-mark&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&lt;/a&gt;
（commit &lt;code&gt;1aaef83&lt;/code&gt;）源码写作。所有代码引用均为仓库内相对路径与行号，可直接到 GitHub 对应行查看。
写作目标：一是拆解这个生产级多 Agent 平台的模块划分、权限设计、AI 调度与流转；二是提炼出&lt;strong&gt;你可以直接借鉴&lt;/strong&gt;的设计模式。如果你没开发过 agent，先读第 1 章的入门部分。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;0-项目速览memoh-是什么&#34;&gt;0. 项目速览：Memoh 是什么&lt;/h2&gt;
&lt;p&gt;Memoh 是一个开源多 Agent 平台，核心卖点是&lt;strong&gt;给每个 AI agent 一台自己的&amp;quot;云电脑&amp;quot;&lt;/strong&gt;：独立的容器 workspace（文件系统、桌面、浏览器、网络），24/7 在线，通过 Telegram / Discord / 飞书 / 微信 / Matrix / 邮件等渠道对话，带长期记忆，支持定时任务，还能托管 Claude Code、Codex 等外部 CLI agent。&lt;/p&gt;
&lt;p&gt;技术栈：Go + Echo + Uber FX（后端）、Vue 3（Web）、PostgreSQL（主存储）、Qdrant（向量记忆）、Docker/containerd/Apple Virtualization（workspace 容器）、可选 Redis（集群模式队列）。&lt;/p&gt;
&lt;p&gt;代码规模：&lt;code&gt;internal/&lt;/code&gt; 下 76 个领域包，仅 &lt;code&gt;internal/agent&lt;/code&gt; 就约 9MB 源码，是一个&lt;strong&gt;认真做过生产级调度设计&lt;/strong&gt;的项目。这正是值得读它的原因。大多数开源 agent 项目把&amp;quot;调度&amp;quot;做成内存里的一个循环，而 Memoh 把 turn 的准入、所有权、幂等、恢复全部持久化到了 PostgreSQL，用数据库约束解决并发问题。这是本文最想讲清楚的部分。&lt;/p&gt;
&lt;h2 id=&#34;1-agent-运行原理入门写给没写过-agent-的人&#34;&gt;1. Agent 运行原理入门（写给没写过 agent 的人）&lt;/h2&gt;
&lt;p&gt;在深入 Memoh 之前，先用它的真实代码把四个基础概念讲明白：&lt;strong&gt;编排（orchestration）、调度（scheduling）、上下文注入（context injection）、输出获取（output consumption）&lt;/strong&gt;。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
