AgenticOS Building Blocks: The Six Transition Types – Complete Overview

AgetnticOS Building Blocks – The Six Transition Types

AgetnticOS provides six distinct transition types, each designed for specific agentic patterns. Understanding when to use each type is fundamental to building effective agentic processes.

The Six Building Blocks of AgetnticOS PASS kind: “task” Pure routing, no transformation emit.from: @input.data Use: routing, filtering, fan-out MAP kind: “map” Template-based transformation emit.from: @response Use: reshaping, enriching data HTTP kind: “http” External API calls emit.from: @response.json Use: integrations, webhooks LLM kind: “llm” AI prompt processing emit.from: @response.json Use: NLP, classification, extraction AGENT kind: “agent” Autonomous AI execution emit.from: @response Use: complex AI tasks, tools COMMAND kind: “command” Shell/FS execution emit.from: @result Use: scripts, CLI tools, files Each transition type has specific emit semantics – understanding these is key to building effective agentic processes

Transition Comparison Table

Type kind emit.from when evaluates Primary Use Key Feature Pass “task” @input.data Original token data Routing, filtering No transformation Map “map” @response Transformed result Data reshaping Template transformation HTTP “http” @response.json HTTP response body API integration Auth, retry, timeout LLM “llm” @response.json AI response content NLP, classification Two-field emit pattern Agent “agent” @response Agent-created data Complex AI tasks Creates NEW tokens Command “command” @result Batch results Shell, files Executor service The emit.from determines what data is available in the “when” condition – this is the key semantic difference between transition types

1. Pass Transition

Purpose: Route tokens without transforming them – pure decision logic.

{
  "id": "t-router",
  "kind": "task",
  "action": { "type": "pass" },
  "emit": [
    { "to": "active", "from": "@input.data", "when": "status == 'active'" },
    { "to": "inactive", "from": "@input.data", "when": "status == 'inactive'" }
  ]
}

2. Map Transition

Purpose: Transform token data through templates – reshape, enrich, restructure.

{
  "id": "t-transform",
  "kind": "map",
  "action": {
    "type": "map",
    "template": {
      "orderId": "${input.data.orderId}",
      "status": "processed"
    }
  },
  "emit": [
    { "to": "output", "from": "@response", "when": "status == 'processed'" }
  ]
}

3. HTTP Transition

Purpose: Call external APIs with authentication, retry, and response routing.

{
  "id": "t-api-call",
  "kind": "http",
  "action": {
    "type": "http",
    "method": "POST",
    "url": "https://api.example.com/orders",
    "body": { "orderId": "${input.data.orderId}" },
    "auth": { "type": "bearer", "token": "..." }
  },
  "emit": [
    { "to": "success", "from": "@response.json", "when": "success" },
    { "to": "error", "from": "@response.json", "when": "error" }
  ]
}

4. LLM Transition

Purpose: Process data through AI with prompt templates and content-based routing.

{
  "id": "t-sentiment",
  "kind": "llm",
  "action": {
    "type": "llm",
    "systemPrompt": "Analyze sentiment. Respond with JSON.",
    "userPrompt": "Review: ${input.data.text}"
  },
  "emit": [
    { "to": "positive", "from": "@response.json", "when": "success", "condition": "sentiment == 'positive'" },
    { "to": "negative", "from": "@response.json", "when": "success", "condition": "sentiment == 'negative'" }
  ]
}

5. Agent Transition

Purpose: Execute autonomous AI agents that create new data structures.

{
  "id": "t-agent",
  "kind": "agent",
  "action": {
    "type": "agent",
    "nl": "${input.data.instruction}",
    "maxIterations": 10
  },
  "emit": [
    { "to": "output", "from": "@response", "when": "success" }
  ]
}

6. Command Transition

Purpose: Execute shell commands and filesystem operations via executor service.

{
  "id": "t-execute",
  "kind": "command",
  "action": {
    "type": "command",
    "inputPlace": "input",
    "dispatch": [{ "executor": "bash", "channel": "default" }]
  },
  "emit": [
    { "to": "response", "from": "@result", "when": "success" }
  ]
}

Choosing the Right Transition

  • Pass – When you need to route tokens based on field values without changing the data
  • Map – When you need to transform, reshape, or enrich token data
  • HTTP – When you need to integrate with external REST APIs
  • LLM – When you need AI processing with predictable prompt/response patterns
  • Agent – When you need autonomous AI that can make decisions and use tools
  • Command – When you need to run shell commands or manage files

Master these six building blocks and you can construct any agentic process in AgetnticOS.

Leave a Reply

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