Skip to content

Actions & Agents (Layer E)

Layer E makes a packet executable: it defines what an AI agent should do with the knowledge. A packet with actions[] + agent_instructions (plus Layers B/C/D) is L3. action_type, trigger_type, and step_type are closed vocabularies — an unrecognized verb is one no runtime can execute.

Action

FieldTypeNotes
idstringRequired
action_typeenumRequired — see below
triggerobjectRequired{ trigger_type, schedule?, filter? }
stepsActionStep[]Required, ≥ 1
name · descriptionstring
entry_step_idstringFirst step (defaults to steps[0])
inputs · outputsobjectTyped I/O declarations
enabledbooleanDefault true

Action types

research · analyze · synthesize · export · notify · enrich · validate ·
publish · sync · monitor · generate · classify · embed · index

Trigger types

manual · on_source_added · on_analysis_complete · on_export ·
scheduled · on_kb_change · webhook · on_gap_identified

A scheduled trigger carries a cron schedule; any trigger may carry a filter (DirectiveCondition).

ActionStep

FieldTypeNotes
step_idstringRequired
step_typeenumRequired — see below
configobjectStep-type-specific (prompt, tool_name, url, condition_expr, loop_over, …)
output_varstringVariable to store output in (readable by later steps)
retryobject{ max_attempts, backoff_ms }
timeout_msinteger
next_step_idstring

Step types

llm_call · tool_call · http_request · condition · loop ·
parallel · emit_event · wait · transform · human_review

Agent instructions

agent_instructions is the structured brief for the consuming LLM:

FieldNotes
personaThe agent's role
system_promptFull prompt; {topic}, {domain}, {source_count} are template variables
goalOne-sentence objective
constraintsHard rules the agent must never violate (e.g. "Never present contested findings as validated")
allowed_toolsPermitted tool names
output_formatExpected output shape
temperature (0–2) · max_tokens · model_hints[]Generation hints (e.g. ["claude-opus-4-8"])

→ Next: Knowledge Graph · Directives (Layer D)

Released under the MIT License.