A LangChain-powered AI agent that automates workflow management in Things3, helping you organize tasks, clean up your today view, and maintain productive daily routines.
- π§ AI-Powered: Uses LangChain with OpenAI models for intelligent task management
- π§ Custom Tools: Specialized MCP tools for Things3 operations
- π¬ Natural Language: Interact using plain English descriptions of what you want to accomplish
- β‘ Quick Commands: CLI interface for both interactive chat and one-off operations
- Things3: Must be installed and running on macOS
- Python 3.8+: Required for the agent
- OpenAI API Key: For the AI functionality
-
Clone the repository:
git clone <repository-url> cd things3agent
-
Install Python dependencies:
pip install -r requirements.txt
-
Run the interactive setup:
python main.py setup
This will:
- Create a
.envfile for configuration - Prompt for your OpenAI API key
- Test the connection to Things3
- Verify everything is working
- Create a
-
Alternative manual setup:
cp .env.example .env # Edit .env and add your OPENAI_API_KEY
Start a conversation with the agent:
python main.py chatExample conversations:
Setting up your work day:
You: I want to setup my today view so I can get to work. I need to focus on the MCP migration project and respond to Slack messages.
Agent: I'll help you set up your today view for work. Let me first check what's currently there...
[Agent analyzes current tasks, suggests cleanup actions, and creates relevant work tasks]
Cleaning up a cluttered today view:
You: My today view is messy and has old tasks. Help me clean it up and focus on high priority items.
Agent: I'll analyze your today view and suggest cleanup actions...
[Agent categorizes tasks, suggests moving low-priority items, and identifies what to keep]
Check current status:
python main.py statuspython main.py chat- Interactive chat sessionpython main.py status- Show current Things3 statuspython main.py analyze "<query>"- Analyze today view with specific intentpython main.py setup- Interactive setup and configurationpython main.py --help- Show all available commands
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β User Input βββββΆβ LangChain Agent βββββΆβ Things3 Tools β
β (Natural Lang) β β (GPT-4 + Tools) β β (MCP Based) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ
β Workflows β β Things3 Client β
β (Smart Logic) β β (things.py) β
βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Things3 Databaseβ
βββββββββββββββββββ
- Things3 Integration Layer (
src/things3/): Wraps thethings.pylibrary with domain-specific operations - Custom MCP Tools (
src/tools/): LangChain-compatible tools for Things3 operations - LangChain Agent (
src/agent/): AI orchestrator that uses tools to accomplish tasks - Workflow Engine (
src/workflows/): Specific implementations for common patterns - User Configuration (
src/config/): Your personal taxonomy and organization patterns
The agent has access to these specialized tools:
get_today_tasks- View current today viewsearch_tasks- Find tasks by keywordget_work_tasks- Get all AMPL-tagged taskscreate_task- Add new tasks with proper metadata (not implemented -- lib limiation requires an applet to be built)update_task_when- Reschedule or remove tasks from today -- (not implemented -- lib limiation requires an applet to be built)analyze_today_view- Smart analysis and cleanup suggestions
Create a .env file with:
# Required
OPENAI_API_KEY=your_openai_api_key_here
# Optional
AGENT_MODEL=gpt-4-turbo-preview # AI model to use
AGENT_TEMPERATURE=0.1 # Model creativity (0.0-1.0)
LOG_LEVEL=INFO # Logging verbosityEdit src/config/user_patterns.py to match your organization style:
# Your work tag
work_tag: str = "AMPL"
# Your work areas
work_areas: List[str] = ["Amplitude", "Other Work Area"]
# Priority tag range
priority_tags: Set[str] = {str(i) for i in range(1, 10)}Query: "I want to setup my today view so that I can get to work. Here's what's on my mind β I want to get the ask amp -> mcp migration done for work, to respond to slack messages, and to get started on global chat"
What the agent does:
- Analyzes current today view
- Finds existing "mcp migration" tasks in the Amplitude area
- Creates "Respond to Slack messages" task with AMPL tag
- Finds existing "global chat" tasks or creates new ones
- Suggests moving non-work tasks out of today view
- Presents plan for confirmation
Query: "My today view is cluttered with old stuff. Help me clean it up."
What the agent does:
- Analyzes all tasks in today view
- Identifies old, low-priority, or irrelevant tasks
- Suggests moving medium-priority tasks to tomorrow
- Suggests removing when-date from low-priority tasks
- Keeps high-priority and relevant tasks
- Shows cleanup plan for approval
"Failed to connect to Things3"
- Ensure Things3 is installed and running
- Check that the Things3 database is accessible
- Try restarting Things3
"OpenAI API key not found"
- Verify your
.envfile containsOPENAI_API_KEY=your_key - Ensure the
.envfile is in the project root directory - Check that your API key is valid and has credits
"No tasks found" when you know tasks exist
- Things3 database might be in a different location
- Try restarting the application
- Check Things3 is the latest version
Run with verbose logging to see what's happening:
python main.py --log-level DEBUG chatThe agent auto-detects your Things3 database. If needed, you can manually specify:
export THINGS_DB_PATH="/path/to/Things3/database"This project is designed to be customized for personal workflows. Key areas for customization:
- User Patterns (
src/config/user_patterns.py) - Modify to match your organization style - Workflows (
src/workflows/) - Add new workflow automation - Tools (
src/tools/) - Extend with new Things3 operations - Agent Prompts (
src/agent/things3_agent.py) - Adjust AI behavior
Do whatever you'd like.