pub struct Agent {
pub name: Option<String>,
pub instruction: Option<String>,
pub prompt: Option<String>,
pub inline_skills: Vec<InlineSkill>,
pub preflight: Preflight,
pub wake_on: Option<Vec<WakeEvent>>,
pub on_workflow_finished: OnWorkflowFinished,
pub tools: AgentTools,
pub max_parallel_turns: Option<u32>,
pub conversation_budget: Option<Budget>,
pub ask_human_fallback: AskHumanFallback,
pub approval: Approval,
}Fields§
§name: Option<String>§instruction: Option<String>Static text, or a single-token URI a configured MCP server serves (read + subscribed) — one field, with the shape deciding which.
prompt: Option<String>A one-shot task (--prompt). With no workflows configured this is
what the generated run executes, while instruction stays the standing
policy (it becomes the run’s system prompt). Given alone, the prompt is
the whole job — agentd --prompt "…" --intelligence … runs it once and
exits with the answer on stdout.
inline_skills: Vec<InlineSkill>Skills defined by :::skill directives in the instruction — DERIVED
(never a config key): Settings::from_document extracts them, the
runtime feeds them to the catalogue. In the struct so a reload diff
sees an edited inline skill as an agent change.
preflight: Preflight§wake_on: Option<Vec<WakeEvent>>§on_workflow_finished: OnWorkflowFinished§tools: AgentTools§max_parallel_turns: Option<u32>§conversation_budget: Option<Budget>§ask_human_fallback: AskHumanFallbackWhat ask_human does when NO human channel can answer — the interface
is disabled — and, for auto, when a gate times out unanswered
fail (default; the ask errors immediately), wait (park until the
ask timeout), or auto (an LLM judge answers on the operator’s behalf,
conservatively, marked as auto).
approval: ApprovalWhat a gate does when a human COULD answer.
ask_human_fallback governs the case where nobody can answer;
this governs whether to ask at all. They are separate because they are
separate questions: “there is no channel” is a fact about deployment,
“do not interrupt me” is a policy about attention.
Implementations§
Source§impl Agent
impl Agent
Sourcepub fn wake_on(&self) -> Vec<WakeEvent>
pub fn wake_on(&self) -> Vec<WakeEvent>
The wake set used when the operator declares none: the events that carry information the agent cannot get any other way. A finished workflow is deliberately absent — success needs no attention.
pub fn max_parallel_turns(&self) -> u32
Sourcepub fn instruction_is_uri(&self) -> bool
pub fn instruction_is_uri(&self) -> bool
Whether the instruction is a resource reference (a single-token URI).