@agimon-ai/po-task
Persistent, dependency-aware task graphs and subagent delegation for Pi coding sessions.
Package details
Install @agimon-ai/po-task from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@agimon-ai/po-task- Package
@agimon-ai/po-task- Version
0.0.0-alpha.194- Published
- Nov 26, 2026
- Downloads
- 29.5K/mo · 4,631/wk
- Author
- agiflow-ai
- License
- BUSL-1.1
- Types
- package
- Size
- 1.7 MB
- Dependencies
- 6 dependencies · 1 peer
Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@agimon-ai/po-task
Persistent, dependency-aware tasks for Po. Task owns the graph and tasks.json; Team owns agents and runs. With both selected, Task can delegate pending, unblocked work through Team without merging their stored state.
Requires Node.js 24 or newer and a Po server host. Task and delegation contracts are alpha.
Enable
Select the package in .po/presets.yaml, then run po sync:
layers:
task:
packages: ['@agimon-ai/po-task']
preset:
minimal:
description: Persistent tasks.
layers: [task]
Add @agimon-ai/po-team to the selected preset for delegation. Task alone supports local graph management; no standalone Pi entry is published.
Use
In code mode, discover tasks and read the task guide. snapshot() reads the detached graph, including tombstones. upsert, delete, clear, assign and cancel write through the same reducer and return { message, document }.
const result = await tasks.upsert([
{ ref: 'design', subject: 'Design the API' },
{ subject: 'Implement the API', blockedBy: ['design'] },
]);
return result.document;
The direct task tool remains available without code mode and on remote MCP. It accepts upsert, list, get, delete, clear, assign and cancel; code mode withdraws it from the model to avoid duplicate surfaces.
The reducer rejects dependency cycles and illegal lifecycle transitions. A graph allows 15 non-deleted ordinary tasks and, separately, 15 standing tasks by default. New entries are refused at the limit, but updates still apply. A task must be pending and unblocked before assignment. Deleting or clearing refuses active delegations; cancel them first. Cancellation returns the delegated task to pending.
A timebox puts a time limit on a task: a duration (30m, 2h, 1d, 1w) or a cutoff (ISO with offset, local YYYY-MM-DD, local HH:MM), given as a shorthand string or { window, shift?, target? }. When a window ends it rolls forward by shift (default: the duration itself, 1d for a date or local time, 2h for an ISO cutoff) and the 1-based counter goes up. The counter is derived from the anchor and the clock, so ticks write nothing. Changing the window restarts it.
A timebox with a target (1 to 24, set at creation) is standing work that never finishes. Each in_progress -> completed, or each successful delegation of it, records one run in the current window and returns it to pending in the same write. Day and week windows start at local midnight in the person's time zone (UTC when unknown); the minimum standing window is 1h. clear keeps standing tasks, their history and the id counter. Standing tasks cannot be dependency targets. With @agimon-ai/po-wake selected, the session supplies each standing task to the bot wake as a record that is due while the current window's runs are under its target, so an idle bot is woken to run it. Runs past the target still count.
Legacy routine/perDay and deadline tasks are migrated on read.
Storage and lifecycle
The default session-tree store is ~/.po/agent/po-task/<session>/tasks.json. It survives transcript compaction, but does not persist Team membership, intercom, or child-process state. snapshot() never creates a store, increments its revision, or replaces the cache. A missing file returns an empty graph; other read failures reject.
| Setting | Default | Purpose |
|---|---|---|
PO_TASK_MAX_TASKS |
15 |
Maximum non-deleted tasks |
PO_TASK_STORE_TTL_MS |
30 days | Retention for inactive session-tree stores |
PO_TASK_DELEGATION_TIMEOUT_MS |
20 minutes | Delegation result timeout |
PO_TASK_STORE |
Unset | Complete store-path override |
Startup reconciliation removes expired stores and repairs delegations whose owning process is no longer live. Team discovers the selected agent, applies model and tool policy, and owns the run; Task records its terminal result. If Team unloads or is replaced, the service connections rebind without sharing process-global registration state.
The web cockpit owns the task view and tool renderer. Terminal task overlays are retired. Routed declarations live in src/extensions, persistence and delegation in services, and durable graph types in models.
Development
pnpm exec nx run-many -t lint typecheck build test -p @agimon-ai/po-task
License
Business Source License 1.1: free for personal use, organisations under USD 1M revenue, non-profits and education. See LICENSE and https://agimon.ai/licensing.