Chapter 3: Introduction to Agents and Orchestration
TL;DR
- Worka's AI engine is a DAG-based orchestrator.
- An Agent is an LLM with a defined persona and a set of available Tools (functions).
- Plans are structured as Directed Acyclic Graphs (DAGs).
- Each node is a tool call with validated input.
- The orchestrator executes the graph, manages retries, and records an audit trail.
Now that you understand the high-level architecture of the Host and its Packs, let's dive into the "AI" part of AI Packs. What makes Worka different from a simple interface that just passes a prompt to an LLM?
The answer is Orchestration.
What is an Agent?
In the Worka ecosystem, an Agent is more than just a generic LLM. An Agent is an LLM that has been given a specific persona, a goal, and a curated set of Tools it can use. Think of it as a specialized AI worker. For example, you could have:
- A "Research Agent" whose persona is a university librarian and whose tools include web search and document analysis.
- A "Social Media Agent" whose persona is a marketing expert and whose tools include posting to X (formerly Twitter) and analyzing engagement.
What is a Tool?
Tools are explicit, schema‑validated functions exposed by your pack via MCP. They are the bridge between AI planning and real‑world actions. Tools are safe by construction: they receive structured inputs and return structured outputs.
Examples:
search_properties(query: string)send_message(to: string, body: string)create_work_order(property_id: string, issue: string)
How It All Comes Together: The DAG
This is the most important concept. When you give a task to an Agent, it doesn't just act immediately. It first creates a plan. In Worka, this plan takes the form of a Directed Acyclic Graph (DAG).
A DAG is essentially a flowchart. It's a set of steps where each step can depend on the output of the steps that came before it. This structure allows for complex, multi-step workflows.
Here is the typical orchestration flow:
-
Goal: A user (or another process) gives a goal to an Agent.
-
Planning (Agent): The Agent breaks the goal into a DAG of tool calls.
-
Execution (Orchestrator): The orchestrator executes the DAG, validates inputs, tracks retries, and records the results for audit and replay.
This model enables sophisticated automation without giving the AI unchecked access to systems. Every step is visible, validated, and traceable.