Skip to content

agentic.task

Page status: scaffold Source state: generated Applies to: Shepherd v1.0-dev Owner: @docs-system-owner (TBD) Validation: scripts/gen_shepherd_api_inventory.py --check

This is reference — exact, generated facts. The mental model lives in concepts; recipes live in guides.

Pre-rename surface

Generated from the internal agentic facade; names and paths change at the Shepherd rename.

function

task

task(
    fn: Any = None,
    /,
    *,
    guidance: str | None = None,
    name: str | None = None,
    may: object | None = None,
) -> Any

Decorate a function as a syntax nucleus callable task.

Both bare and parameterized usage are supported per DECISIONS D10::

@task
async def foo(...): ...

@task(guidance="...")
async def foo(...): ...

@task(guidance="...", name="custom")
async def foo(...): ...

guidance and name are stored opaquely on TaskMetadata. may is the first-cut runtime-only effect-surface hook and accepts named profiles or structural kind Match values.

See also