Codumentor logo Codumentor

Task Tools Plugin

The Task Tools plugin lets the agent (or you, through it) create, inspect, and manage scheduled agent runs — one-off (run_at) or recurring (cron). Each run fires as a fresh conversation seeded with the stored prompt; there is no context carry-over between runs.

Configuration

plugins:
  - module: codumentor.plugins.task_tools
    class: TaskToolsPlugin
    priority: 10
    args:
      enabled: true
      allow_cron: true
      default_timezone: UTC
      run_history_retention_days: 365
ParameterTypeDefaultDescription
enabledbooltrueEnable or disable the plugin.
allow_cronbooltrueAllow recurring (cron) tasks. When false, only one-off run_at runs are permitted.
default_timezonestring"UTC"IANA timezone for interpreting cron expressions.
run_history_retention_daysint365How long to keep finished run history — and the per-run conversations, which are soft-deleted first — before a maintenance sweep purges them. 0 or negative keeps history forever.
retention_sweep_interval_secondsfloat86400How often the maintenance sweep runs (retention purge plus stale-run cleanup). A restart also sweeps immediately.
stale_run_threshold_secondsfloat3600A run that has been running with no progress longer than this is treated as stuck and marked failed.
parked_run_ttl_secondsfloat604800How long a run whose turn is waiting on an approval may wait. Past it, the maintenance sweep ends the run as failed (stale) and drops its token ledger. A waiting run is never treated as stuck by the threshold above. 0 disables.
target_agentsstring"main"Which agents get the task engine tools: "main", "subagent", or "all". Default keeps scheduling off subagents (their tool calls have no human reading them). A scheduled run itself is a main agent, so it can still manage tasks.

One switch this plugin reads but does not own: tasks.allow_agent_created
(default true), in the server's tasks: block rather than here, because it is
a statement about the task engine's authorization boundary rather than about
which tools this plugin ships. false makes create_task refuse — see
Admin Configuration Reference.

Tools

ToolDescription
create_taskCreate a one-off (run_at), recurring (cron) or event-fired (on, with optional scope / when / mode / debounce_seconds) run; returns a schedule_id. Exactly one of the three. Only in-instance event types may be used — task., job., kb., plugin.; the ones that arrive from outside (repo., scm., webhook.*) are operator-declared in the server config only. access_profile names the profile the unattended run executes under. Optional per-run limits: timeout_seconds (wall clock, max 6h) and token_budget (tokens, minimum 1000).
list_tasksList the caller's tasks (optional status filter)
get_taskFull detail for one task, including last-run state
update_taskChange timing, timezone, title, prompt, or the per-run limits timeout_seconds / token_budget. Passing null for a limit removes the task's own value, so the default applies again (the operator's token budget, the job queue's timeout).
pause_task / resume_taskPause or resume a task
snooze_taskPostpone the next fire to a given time
cancel_taskPermanently cancel a task
list_task_runsList prior runs of a task (most recent first), with status / error_kind, timings and tokens (input, cached, cache-write, output, total, cost_usd — null = unknown — and the run's effective token_budget, null = unlimited)
get_task_run_outputFetch a run's prompt, final answer, and turn summary
list_eventsRead the trigger event ledger — "did the webhook arrive?", "why did that task run?"
list_event_typesThe event types a trigger can fire on, with each type's payload paths (what a when: clause may test and bind: may substitute), what emits it, and how its scope/dedupe keys are formed. Pass type for one type in full detail — kinds, required fields, and which values are untrusted. Read this before writing an on:: the type is a closed vocabulary, and a typo makes a trigger that never fires rather than an error.
test_triggerDry-run a trigger (a saved task, or an inline on/scope/when) against an event (a ledger event, or an inline one) and get back the stage that decided — the event type, the scope, a named when[i] clause with the value found at its path, a paused task, or the provenance guard. A malformed clause is reported as invalid, not as "no match".

Notes