Skip to main content
Glama

FocusRoom | 生产力代理

一个使用 Python、Streamlit、Groq、SQLite 和 MCP 构建的个人生产力工作区。它将任务管理、每日规划、持久记忆、多代理监督器和可选的电子邮件提醒整合在一个项目中。

功能

  • Streamlit 生产力仪表板

  • 创建、列出、筛选和完成任务

  • 任务优先级、截止日期、项目和状态

  • productivity.db 中进行持久化 SQLite 存储

  • 每日计划和生产力报告

  • 保存和搜索个人记忆

  • 由 Groq 驱动的生产力助手

  • 用于任务、记忆和规划请求的多代理监督器

  • 为外部客户端提供 HTTP 工具的 MCP 服务器

  • 可选的自动电子邮件提醒

Related MCP server: autoMate

要求

  • Python 3.10 或更高版本

  • 用于 AI 功能的 Groq API 密钥

  • 用于电子邮件提醒的 Gmail SMTP 凭据或其他 SMTP 提供商

设置

1. 创建虚拟环境

PowerShell:

python -m venv .venv
.\.venv\Scripts\Activate.ps1

如果 PowerShell 阻止当前会话的脚本执行:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
.\.venv\Scripts\Activate.ps1

2. 安装依赖

python -m pip install -r requirements.txt

3. 配置环境变量

.env.example 复制为 .env 并填写相应值:

Copy-Item .env.example .env

Groq 支持的代理所需:

GROQ_API_KEY=your_groq_api_key
GROQ_MODEL=openai/gpt-oss-120b

可选的 MCP 配置:

MCP_HOST=127.0.0.1
MCP_PORT=8000
MCP_API_KEY=local_or_remote_api_key

用于电子邮件提醒:

EMAIL_SENDER=your_email@gmail.com
EMAIL_RECIPIENT=recipient@example.com
EMAIL_PASSWORD=your_smtp_or_app_password
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587

不要提交 .env 或 API 凭据。它们已被 .gitignore 排除。

运行 Streamlit 应用

streamlit run streamlit_app.py

该应用提供以下部分:

  • 概览 - 任务指标、进行中的工作、每日快照和完成进度

  • 任务 - 创建和筛选任务,然后将任务标记为完成

  • 计划 - 查看当前每日计划和生产力报告

  • 记忆 - 保存和搜索持久上下文

  • 助手 - 向生产力监督器发送自然语言请求

运行 MCP 服务器

使用以下命令启动 Streamable HTTP MCP 服务器:

python -m orchestrator.mcp_server

默认情况下,它运行在 http://127.0.0.1:8000/mcp

该服务器暴露以下工具:

  • productivity_assistant

  • create_task

  • list_tasks

  • update_task

  • complete_task

  • delete_task

  • save_memory

  • search_memory

  • daily_plan

  • productivity_report

将 MCP 服务器绑定到非本地主机时,请设置 MCP_API_KEY。远程请求必须使用 bearer 令牌:

Authorization: Bearer <MCP_API_KEY>

运行提醒

提醒工作进程会检查即将到来的任务并发送已配置的电子邮件通知:

python reminder_worker.py

提醒计划在工作进程中配置,支持在任务到期前 24 小时、1 小时和 15 分钟发送提醒。电子邮件提醒需要在 .env 中提供有效的 SMTP 设置。

运行测试

使用项目虚拟环境,以便 pytest 可用:

.\.venv\Scripts\python -m pytest -q

要运行特定的测试文件:

.\.venv\Scripts\python -m pytest -q test_multi_agent.py

要在不启动应用的情况下检查 Python 语法:

.\.venv\Scripts\python -m compileall streamlit_app.py orchestrator

项目结构

Productivity_Agent/
|-- streamlit_app.py              # Streamlit user interface
|-- requirements.txt              # Python dependencies
|-- .env.example                  # Environment variable template
|-- productivity.db               # Local SQLite database, generated locally
|-- reminder_service.py           # Reminder service implementation
|-- reminder_worker.py            # Continuous reminder worker
|-- orchestrator/
|   |-- agent.py                  # Core task, memory, plan, and report logic
|   |-- database.py               # SQLite persistence layer
|   |-- orchestrator.py           # Multi-agent supervisor
|   |-- mcp_server.py             # MCP HTTP server and tools
|   |-- memory_agent.py           # Memory agent adapter
|   |-- planning_agent.py         # Planning agent adapter
|   |-- task_agent.py             # Task agent adapter
|-- test_*.py                     # Project tests

数据与安全说明

  • 任务和记忆存储在本地 SQLite 中。

  • .env 包含机密信息,必须保持私密。

  • 对于 Gmail,请在需要时使用应用专用密码,而不是您的主账户密码。

  • 当服务器暴露在 localhost 之外时,需要 MCP API 密钥。

  • 如果本地任务和记忆历史很重要,请备份 productivity.db

故障排除

无法识别 pytest

通过虚拟环境运行 pytest:

.\.venv\Scripts\python -m pytest -q

应用启动但助手不可用

检查 .env 是否存在并包含有效的 GROQ_API_KEY,然后重启 Streamlit。

Streamlit 报告 missing ScriptRunContext

当直接使用 python -c 导入 Streamlit 模块时会出现此警告。请使用 streamlit run streamlit_app.py 启动应用程序以正常操作。

编译正常但测试在收集阶段失败

收集错误意味着 pytest 无法完成测试导入。请先阅读报告的第一个异常,并修复该依赖项或构造函数不匹配的问题,然后再评估其余测试。

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI clients to manage todo tasks through Tools for adding, listing, completing, and searching, alongside Prompts for daily reviews and task breakdowns. Exposes task lists and statistics as Resources with local JSON file persistence.
  • A
    license
    Not graded
    quality
    D
    maintenance
    A personal AI assistant server that provides MCP tools for notes, files, reminders, memory, shell, browser, and 30+ SaaS integrations, enabling AI clients to access and manage your data across sessions.
    3,945
    MIT

View all related MCP servers

Related MCP Connectors

  • Manage projects, tasks, time tracking, and team collaboration through natural language.

  • Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.

  • Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RevHeadGuy/FocusRoom'

If you have feedback or need assistance with the MCP directory API, please join our Discord server