Agent Transitions – Autonomous AI Execution in AgetnticOS
Agent transitions represent the most powerful building block in AgetnticOS. Unlike LLM transitions that process prompts and return responses, Agent transitions execute autonomous AI agents that can make decisions, call tools, and produce entirely new data structures.
Key Innovation: Agent transitions have optional presets (agents can discover context) and create NEW tokens rather than transforming input data.
Agent transitions execute autonomous AI that creates new data structures – not just transforms.
Agent vs LLM: Key Differences
Basic Agent Inscription Structure
{
"id": "t-agent-analyze",
"kind": "agent",
"mode": "SINGLE",
"presets": {
"task": {
"placeId": "task-queue",
"host": "my-model@localhost:8080",
"arcql": "FROM $ LIMIT 1",
"take": "FIRST",
"consume": true
}
},
"postsets": {
"output": { "placeId": "agent-output", "host": "my-model@localhost:8080" }
},
"action": {
"type": "agent",
"nl": "${input.data.instruction}",
"modelId": "my-model",
"maxIterations": 10
},
"emit": [
{ "to": "output", "from": "@response", "when": "success" }
]
}
Key Fields:
kind: "agent"– identifies this as an Agent transitionaction.nl– natural language instruction (from token or literal)action.maxIterations– limits agent reasoning loopsemit.from: "@response"– emits agent-created data
NL Instruction Patterns
The nl field supports three patterns:
Pattern 1: Literal Instruction
"action": {
"type": "agent",
"nl": "Analyze the codebase for security vulnerabilities and create a report"
}
Pattern 2: Expression from Token
"action": {
"type": "agent",
"nl": "${input.data.instruction}" // Reads from token field
}
// Token: { "instruction": "Review PR #123 for code quality" }
Pattern 3: Template with Variables
"action": {
"type": "agent",
"nl": "Analyze the file ${input.data.filename} and report issues with severity levels"
}
// Token: { "filename": "UserService.java" }
// Resolved: "Analyze the file UserService.java and report issues with severity levels"
Agent Process: Code Analysis
{
"id": "t-code-analyzer",
"kind": "agent",
"mode": "SINGLE",
"presets": {
"task": {
"placeId": "analysis-tasks",
"host": "agent-demo@localhost:8080",
"arcql": "FROM $ LIMIT 1",
"take": "FIRST",
"consume": true
}
},
"postsets": {
"security": { "placeId": "security-findings", "host": "agent-demo@localhost:8080" },
"quality": { "placeId": "quality-report", "host": "agent-demo@localhost:8080" },
"failed": { "placeId": "failed-analysis", "host": "agent-demo@localhost:8080" }
},
"action": {
"type": "agent",
"nl": "Analyze ${task.data.file} for security vulnerabilities and code quality issues. Return JSON with 'category' (security/quality) and 'findings' array.",
"modelId": "agent-demo",
"maxIterations": 10
},
"emit": [
{ "to": "security", "from": "@response", "when": "success", "condition": "category == 'security'" },
{ "to": "quality", "from": "@response", "when": "success", "condition": "category == 'quality'" },
{ "to": "failed", "from": "@response", "when": "error" }
]
}
Agent Capabilities
Agent transitions can leverage the full power of autonomous AI:
- Tool calling – agents can invoke tools to read files, make API calls, run queries
- Multi-step reasoning – controlled by
maxIterations - Context discovery – agents can explore the workspace to gather information
- Structured output – agents create well-formed JSON responses
Summary
- kind: “agent” – identifies the transition type
- Optional presets – agents can discover context themselves
- Creates NEW tokens – not transforming, but generating
- emit.from: “@response” – agent-created data structure
- maxIterations – controls agent reasoning depth
- NL patterns – literal, expression, or template instructions
Agent transitions are the most powerful building block – use them for complex, autonomous AI tasks that require multi-step reasoning and tool usage.