feat(automations): wire agent_task to multi_agent_chat with auto-approve loop

This commit is contained in:
CREDO23 2026-05-27 17:02:44 +02:00
parent 7ec3468113
commit ce45e11009
9 changed files with 285 additions and 31 deletions

View file

@ -2,26 +2,20 @@
from __future__ import annotations
from typing import Any
from pydantic import BaseModel, ConfigDict, Field
class AgentTaskActionParams(BaseModel):
"""Run an agent task with a scoped tool allowlist."""
"""Run a multi_agent_chat turn from an automation step."""
model_config = ConfigDict(extra="forbid")
prompt: str = Field(..., min_length=1, description="Task prompt; rendered at execute time.")
tools: list[str] = Field(
default_factory=list,
description="Tool identifiers the agent may call. Empty = no tool access.",
query: str = Field(
...,
min_length=1,
description="User query for the agent; rendered at execute time.",
)
model: str | None = Field(
default=None,
description="Model identifier. Defaults to the search space's agent_llm_id.",
)
output_schema: dict[str, Any] | None = Field(
default=None,
description="JSON Schema (draft 2020-12) the agent must return. Recommended.",
auto_approve_all: bool = Field(
default=False,
description="If true, every HITL approval is auto-approved; otherwise rejected.",
)