AI Features
AI is entirely optional. When disabled (the default), all AI UI elements are hidden and no AI code runs. The app stands on its own as a fast task manager.
What AI Provides
- Task enrichment — Natural language parsing into structured tasks. Type "call dentist next tuesday high priority" and AI extracts: clean title, target, priority, labels, project, and recurrence — plus a deadline or horizon when your words state one.
- Quick Take — A snappy one-liner when you add a task, with awareness of your existing tasks ("you've got 2 other Acme tasks this week").
- What's Next — Recommendations surfacing overlooked or forgotten tasks.
- Insights — Scoring and signals (stale, quick win, etc.) to help prioritize your list.
- Process — In the Process dialog, AI recommends a project for each Inbox task and finds possible duplicates.
- Reminder parsing — Type a reminder in plain language ("every weekday evening, check the back door") and AI turns it into a schedule pinned to one of your reminder periods.
What's Next and Insights are generated once a day on a schedule (What's Next at 3:00 AM, Insights at 3:30 AM, server time) and whenever you press refresh. Opening the dashboard only reads the cached results, so it never starts an AI run by itself.
Setup
Set OPENTASK_AI_ENABLED=true and configure a provider. Add these variables to your .env file (Docker) or .env.local (bare metal). OpenTask auto-detects which provider to use based on which keys are set, or you can set OPENTASK_AI_PROVIDER explicitly.
Option 1: Anthropic API (Recommended)
OPENTASK_AI_ENABLED=true
ANTHROPIC_API_KEY=sk-ant-...
OPENTASK_AI_ENRICHMENT_MODEL=claude-haiku-4-5-20251001
OPENTASK_AI_QUICKTAKE_MODEL=claude-haiku-4-5-20251001
OPENTASK_AI_WHATS_NEXT_MODEL=claude-haiku-4-5-20251001
OPENTASK_AI_INSIGHTS_MODEL=claude-haiku-4-5-20251001Option 2: OpenAI
OPENTASK_AI_ENABLED=true
OPENAI_API_KEY=sk-...
OPENTASK_AI_ENRICHMENT_MODEL=gpt-4.1-mini
OPENTASK_AI_QUICKTAKE_MODEL=gpt-4.1-mini
OPENTASK_AI_WHATS_NEXT_MODEL=gpt-4.1-mini
OPENTASK_AI_INSIGHTS_MODEL=gpt-4.1-miniOption 3: xAI (Grok)
OPENTASK_AI_ENABLED=true
OPENAI_API_KEY=xai-...
OPENAI_BASE_URL=https://api.x.ai/v1
OPENTASK_AI_ENRICHMENT_MODEL=grok-4-1-fast-non-reasoning
OPENTASK_AI_QUICKTAKE_MODEL=grok-4-1-fast-non-reasoning
OPENTASK_AI_WHATS_NEXT_MODEL=grok-4-1-fast-non-reasoning
OPENTASK_AI_INSIGHTS_MODEL=grok-4-1-fast-non-reasoningOption 4: DeepSeek
OPENTASK_AI_ENABLED=true
OPENAI_API_KEY=sk-...
OPENAI_BASE_URL=https://api.deepseek.com
OPENTASK_AI_ENRICHMENT_MODEL=deepseek-chat
OPENTASK_AI_QUICKTAKE_MODEL=deepseek-chat
OPENTASK_AI_WHATS_NEXT_MODEL=deepseek-chat
OPENTASK_AI_INSIGHTS_MODEL=deepseek-chatOption 5: Ollama (local, free)
OPENTASK_AI_ENABLED=true
OPENAI_API_KEY=ollama
OPENAI_BASE_URL=http://localhost:11434/v1
OPENTASK_AI_ENRICHMENT_MODEL=llama3.1
OPENTASK_AI_QUICKTAKE_MODEL=llama3.1
OPENTASK_AI_WHATS_NEXT_MODEL=llama3.1
OPENTASK_AI_INSIGHTS_MODEL=llama3.1Option 6: Claude Code SDK
Uses your Claude Code authentication — no API key needed. Requires Claude Code installed on the server.
OPENTASK_AI_ENABLED=trueINFO
Options 2-5 all use the OpenAI-compatible API path. Any provider with an OpenAI-compatible endpoint works — set the base URL and per-feature model names. You can use the same model for all four features.
Model Selection
Each AI feature has its own model variable so you can tune speed vs. quality per feature:
| Variable | Feature | Optimized for |
|---|---|---|
OPENTASK_AI_ENRICHMENT_MODEL | Task enrichment | Speed (parsing is simple) |
OPENTASK_AI_QUICKTAKE_MODEL | Quick Take | Balance (needs context awareness) |
OPENTASK_AI_WHATS_NEXT_MODEL | What's Next | Speed |
OPENTASK_AI_INSIGHTS_MODEL | Insights | Quality (analysis is complex) |
For Anthropic API and OpenAI-compatible providers, all four per-feature model variables are required. Use your provider's model names (e.g., claude-haiku-4-5-20251001, gpt-4.1-mini, grok-4-1-fast-non-reasoning).
For Claude Code SDK, defaults are applied automatically — no model variables needed. Override with OPENTASK_AI_ENRICHMENT_SDK_MODEL, etc., using short names like haiku, sonnet, opus.
See Configuration for the full list of AI environment variables.
How Enrichment Works
When you create a task with just a title (no target, deadline, horizon, priority, labels, or recurrence), AI enrichment triggers automatically. It extracts:
| Field | Example Input | Extracted |
|---|---|---|
| Title | "um call dentist tomorrow" | "Call dentist" |
| Target | "tomorrow morning", "do it Saturday", "next Tuesday at 2pm" | ISO 8601 UTC datetime |
| Deadline | "by Friday", "expires Oct 13", "before the 17th" | ISO 8601 UTC datetime (only from stated cutoff wording) |
| Horizon | "in the next few days", "this week", "sometime this month", "eventually" | days, weeks, months, or eventually (only from stated pace wording) |
| Priority | "high priority", "urgent", "no rush" | 0-4 integer |
| Labels | "label it as errands" | ["errands"] |
| Recurrence | "every Monday", "daily" | RFC 5545 RRULE string |
| Project | "add to work", "test task for job search" | An existing project, named explicitly or by its full name |
| Notes | Context details the AI extracts | Supplementary information |
If you provide any structured fields (target, deadline, horizon, priority > 0, labels, or recurrence), enrichment is skipped — the task is created exactly as specified.
When enrichment finishes a task you just added, OpenTask sends a quiet notification with what AI filled in, so you can check it without opening the app. See "AI finished" for new tasks.
Target, deadline, and horizon
A task's target, deadline, and horizon are filled in only from what you wrote:
- Target is set only from wording that says when to do it or be reminded: "tomorrow", "call the plumber Thursday", "do it Saturday", "remind me Monday at 3".
- Deadline is set only from cutoff wording: "by Friday", "due the 23rd", "before the 17th", "due to the client Monday 10am", "expires Oct 13". A cutoff day with no time means the end of that day. A task with only a cutoff gets a deadline and no target from AI, so OpenTask gives it the deadline's automatic target a few days before. "Cancel the trial by Oct 17, do it Wednesday" sets both. AI never guesses a deadline from urgency or topic, since a deadline limits snoozing.
- Horizon is set only from pace wording: "in the next few days" (Days), "this week" (Weeks), "sometime this month" (Months), "eventually" or "someday" (Eventually). Never from the topic, the size of the task, or priority words ("no rush" is still just low priority). "By the end of the month" is a deadline, not a horizon.
Recurring tasks, reminders, and quotas never get a deadline or horizon from AI. A date in the past with no year ("Oct 3" in November) is read as next year. AI never clears a deadline or horizon a task already has. The confirmation names what was set ("Deadline Fri 11:59 PM", "Within weeks").
Projects
AI files a task into one of your existing projects in two cases:
- You say so. "Put this in Work" or "add it to shopping" moves the task, and the instruction is removed from the title. This works whatever project the task started in.
- The task names the project. A task whose text contains a project's full name, used as that name, goes into that project: "Test task for job search" goes to Job Search, and the title stays as you wrote it. Only whole words count ("homework" doesn't match Home or Work), and not when the word means something else, like "work out" or "after work". If two project names match, the longer one wins. This only applies to tasks in the Inbox: a task you already put in another project stays there.
AI never picks a project from the topic alone. "Apply to Acme" stays in the Inbox even if you have a Job Search project. A word of the project's name has to appear in what you typed, so a synonym ("put this in groceries" for Shopping List) isn't enough.
Reminders
Reminders are parsed with their own prompt. AI works out which days the reminder comes up and snaps a stated time to the nearest of your reminder periods (with periods starting at 4:00 PM and 8:30 PM, "at 7pm" goes to the 8:30 PM one). With no time stated, the reminder goes in your default period (Settings → Reminder periods → Default period). AI never gives a reminder a target, deadline, horizon, labels, or a project.
Process
In the Process dialog, AI helps with two steps. Neither changes anything on its own; you decide.
- Inbox: for each Inbox task, the project AI recommends is highlighted among your project buttons. AI reads each project's description first (see below), then its name, then your AI context. A task with no good match gets no recommendation.
- Duplicates: groups of open tasks that look like the same work, each with a short reason.
Process uses the Insights model and timeout. With AI off, the Inbox step still works without recommendations and the Duplicates step doesn't appear. Through the API: POST /api/process/recommend-projects with { "ids": [...] } (up to 100 tasks) and GET /api/process/duplicates.
Project descriptions
Each project can have a short description (up to 280 characters) saying what belongs in it. Add or edit it with Add description under the project's name in Settings → Projects, or with description on POST /api/projects and PATCH /api/projects/{id}. AI reads it when recommending projects, and it helps apps that file tasks through the API. Only the project's owner can edit it.
AI Context
Settings → AI Context is free text about your situation ("I work from home; my partner handles groceries") that every AI feature sees. Settings shows when it was last updated.
Once it's 3 weeks old, or if you've never written one, a quiet link appears at the foot of the desktop sidebar (on a phone, under Settings in the top bar's menu): AI context: 4 weeks old, Review AI context, or Add AI context. It opens the field. If the context is still right, Still accurate (or Not needed when it's empty) marks it reviewed without editing it, and the link goes away for another 3 weeks. The link only appears while AI is enabled.
