run function receives a Task object as its second argument. The task is your agent’s interface to the Guild runtime.
Available services
task.llm — Language model calls
Make LLM calls from your agent:
task.llm is always available.
task.env — Docker environments
Create and manage Docker containers for code execution:
task.env is always available. See environmentTools if you need LLM-accessible Docker tools.
task.tools — Invoke tools directly
Call any tool in your agent’s tool set by name:
{service}_{operation} — for example, github_issues_get, github_pulls_list, env_create. See Tool sets for all available tools.
task.tools is always available and contains all tools declared in your agent’s tools object.
task.ui — User interaction
Send messages and prompt users for input:
task.ui is available when your agent includes userInterfaceTools.
task.console — Debug logging
Log messages for debugging and diagnostics:
task.console is always available. To give an LLM access to debug logging, include consoleTools in your agent’s tools.
task.guild — Platform operations
Search for agents and request credentials:
task.guild is available when your agent includes guildTools.
Progress logging
Progress logs give users real-time feedback during long-running operations. They appear inline without requiring user interaction.- 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
Service availability
| Service | When available |
|---|---|
task.llm | Always |
task.env | Always |
task.tools | Always (contains your declared tools) |
task.console | Always |
task.ui | Requires userInterfaceTools in tools |
task.guild | Requires guildTools in tools |