[π Getting Start](./getting-started.md) | [π Architecture](./architecture.md) | [π§ Idea](./index.md) | [OrKaUI](./OrKa_UI_Getting_Started_With_Images.md)
## β¨ Why OrKa UI Exists
Most LLM pipelines today are brittle, black-box, and unscalable. OrKa UI was built to make AI orchestration **modular, explainable, and visual**.
With OrKa, youβre not chaining prompts β youβre building structured cognition with logic, memory, and traceability.
---
## π Core Concepts
- **Agents** β Modular reasoning units (classification, binary logic, LLM outputs)
- **Routers** β Cognitive logic gates that determine what to do next
- **Links** β Define directional execution between agents
- **YAML** β The resulting config file, executable via OrKa backend
---
# Getting Started with OrKa UI π
OrKa UI is a no-code visual tool that lets you build intelligent agent workflows and export them to YAML with a single click. It's built for developers, tinkerers, and product minds who want to orchestrate AI cognition visually.

---
## π§ What is OrKa?
OrKa (Orchestrator Kit Agents) allows you to visually compose **modular agents** and **logic nodes** (like routers) to define how cognitive workflows behave. Every agent has a purpose, every connection defines logic.
---
## π§© Prompt Templates for Agents
When designing agents in OrKa UI, you can use **Jinja-style templates** to inject context dynamically. This enables your agents to reason over previous steps and build context-aware answers.
Hereβs an example template used for an **openai-answer** agent:
```jinja
give a compelling and detailed answer to this question. Expand your knowledge for this answer using the given extra data:
## Question: {{ input }}
## Extra data : {{ previous_outputs }}
```
This lets the agent access:
- `{{ input }}` β the original user query
- `{{ previous_outputs }}` β concatenated results from upstream agents
Templates can be used in any prompt field inside OrKa agents.
Use them to:
- Build context-aware responses
- Chain logic coherently
- Inject knowledge progressively
---
## βοΈ How to Use OrKa UI (Step-by-Step)
### 1. Launch the App
> Open OrKa UI in your browser or localhost. You'll be greeted with a dark canvas and a sidebar to your left.
---
### 2. Add Agents and Logic
#### π Add Logic Nodes
- Click on the **Router** button under "Add Logic Nodes".
- A logic node is used to control conditional execution β think of it like an `if` statement for cognition.
#### π Add Agent Nodes
- Choose from:
- `duckduckgo` (search agent)
- `openai-answer` (LLM-based text generation)
- `openai-binary` (binary classification)
- `openai-classification` (multi-option classification)
- These appear in vibrant colors on your canvas.
---
### 3. Link Nodes
- Click on any agent node, then click on a second to create a directional link.
- Routers can link to up to 2 children depending on decision conditions.
- Use links to define execution flow.
---
### 4. Write Prompts & Settings
- Select a node to edit its configuration in the right-side panel.
- Add:
- prompts
- classification options
- router logic (`decision_key`, routing map)
---
### 5. Generate the YAML
- Click `Generate YAML` on the bottom right.
- Your YAML spec will appear in the center panel.
- Click **Copy** to use it anywhere β for running in OrKa backend or sharing.
---
### 6. Test It
- **Enter and Input**: Add a question a task or a fact based on your workflow
- **Test Local**: Run it on your local backend (OrKa API).
- **Test API**: Sends the built graph to a hosted endpoint.
---
## π‘ Tips
- Routers are the brain: they determine path based on logic.
- Nodes are reusable. Tweak prompts until your cognition feels right.
- Export YAML and use it with OrKa Core or anywhere YAML-based flows are parsed.
---
## π¦ What's Next?
- Add memory support
- Visual debug paths
- Branching logic + nested flows
- Hosted orchestration
---
Made with π§ by [Marco Somma](https://github.com/marcosomma)
> Feedback welcome.
[π Getting Start](./getting-started.md) | [π Architecture](./architecture.md) | [π§ Idea](./index.md) | [OrKaUI](./OrKa_UI_Getting_Started_With_Images.md)