we-are-family · 团队心理氛围 Agent
基于 ACPs 智能体互联协议(AIP v2) 的团队心理氛围 Agent。匿名收集团队氛围信息与成员反馈,通过智能体互联汇总给「氛围分析 Agent」,由后者识别集体压力源与沟通卡点,输出给 EAP 专员。全程不定位个人。
核心特点
- 隐私优先:反馈数据结构上没有姓名 / 工号 / 邮箱 / IP 等身份字段;传输前自动脱敏;跨 Agent 只传聚合统计,不含个人原文。
- 智能体互联:使用官方
acps-sdk==2.1.0的 AIP RPC 能力,收集端(Leader)与分析端(Partner)通过 JSON-RPC 互联。 - 精简可运行:基于关键词规则的聚合分析,无需外部大模型;一条命令即可演示。
- 可发布:标准
pyproject.toml,一条命令构建whl上传 PyPI。
架构
团队成员 → 匿名反馈 ──▶ [氛围收集 Agent / Leader]
│ 脱敏 + 聚合(AtmosphereSummary)
│ ACPs AIP RPC (start_task)
▼
[氛围分析 Agent / Partner]
│ 识别集体压力源 & 沟通卡点
▼
EAP 报告 (Product) → EAP 专员
安装
pip install acps-sdk==2.1.0
pip install we-are-family
从源码本地运行:
cd we-are-family
pip install -e .
快速开始
一条命令一键演示(本机启动分析 Agent 并发送示例匿名反馈):
we-are-family demo
分别启动服务端与提交端:
# 终端 1:启动氛围分析 Agent
we-are-family serve --host 0.0.0.0 --port 8765
# 终端 2:提交匿名反馈(feedbacks.json)
we-are-family collect --url http://127.0.0.1:8765/aip/rpc --input feedbacks.json
feedbacks.json 示例:
[
{"text": "最近一直加班赶版本,任务太重撑不住了。", "mood_score": 2.0, "tags": ["负荷"]},
{"text": "跨部门对接总是踢皮球,没人及时回复。", "mood_score": 2.5, "tags": ["沟通"]}
]
Python API
import asyncio
from we_are_family import AnonymousFeedback, CollectorAgent
async def main():
collector = CollectorAgent(partner_url="http://127.0.0.1:8765/aip/rpc")
feedbacks = [AnonymousFeedback(text="最近加班很多,压力有点大。", mood_score=2.0)]
report = await collector.submit(feedbacks) # 返回 EapReport
print(report.headline, report.collective_stressors)
await collector.close()
asyncio.run(main())
分析 Agent 服务也可嵌入任意 FastAPI 应用:
from we_are_family import build_analyzer_app
app = build_analyzer_app() # 已挂载 /aip/rpc
构建 whl
pip install build
python -m build --wheel
# 产物在 dist/we_are_family-1.0.0-py3-none-any.whl
twine upload dist/*
版本
1.0.0 · 依赖 acps-sdk==2.1.0 · Python >= 3.10
Metadata
Release files for we-are-family 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| we_are_family-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for we_are_family-1.0.0-py3-none-any.whl |
Release files / we_are_family-1.0.0-py3-none-any.whl
| Download URL | we_are_family-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c3ee91b305d3b51f3df8a1e39bff45ffb98260137bd39508f70ffe49c83c5e8
|
|
BLAKE2b-256 checksum How to use checksums |
6f55409b58f4015c6b5f206f1779715362ca040a5638417388759309cbcc6431
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.1
|
Security for we-are-family 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.