# PerspecTask > PerspecTask is an end-to-end encrypted task manager for planning goals from a single day up to your whole life: tasks nest into hierarchies (a task can have several parents), are scheduled into days, weeks, months, quarters, years or "lifetime", track time with timers, link GitHub pull requests, and track a KPI (a number with targets and readings over time). Every change is kept in a read-only history. AI agents can read and manage a user's tasks, pull request links, KPIs and timers, and read the history, through an MCP server, a CLI, a TypeScript SDK, or the REST API. Agents can only read and change PLAINTEXT tasks. End-to-end encrypted tasks are decrypted only in the user's browser; over the API they are left out of lists unless `includeEncrypted` is set (then they come back as placeholders with `encrypted: true` and no title or description), tree views keep one only when it sits above a readable task, and writes to them are refused. A list without `includeEncrypted` is therefore not a count of everything the user has. That is a cryptographic fact, not a permission setting. ## Connect an agent 1. Sign in. With a shell: `npm install -g @perspectask/cli`, then `pt login --no-wait`, which prints a link and a short code and exits. Give the user both; they open the link, check the code and click Approve (choosing scopes there). Then run `pt login` again to finish; the login is saved in `~/.perspectask/config.json` and refreshed by the CLI, and the MCP server below uses it too. A person at a terminal runs plain `pt login`. Alternative: the user creates an API key in the web app (https://app.perspectask.com/account → API Keys; keys start with `pt_live_`), passed as the `PERSPECTASK_API_KEY` environment variable or saved with `pt auth set --key "pt_live_..."`. Scopes: `tasks:read`, `tasks:write`, and `tasks:write:meta` (status, priority, deadline and parents, but never the title or description of an existing task), plus `kpis:read` and `kpis:write` for a task's KPI entries (targets and actuals), `timers:read` and `timers:write` for time tracking (start, stop, list, edit; deleting a timer is web-only), and `history:read` for the read-only change log. 2. Then use ONE of: - MCP server (configure once, loads in every session): command `npx -y @perspectask/mcp@latest`, after `pt login` or with `PERSPECTASK_API_KEY` set. Tools: tasks (`perspectask_list_tasks`, `perspectask_get_task`, `perspectask_create_task`, `perspectask_update_task`), GitHub pull requests linked to a task (`perspectask_list_task_pull_requests`, `perspectask_link_task_pull_request`, `perspectask_unlink_task_pull_request`), KPIs (`perspectask_list_kpi_tasks`, `perspectask_list_task_kpis`, `perspectask_add_task_kpi`, `perspectask_update_task_kpi`, `perspectask_delete_task_kpi`), timers (`perspectask_get_timer_status`, `perspectask_list_timers`, `perspectask_start_timer`, `perspectask_stop_timer`, `perspectask_update_timer`), and history (`perspectask_list_history`, `perspectask_list_task_history`). - CLI (works in the same session, no config): `npm install -g @perspectask/cli`, then `pt tasks`. JSON output by default. Full command reference for agents: https://unpkg.com/@perspectask/cli/SKILL.md - TypeScript SDK: `npm install @perspectask/sdk` - REST API: `https://api.perspectask.com/v1`, header `Authorization: Bearer pt_live_...`. OpenAPI spec: https://api.perspectask.com/v1/openapi.yaml KPIs: a task's KPI is a list of entries, each `target` (the number to reach, with an optional date `at`) or `actual` (a reading of the number at the moment `at`, required). `at` is an ISO 8601 datetime such as `2026-11-23T09:00:00Z`, not the deadline shorthand. Record each new reading as a new `actual` instead of overwriting the last one. CLI: `pt tasks with-kpis`, `pt tasks kpis `, `pt tasks add-kpi --kind actual --value 42000 --at 2026-11-23T09:00:00Z`. REST: `GET /v1/kpis`, `GET|POST /v1/tasks/{id}/kpis`, `PATCH|DELETE /v1/tasks/{id}/kpis/{kpiId}`. Timers: one timer runs at a time; starting a task's timer stops the one running elsewhere. Durations and `worked_today` are seconds; pass `day_start` (the user's local midnight, e.g. `2026-11-23T00:00:00+02:00`) so "today" follows their time zone. Editing fixes a finished timer's start or end. CLI: `pt timers status`, `pt timers start `, `pt timers stop`, `pt timers`, `pt timers update --ended-at `. REST: `GET /v1/timers/status`, `GET /v1/timers`, `POST /v1/tasks/{id}/timers`, `POST /v1/timers/stop`, `PATCH /v1/timers/{timerId}`. History: every change to a task is recorded automatically and can't be edited. The all-tasks feed leaves out encrypted and deleted tasks, so it is not a complete count. A title/description edit saved end-to-end encrypted has `encrypted: true` and no `old`/`new` text. `since` applies to the all-tasks feed only. Each entry has `task_id`, `action` (`created`, `status`, `priority`, `scheduled`, `parent_added`, `parent_removed`, `title`, `description`, `encryption`), `at`, `old`/`new`, `reason`, and `actor` when the change came through the API or a connected app. CLI: `pt tasks history [id] [--since ]`. REST: `GET /v1/tasks/history`, `GET /v1/tasks/{id}/history`. Pull requests: put a task's `pr_token` (from getting the task, e.g. `pt-a3f91c2`) in a branch name or PR title and the PR links itself to the task, once the user has the PerspecTask GitHub app on the repo. Conventions: task ids are git-style short prefixes (`a3f`) and are accepted anywhere an id is; deadlines are one shorthand token, dashed so it survives a shell (`today`, `next-week`, `q3`, `w15`, `y2027`, `lifetime`); unset fields are omitted from responses; the list hides COMPLETED and CANCELLED tasks unless `showCompleted` is set. ## Docs - [PerspecTask for agents](https://perspectask.com/agents): API, SDK, CLI and MCP overview with setup steps - [API reference](https://perspectask.com/docs): every endpoint, generated from the OpenAPI spec - [MCP server](https://perspectask.com/tasks-mcp): tools, client config, MCP vs CLI - [CLI](https://perspectask.com/tasks-cli): `pt` commands, SKILL.md, deadline tokens - [TypeScript SDK](https://perspectask.com/tasks-sdk): typed client, `{ data, error }`, Zod schemas - [REST API](https://perspectask.com/tasks-api): endpoints, auth, error codes, OpenAPI spec - [@perspectask/mcp on npm](https://www.npmjs.com/package/@perspectask/mcp) - [@perspectask/cli on npm](https://www.npmjs.com/package/@perspectask/cli) - [@perspectask/sdk on npm](https://www.npmjs.com/package/@perspectask/sdk) ## Per-agent guides Each guide below is also plain markdown with the setup steps an agent follows: append `.md` to its URL (https://perspectask.com/muse.md). The general version is https://perspectask.com/agents.md. - [OpenClaw](https://perspectask.com/openclaw): CLI as a skill - [Hermes](https://perspectask.com/hermes): CLI as a skill - [Muse](https://perspectask.com/muse): MCP server as a custom connector - [ChatGPT dots](https://perspectask.com/chatgpt-dots): CLI on the dot's cloud computer - [Claude Cowork](https://perspectask.com/claude-cowork): CLI in the session, installed per task - [Manus](https://perspectask.com/manus): CLI in the sandbox, key as a custom API secret - [Perplexity Computer](https://perspectask.com/perplexity-computer): REST API, key in the Credential vault - [Grok Bot](https://perspectask.com/grok-bot): CLI on the cloud computer, key as a Bot Secret - [Claude Code](https://perspectask.com/claude-code): CLI as a skill - [Codex](https://perspectask.com/codex): CLI - [Cursor](https://perspectask.com/cursor): MCP server in `~/.cursor/mcp.json` - [Kiro](https://perspectask.com/kiro): MCP server in `~/.kiro/settings/mcp.json`, rules in steering files - [Gemini CLI](https://perspectask.com/gemini-cli): MCP server via `gemini mcp add` - [Kimi Code](https://perspectask.com/kimi-code): MCP server in `~/.kimi-code/mcp.json` ## Optional - [Web app](https://app.perspectask.com) - [Pricing](https://perspectask.com/#pricing) - [Free tools](https://perspectask.com/tools): every free tool, no account needed - [24 hour clock](https://perspectask.com/tools/24-hour-clock): free live analog 24 hour clock (one turn per day, 24 at the top); highlight periods such as an eating window or sleep as colored bands; full screen, time zones, 12/24 hour and military time chart - [Pomodoro timer](https://perspectask.com/tools/pomodoro): free online Pomodoro timer - [Support](https://perspectask.com/support): contact email and guides - [Privacy](https://perspectask.com/privacy)