Skip to main content

user-xinli-project

基于 ACPs-SDK 2.1.0 的双智能体心理咨询系统(Python 1.0.0)。

架构

┌─────────────────────┐    ACPs AIP RPC    ┌──────────────────────┐
│ InterviewAgent      │ ─────────────────▶ │ PsychologyAgent      │
│ (Leader, CLI)       │   JSON-RPC over    │ (Partner, FastAPI)   │
│ - 多轮文本访谈      │   HTTP             │ - 接收访谈分析结果    │
│ - 情绪倾向识别      │                    │ - 生成解决方案 Product│
│ - 调用心理学服务    │ ◀───────────────── │ - 返回 TaskResult    │
└─────────────────────┘                    └──────────────────────┘
  • InterviewAgent:在命令行里和用户对话,用 analysis.py 做轻量关键词分析,然后通过 acps_sdk.aip.AipRpcClient 把分析结果提交给 PsychologyAgent。
  • PsychologyAgent:一个 FastAPI 服务,用 acps_sdk.aip.add_aip_rpc_router 挂载 AIP RPC 端点,按情绪倾向生成对应的解决方案。

快速开始

# 安装(开发模式)
pip install -e .

# 一键启动(后台起服务 + 进入访谈)
user-xinli run

# 分开跑
user-xinli server            # 终端 A:启动 PsychologyAgent
user-xinli client            # 终端 B:启动 InterviewAgent

# 非交互 demo(一键验证链路)
user-xinli demo

打包 wheel

# 生成 dist/user_xinli_project-1.0.0-py3-none-any.whl
python -m build

# 或直接用 setuptools
python setup.py bdist_wheel

上传到 PyPI:

twine upload dist/*.whl

项目结构

user_xinli/
├── __init__.py              # 版本号
├── analysis.py              # 轻量情绪倾向分析(关键词匹配)
├── psychology_agent.py      # PsychologyAgent —— FastAPI + ACPs AIP RPC Server
├── interview_agent.py       # InterviewAgent —— CLI 访谈 + AipRpcClient
└── cli.py                   # 命令行入口(run / server / client / demo)

核心依赖

包 版本 用途
acps-sdk 2.1.0 智能体互联(AIP 协议 RPC Client / Server)
fastapi ≥0.110 PsychologyAgent 服务端
uvicorn ≥0.27 ASGI server
httpx ≥0.27 acps-sdk 内部 RPC 传输

说明

  • analysis.py 采用纯 Python 关键词匹配,不依赖外部 LLM,保证项目零额外成本、开箱即用。实际生产可替换为任何 LLM 驱动的分析器(接口不变,只需返回 AnalysisResult)。
  • PsychologyAgent 的解决方案目前内置在字典里,生产可替换为知识库检索或 LLM 生成。
  • 本项目严格依赖 acps-sdk 2.1.0,通过它完成双 Agent 的互联通信。

Metadata

Release files for user-xinli-project 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for user-xinli-project 1.0.0
File Interpreter ABI Platform Actions
user_xinli_project-1.0.0-py3-none-any.whl Python 3 none any Details for user_xinli_project-1.0.0-py3-none-any.whl

Release files / user_xinli_project-1.0.0-py3-none-any.whl

Download URL user_xinli_project-1.0.0-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a139f9be715c77449485db1b2498431904d103fbb09cae99e390a500375ae63
BLAKE2b-256 checksum
How to use checksums
a99c01462e1eef912ab71026f1fe7fdcf6fd9a8c9313fb349b341cd1ab290ae9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.2

Security for user-xinli-project 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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page