agent
Experimental. For evaluation. Interfaces, configuration, and behavior may change incompatibly.
Runs an LLM-driven tool loop to help workflows choose remediation actions. Prompts and tool output are sent to the configured LLM provider.
Prerequisites
- Configured LLM module.
Setup
- Enable the module in tenant TOML:
- See the agent guide for tools and workflow examples.
This module must be enabled in your Remediation Orchestrator config before it is available to scripts.
This module provides Agentic breakfix capabilities.
Members
execute
agent.execute(prompt, choices, tools, tool_params, label?, debug_metadata?, reflect_gaps?, reflect_handoff?)run an ai agent with tools from registry or inline definitions
Parameters
promptstringThe prompt describing what are you fixing/doing?choicesdict[string:string]The choices the agent can make before returningtoolslist[any]List of tools: [func1, func2] or [{tool: name, source: expr, approval_required: bool}, …]. Functions use default options. Dicts specify source (inline) or omit for registry.tool_paramsdict[string:dict[string:any]]Parameters available to tools via param() functionlabel?optionalstringLabel to identify this agent in the indexdebug_metadata?optionaldict[string:any]Arbitrary key-value data stored alongside the agent run for later analysisreflect_gaps?optionalboolIf true, after the agent chooses, run a best-effort reflection pass that returns capability gaps (missing tools/commands/output enrichment) on result.reflection_gaps for the platform. Off by default. Adds an LLM call; never affects the decision.reflect_handoff?optionalboolIf true, after the agent chooses, run a best-effort reflection pass that returns suggested next-step commands for a human on result.reflection_handoff (advisory only, never executed). Off by default.Returns
resultagent.AgentWorkflowResultsThe choice the agent madegenerate_starlark
agent.generate_starlark(prompt)Generate Starlark code using LLM based on a prompt
Parameters
promptstringThe prompt describing what Starlark code to generateReturns
resultdict[string:any]The generated Starlark code and metadata