Skip to main content
@guildai/agents-sdk is the TypeScript package that provides everything you need to build a Guild agent: agent constructors, tool sets, service interfaces, and platform utilities.
The SDK is available only inside Guild’s agent runtime. You may not import external npm packages or Node.js built-in modules in agent code — only @guildai/agents-sdk, zod, and @guildai-services/* packages are supported.

Agent constructors

ExportDescription
llmAgentCreate a prompt-driven LLM agent
agentCreate a hand-coded agent with automatic or self-managed state
See LLM agents and Coded agents for usage.

Tool sets

ExportDescription
userInterfaceToolsUser interaction (prompt, ping)
guildToolsPlatform tools (agent search, credential requests)
environmentToolsDocker container management
gitHubTools and other service tools are in separate packages. See Services for import paths.
See Tool sets for details on each tool set.

Utilities

ExportDescription
pickCherry-pick specific tools from a tool set
guildServiceToolCreate a custom tool wrapping a service endpoint with a transformed output schema
progressLogNotifyEventCreate a progress log event for task.ui.notify()
outputWrap a result as agent output
callToolsReturn a tool call result from a SelfManagedStateAgent

Task object

The Task object passed to every agent’s run function provides access to platform services:
ServiceDescriptionAvailability
task.llmLLM calls via generateText()Always available
task.envManage Docker environmentsAlways available
task.consoleDebug logging (debug, info, warn, error, log)Always available
task.toolsTyped proxy for all declared toolsAlways available
task.uiUser interaction and notificationsRequires userInterfaceTools
task.guildPlatform operationsRequires guildTools
See Task object for the full API.

Peer dependencies

{
  "@ai-sdk/anthropic": "^2.0.25",
  "@ai-sdk/openai": "^2.0.32",
  "ai": "^5.0.47",
  "zod": "^4.1.9"
}