TPC 服务器能够跟踪您的代理(或项目)的思考过程 🧠、计划 📝 和变更记录 ✅。它提供了一个后端服务,可用于记录、存储和检索 AI 代理或协作项目中的推理过程、意图行为和执行步骤。该服务器基于 FastAPI、MCP - Server 和 SQLAlchemy 构建。
TPC 服务器提供了便捷的使用方式,以下是快速启动的步骤:
git clone [https://github.com/suttonwilliamd/tpc-server.git](https://github.com/suttonwilliamd/tpc-server.git)
cd tpc-server
# 创建环境
python -m venv venv
# 激活(macOS/Linux)
source venv/bin/activate
# 激活(Windows - Git Bash/WSL)
source venv/Scripts/activate
# 激活(Windows - Command Prompt/PowerShell)
.\venv\Scripts\activate
pip install -r requirements.txt
.env 文件:DATABASE_URL=sqlite:///tpc_server.db
python main.py
mcp-server 提供函数,使 AI 代理能够与 TPC 存储交互(add_thought、create_plan、log_change、get_...)。.env 文件。git clone [https://github.com/suttonwilliamd/tpc-server.git](https://github.com/suttonwilliamd/tpc-server.git)
cd tpc-server
# 创建环境
python -m venv venv
# 激活(macOS/Linux)
source venv/bin/activate
# 激活(Windows - Git Bash/WSL)
source venv/Scripts/activate
# 激活(Windows - Command Prompt/PowerShell)
.\venv\Scripts\activate
pip install -r requirements.txt
在项目根目录中创建一个 .env 文件:
DATABASE_URL=sqlite:///tpc_server.db
python main.py
核心思想是创建一个结构化且相互关联的日志:
此服务器有助于记录这些项目及其关系(思考 <-> 计划 -> 变更)。
tpc_server.db)位于项目目录中,简单且无需单独的数据库服务器。.env 中的 DATABASE_URL 并安装相应的驱动程序(例如 pip install psycopg2-binary),可以轻松切换到 PostgreSQL、MySQL 等其他数据库。欢迎贡献、问题和功能请求!请随意查看 issues page 或提交 pull request。