Skip to navigation

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

Setup

  • Enable the module in tenant TOML:
[modules.agent]

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 returning
toolslist[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() function
label?optionalstringLabel to identify this agent in the index
debug_metadata?optionaldict[string:any]Arbitrary key-value data stored alongside the agent run for later analysis
reflect_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 made

generate_starlark

agent.generate_starlark(prompt)

Generate Starlark code using LLM based on a prompt

Parameters
promptstringThe prompt describing what Starlark code to generate
Returns
resultdict[string:any]The generated Starlark code and metadata