Metadata-Version: 2.5
Name: family-emotion-check
Version: 1.0.0
Summary: 家庭情绪倾听与风险觉察 Agent 系统 - 基于 acps-sdk 的多智能体协作框架
Author: family-emotion-check
License: MIT
Keywords: acps-sdk,agent,emotion,family,listener
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: acps-sdk>=2.1.0
Description-Content-Type: text/markdown

# family-emotion-check

家庭情绪倾听与风险觉察 Agent 系统，基于 acps-sdk 的多智能体协作框架。

## 简介

当家人产生矛盾、情绪压抑时：

- **倾听 Agent (ListenerAgent)** - 承接倾诉、共情安抚
- **风险觉察 Agent (RiskDetectorAgent)** - 识别委屈、自我否定信号，同步提示倾听 Agent 调整节奏，避免激化矛盾，温和引导表达感受

两个 Agent 通过 acps-sdk 的 AIP 协议模型进行交互，由 EmotionOrchestrator 编排协作流程。

## 安装

```bash
pip install family-emotion-check
```

依赖: `acps-sdk >= 2.1.0`, `Python >= 3.10`

## 快速开始

### 交互模式

```bash
femotion
```

### 单条命令

```bash
femotion "我好累，我觉得自己没用"
```

### 代码调用

```python
from family_emotion_check import EmotionOrchestrator

orch = EmotionOrchestrator()
response = orch.process("我好累，我觉得自己没用")

print(response.content)      # 倾听 Agent 回应
alert = orch.risk_detector.get_current_alert()
print(alert.level)            # 风险等级
print(alert.message)          # 给倾听 Agent 的提示
```

## 架构

```
倾诉者输入
    │
    ▼
RiskDetectorAgent ──► 检测情绪信号 + 评估风险等级
    │
    │ (acps-sdk AIP Message)
    ▼
ListenerAgent ──► 根据风险提示调整策略 → 生成共情回应
    │
    ▼
输出回应
```

### Agent 能力规范 (ACS)

两个 Agent 都通过 acps-sdk 的 ACS 模块声明自身能力：
- `AgentCapabilitySpec` - 能力描述
- `AgentSkill` - 技能列表
- `AgentEndPoint` - 交互端点

### Agent 交互协议 (AIP)

Agent 间通过 AIP 协议消息模型交互：
- `Message` - 消息封装
- `TextDataItem` / `StructuredDataItem` - 数据载荷

## 项目结构

```
family_emotion_check/
├── agents/
│   ├── listener.py          # 倾听 Agent
│   └── risk_detector.py     # 风险觉察 Agent
├── emotion_analyzer.py       # 情绪信号分析器
├── orchestrator.py          # 多 Agent 编排器
├── schemas.py               # 数据模型
└── cli.py                   # 命令行入口
```

## License

MIT
