AgenticOS Building Blocks: Agent Transitions – Autonomous AI Execution

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 Transition: Autonomous AI Execution Context (optional) Task Instruction AI AGENT autonomous execution Output NEW Token Agent Creates NEW Data Not transforming input Agent decides output structure Optional Presets Agent can discover context

Agent transitions execute autonomous AI that creates new data structures – not just transforms.


Agent vs LLM: Key Differences

Agent vs LLM Transitions LLM Transition • Processes prompts → returns response • Presets required • emit.from: @response.json • Two-field emit (when + condition) Agent Transition • Executes autonomous AI agent • Presets optional (can discover) • emit.from: @response • Creates NEW tokens

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 transition
  • action.nl – natural language instruction (from token or literal)
  • action.maxIterations – limits agent reasoning loops
  • emit.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

Agent Process: Autonomous Code Analysis Analysis Tasks t-code-analyzer AGENT maxIterations: 10 security findings quality report failed analysis category==”security” category==”quality” when: “error” Task Token Example { “file”: “Auth.java”, “instruction”: “Analyze for vulns” }
{
  "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.

Leave a Reply

Your email address will not be published. Required fields are marked *