@agimon-ai/po-task

Persistent, dependency-aware task graphs and subagent delegation for Pi coding sessions.

Packages

Package details

package

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.26
Published
Oct 19, 2026
Downloads
1,114/mo · 1,114/wk
Author
agiflow-ai
License
BUSL-1.1
Types
package
Size
1.2 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

Track persistent, dependency-aware tasks in Po and optionally delegate them through Po Team.

Part of the Po distribution.

Task owns task records and tasks.json. Team owns agents and runs. When both are loaded, Task delegates pending work through Team without merging their stored state.

Alpha: task and delegation contracts may change between releases.

Requirements

  • Node.js 24 or newer
  • A Po native server host

Install

Define a layer and select it in .po/modes.yaml:

layers:
  task:
    packages: ['@agimon-ai/po-task']

majorMode:
  minimal:
    description: Lean mode with persistent tasks.
    layers: [task]

Run po sync after selecting the package. No standalone Pi entry is published.

Task works without Team for local graph management. Add @agimon-ai/po-team to the same selected mode when assign and cancel should launch or control subagents.

Use the task tool

Supported actions are:

Action Purpose
upsert Create tasks or update status, metadata, dependencies, and details
list, get Read the graph or one task
delete Tombstone a task
clear Close and reset the graph after active delegations stop
assign Delegate a pending, unblocked task through Team
cancel Stop a delegated run and return its task to pending
{
  "action": "upsert",
  "tasks": [
    { "ref": "design", "subject": "Design the API" },
    {
      "subject": "Implement the API",
      "blockedBy": ["design"]
    }
  ]
}

The reducer enforces lifecycle transitions and rejects dependency cycles. A graph allows 15 non-deleted tasks by default; updates still apply when full, but new tasks are rejected until space is freed.

Presentation

The browser owns the task view and renderer. Terminal task shortcuts and overlays are retired; the native task tool remains available.

Storage and cleanup

The default session-tree store is:

~/.po/agent/po-task/<session>/tasks.json

Task is authoritative across transcript compaction because the graph is file-backed. This does not mean Task persists Team membership, intercom, or child-process state.

Defaults and overrides:

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 Delegated-run result timeout
PO_TASK_STORE Unset Override the complete store file path

Startup reconciliation removes expired stores and repairs delegation records whose owning process is no longer live.

Task and Team together

Task uses Team's delegation service and records its lifecycle events on the task. It also contributes pending assignments through po/background-work. Team discovers the selected agent, applies model and tool policy, owns the run, and returns completion or failure. If Team unloads or is replaced, both connections are removed and rebound without leaving a process-global registration. Intercom and Team membership remain Team state; tasks.json remains Task state.

Public API

import { detectCycle, isBlocked, TaskStore } from '@agimon-ai/po-task';
import type { Task, TaskStatus } from '@agimon-ai/po-task';

Focused subpaths include /toolSchema, /storeReducer, /storeTaskStore, and /delegationManager. Native metadata selects server and browser plugins and explicit MCP facets; terminal facades are removed.

Source layout

The generated host entries read routed declarations under src/extensions. The native session root owns store initialization, delegation, background work, watches, and cleanup. Browser routes own the cockpit channel, Activity dock section, and task renderer. Shared rules and persistence stay in services; flat src/exports modules only forward public symbols.

Development

Run from this package directory in the workspace:

pnpm build
pnpm typecheck
pnpm test
pnpm lint

Maintained by Agimon.

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.

Native server routes live in src/extensions; browser routes own presentation. Services own persistence, delegation, and configuration, while models hold durable task documents and graphs. Public entries are flat, forwarding-only files in src/exports. Scope lifecycle cleanup belongs to the native server root, not a Pi factory. Terminal task overlays and their public facades are retired.