Agent 开发框架

kith|多智能体关系与社会记忆库

kith

一个以 Python 库形式提供的多智能体社会记忆存储,记录智能体之间的关系观察、派生信任视图,并在读取端统一执行可见性边界。

获取与使用

需要部署

按官方资料自行安装或部署

使用难度待核验
国内可用性待核验

2026-11-09 更新 · 本站尚未实测

项目介绍

Agent 开发框架 · 2026-11-09 更新 · 本站尚未实测

kith 是面向多智能体系统的“社会记忆”库。README 将其定位为补充事实型记忆(如 Mem0、Zep、LangMem)之外的另一类记忆:事实记忆回答“该记住什么事实”,kith 回答“谁记得关于谁的什么事、这些记忆对谁可见”。它是一个小型 Python 库,默认使用 SQLite,作者声明零重依赖,导入名为 kith,PyPI 包名为 kith-ai。

需要区分:本仓库是可供程序调用的库,不是独立聊天客户端,也不是现成的 Agent 产品;是否适合接入具体 Agent 框架,需结合所给适配器资料核验。发布页、MCP 配置等采集资料缺失。

核心能力

点击能力名称查看输入、输出和原文依据。

  • 观察(Observations):以只追加方式记录主体之间的交互、声明、情绪判断等事件。
  • 关系视图(Relationship views):信任、可靠性、情绪、能力等指标由观察记录派生,带衰减与来源追溯,可通过 view.explain() 查看推导依据。
  • 作用域契约(Scope contracts):每条记忆带显式可见性边界,在读取路径下方统一设闸;README 声称有泄漏路径测试套件。
  • 身份由运行时决定:模型只能说 current/peer,具体身份由运行时解析,模型不能自行编造 ID。
  • 可插拔心理模型:默认的信任、可靠性、情绪派生器可替换。
  • 适配器:提供 LangGraph、hermes-agent、A2A 集成说明。
  • README 给出一个无 LLM 调用的种子化委派模拟,声称重复委派失败减少 82%;该结果来自项目自带示例,非本站实测。

实际应用场景

适用场景

  • 多智能体团队中记录各成员的履约记录,辅助主管按历史表现选择工作者。
  • 需要跨上下文隐私边界、避免某方私下判断泄漏到共享通道的场景。
  • 在 A2A 协议流量中把已完成/失败/被拒任务转化为可靠性证据。
  • 单用户与单助手之间的跨上下文记忆(README 称 n=2 即有价值)。

不建议将其当作通用事实知识库或向量检索替代品。

安装与接入

README 给出的安装命令为 pip install kith-ai,导入名为 kith。LangGraph 适配器需安装附加依赖 pip install "kith-ai[langgraph]",README 称其针对真实 StateGraph 测试,要求 langgraph ≥ 1.0。hermes-agent 与 A2A 适配以 examples/ 下示例形式提供,具体接入步骤需查阅仓库内示例目录,本站未逐一验证。

采集资料中未包含 MCP 配置、服务端配置与正式 Release 页面,因此不存在可确认的 MCP 接入地址或一键部署方式;如需远程服务形态,请向项目方核验。

使用条件与限制

是否需要部署
需自行准备运行环境,具体要求见正文
是否需要注册
账号和认证要求见正文;未明确说明的项目仍待核验
是否需要 API Key
待核验
费用与额度
费用边界见正文,项目许可不代表模型或托管服务免费
所需权限
待核验
许可证与服务条款
待核验

权限费用与限制

  • 库本身以 MIT 许可发布,可免费使用与修改;但 MIT 仅覆盖仓库代码,不代表第三方模型、云服务或未来商业模块免费。
  • 默认后端为 SQLite,数据存放位置、并发写入能力、多进程共享时的行为需按实际部署核验。
  • README 的安全主张(如“单一可见性闸门”“泄漏路径测试”)属于项目自述,是否满足你的合规要求需自行审计。
  • 是否依赖任何外部模型或 API Key:核心库未见强制要求;LangGraph、hermes-agent、A2A 适配是否需额外凭据待核验。
  • 费用:README 未提及收费模式,具体以官方为准。

国内使用情况

网友核验 用户经验分享

与站长实测独立,不代表官方认证或本站已实测。

我要核验
0 位参与者0 份有效分项记录

最近核验:暂无有效核验。参与人数按当前项目有效身份去重;不同核验项分别统计,不合并成用户总结果。仅统计审核通过且未过期的记录。

分项统计、有效期与样本量
核验项目有效人数成功 / 部分 / 失败 / 无法判断成功率最近核验 / 有效期
官方网站访问00 / 0 / 0 / 0样本不足暂无 / 7 天
GitHub 仓库访问00 / 0 / 0 / 0样本不足暂无 / 7 天
安装与运行00 / 0 / 0 / 0样本不足暂无 / 30 天
官方服务国内连接 / MCP 连接00 / 0 / 0 / 0样本不足暂无 / 30 天
国内网络情况00 / 0 / 0 / 0样本不足暂无 / 7 天
国内模型兼容性00 / 0 / 0 / 0样本不足暂无 / 30 天
自定义 API00 / 0 / 0 / 0样本不足暂无 / 30 天
海外服务依赖
00 / 0 / 0 / 0样本不足暂无 / 30 天
海外账号要求
00 / 0 / 0 / 0样本不足暂无 / 30 天
中文界面
00 / 0 / 0 / 0样本不足暂无 / 30 天
客户端兼容性00 / 0 / 0 / 0样本不足暂无 / 30 天
账号及费用信息
00 / 0 / 0 / 0样本不足暂无 / 30 天

成功率 = 成功 ÷(成功 + 部分成功 + 失败);无法判断不计入分母。至少 5 份可判断结果才显示成功率。账号、费用、海外依赖与语言等事实项,成功表示核查结论与资料吻合,具体观察另行统计;不表示免费或没有海外依赖。不同网络、客户端和版本的结果不能直接等同。

最近有效核验

暂无审核通过且未过期的网友核验。欢迎提交真实使用记录。

查看全部有效核验 →

国内实测状态:国内可用性待核验。协议兼容和官方资料说明不等于国内网络可用。

官方网站访问
尚未实测 待核验
GitHub 仓库访问
尚未实测 待核验
官方服务国内连接
尚未实测 待核验
国内网络情况
尚未实测 待核验
国内模型兼容性
尚未实测 待核验
自定义 API
尚未实测 待核验
海外服务依赖
尚未实测 待核验
海外账号要求
尚未实测 待核验
中文界面
尚未实测 待核验
国内最后核验时间
尚未实测

许可与国内使用

仓库根目录包含 MIT 许可证文件,README 徽章亦标注 MIT,版权人 Yan Liu,年份 2026。项目未声明托管服务,因此不存在“服务部署地域”可谈;代码本身为本地安装的 Python 包,理论上不依赖境外在线服务即可运行,但 PyPI 下载、依赖拉取的可达性与国内镜像可用性待核验。README 未列出对任何具体大模型的支持情况,也未提及国内模型适配,相关结论需自行测试确认。

项目资料与来源

官方网站 ↗

GitHub 仓库 ↗

官方文档 ↗

字段依据与待核验事项

access:来源确认 · pip install kith-ai # imports as `kith`

project_type:来源确认 · A small Python library (sqlite by default, zero heavy deps) that gives your agents:

原始 README(折叠技术参考)
# kith

**Social memory for multi-agent systems — who remembers what, about whom, visible to whom.**

[![PyPI](https://img.shields.io/pypi/v/kith-ai)](https://pypi.org/project/kith-ai/)
[![CI](https://github.com/theNamek/kith/actions/workflows/ci.yml/badge.svg)](https://github.com/theNamek/kith/actions/workflows/ci.yml)
[![Python](https://img.shields.io/pypi/pyversions/kith-ai)](https://pypi.org/project/kith-ai/)
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)

## Why

Agent memory today answers one question: *what facts should I remember?* (Mem0, Zep, LangMem — all excellent at it.)

But when agents work **with other agents** (or with you, across contexts), the failures that actually hurt are not fact-retrieval failures:

- Your planner delegates to the same flaky coder agent for the fifth time, because nothing remembers the first four failures.
- A negotiation agent's private read on its counterpart leaks into a shared channel, because memory has no notion of *where a memory may go*.
- Every session, your agents meet each other as strangers.

Research on multi-agent failures (the MAST taxonomy) puts inter-agent misalignment and weak verification at the top of the list. These are **relationship-state failures**: the system has no memory of *who anyone is to anyone*.

kith is that memory.

## Install

```bash
pip install kith-ai        # imports as `kith`
```

## What it is

A small Python library (sqlite by default, zero heavy deps) that gives your agents:

- **Observations** — append-only records of what happened between principals: interactions, claims, emotional reads
- **Relationship views** — trust, reliability, sentiment, capabilities: *derived* from observations with decay and full provenance (`view.explain()` shows its work)
- **Scope contracts** — every memory has an explicit visibility boundary, enforced at a single gate below every read path (retrieval, errors, exports — no leaks through side doors)

```python
import kith

store = kith.Store("sqlite:///team.db")
me = store.principal("agent:planner-7")

me.observe(subject="agent:coder-2", kind="interaction",
           payload={"promised": "fix by 5pm", "delivered": False},
           context="task:deploy-42")

v = me.view("agent:coder-2")
if v.reliability < 0.4:
    plan.add_verification_step()   # remembered, not repeated
```

It is **not** a Mem0 replacement — run it beside your fact store. Facts are what happened; kith is what it did to the relationship.

## Design commitments

1. **Access boundaries are contracts, not filters.** One visibility gate under every read surface, with a leak-path test suite to prove it. (Battle-tested design: grew out of [hermes-agent #71224](https://github.com/NousResearch/hermes-agent/pull/71224), where snapshot-only filtering was shown to leak through error inventories.)
2. **Identity comes from the runtime, never from the model.** Models say `current`/`peer`; the runtime resolves who that is. LLMs don't get to invent IDs.
3. **Psychology is pluggable.** Default trust/reliability/sentiment derivers are documented and swappable — bring your own model of a mind.
4. **Useful at n=2.** One user, one assistant, cross-context privacy: already worth it. Scales to agent teams from there.

## Does it help? (reproducible)

A planner delegating to 20 workers of hidden, mixed reliability — identical
setup, the only difference is memory:

```
policy                        failures  repeat-fail  retries
------------------------------------------------------------
baseline (no memory)             100.6    83.1±32.9    100.6
kith (relationship memory)        25.2    15.3±9.5      25.2

repeat-delegation failures cut by 82%
```

`python examples/delegation_sim/simulator.py` — seeded, no LLM calls,
runs in seconds. [Details](examples/delegation_sim/README.md).

And the observation log doubles as a research instrument: in the
[contagion demo](examples/contagion_viz/README.md), kith's derived
sentiment views reconstruct a team's emotional dynamics — and locate the
toxic source — from per-dyad memories alone, no access to anyone's
internal state.

## LangGraph

`pip install "kith-ai[langgraph]"` — wrap any node so its outcomes become
relationship memory, and let the supervisor pick workers by track record:

```python
from kith.integrations.langgraph import KithSupervisor, observe_node

sup = KithSupervisor(store, supervisor="agent:supervisor",
                     workers=["agent:coder", "agent:researcher"])

graph.add_node("coder", observe_node(
    coder_fn, store=store, observer="agent:supervisor",
    subject="agent:coder", judge=lambda out: not out.get("error")))

def route(state):
    return node_of[sup.pick()]        # explore unknowns, avoid known-bad

prompt += sup.brief()                 # derived, scope-safe worker briefing
```

Tested against a real `StateGraph` (langgraph ≥ 1.0).

## hermes-agent

kith runs as a hermes-agent memory provider ([shim](examples/hermes_plugin/)):
every subagent delegation the parent witnesses becomes relationship memory
automatically (`on_delegation`), the system prompt gains a scope-safe
relationship brief, and the agent gets `kith_observe` / `kith_view` tools —
observing always as the session principal, never as a model-chosen identity.

## A2A

For agents that talk [A2A](https://github.com/a2aproject/A2A), kith
observes the protocol traffic you already handle — no extra
instrumentation:

```python
from kith.integrations.a2a import observe_task, assert_card, confirm_capability

assert_card(me, "agent:remote-writer", agent_card)   # skills -> self-claims
observe_task(me, "agent:remote-writer", task)        # terminal Task -> outcome
confirm_capability(me, "agent:remote-writer", "summarization")  # seen it work
```

Completed/failed/rejected tasks become reliability evidence; canceled and
non-terminal states are ignored (withdrawn work is not a signal). AgentCard
skills stay `source="self"` until a real task confirms them — a card never
inflates a track record.

## Status

v0.2 on PyPI (`pip install kith-ai`). Core library + leak-path test suite +
LangGraph, hermes-agent, and A2A adapters. See [docs/DESIGN.md](docs/DESIGN.md).

## Author

Yan Liu ([@theNamek](https://github.com/theNamek)) — PhD researcher on group emotion dynamics in multi-agent LLM systems.
历史前置条件说明(补充参考)

Python 环境与 pip;安装包名 kith-ai(导入名 kith);可选 langgraph ≥ 1.0 用于 LangGraph 适配;是否需要模型/API Key 待核验;收费模式待核验;默认 SQLite,无强制境外在线服务依赖,但 PyPI 可达性待核验。

项目来源与清单版权许可

https://github.com/theNamek/kith

整理来源:https://github.com/slavakurilyak/awesome-ai-agents

清单版权与许可:

MIT License

Copyright (c) 2024 Slava Kurilyak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.