Skip to main content
Every agent receives a Task object as its second argument. The task is your agent’s interface to the Guild runtime — it provides access to tools, LLMs, workspace variables, user interaction, and platform services.

Available services

See the Task object reference for the full API — every method, parameter, and return shape for each service.

Concurrent tool calls

To run the same work over many inputs — or several independent tool calls at once — fan out with task.gather from a single compiled ("use agent") agent. It dispatches every call as one batch and returns the results in source order.
task.gatherSettled is the same fan-out with Promise.allSettled semantics, so one failing call does not sink the rest. Promise.all over tool calls is an anti-pattern in compiled agents: it hides the tool-call promises from the runtime and does not run them in parallel. See Parallel tool calls with task.gather.

Progress logging

Progress logs give users real-time feedback during long-running operations:
Best practices:
  • Use present continuous tense: “Creating…”, “Running…”, “Writing…”
  • Keep messages to one line
  • Be specific: “Writing 3 files…” rather than “Processing…”
  • Log at meaningful milestones, not on every iteration

Next steps

Task object reference

The full API for every service on task.

LLMs

Make language model calls and set provider preferences.
Last modified on October 15, 2026