LinkLab AI Agent Workflow Designer
LinkLab is a browser-based visual editor for multi-step AI agent pipelines. Compose a directed
graph on the canvas, then export production-oriented Python or YAML for the
linklab runtime.
Introduction
The designer supports agents, control flow, retrieval (RAG), human-in-the-loop gates, and
resource nodes. Exported code targets the LinkLab Python API, for example
from linklab import Agent, AgentGraph, ….
Open the builder in any modern browser. No install, terminal, or local server is required. You can design on the canvas, export code, and run mock or optional live OpenAI tests from the same page.
Purpose
The builder bridges early design and deployment:
- Make orchestration legible: who calls whom, where tools and retrievers attach, and where humans approve or revise.
- Keep the canvas and exported code aligned so graph topology is not maintained in two places.
- Validate flows with mock or live traces in the test panel before moving code into your runtime.
- Share work via the hosted builder link or Export → Embed Widget for embedding in another site.
How the builder works
Graph model
The canvas uses an in-memory graph of nodes (typed vertices) and edges (port connections). Each node type has its own fields—model name, system prompt, retriever store, loop condition, HITL form schema, and so on. The properties panel edits the selection; undo, redo, and templates operate on the same model.
To wire the graph, click an output port, then a compatible input. Edge labels can express routing
conditions such as approved or needs_revision for branching after
agents, loops, or HITL nodes.
Code generation
The Code panel regenerates as you edit:
- Python —
Agentinstances, tools, retrievers, subgraphs, and anAgentGraphwith entry points and edges. - YAML — a declarative equivalent for config-driven pipelines.
Use File → Export or copy from the code panel. Import accepts YAML or Python to round-trip designs.
Generated imports follow the linklab package layout used in standard agent projects.
AI-assisted graph creation
Generate with AI (header or templates menu) accepts a natural-language description and an optional OpenAI API key. With a key, the UI can propose nodes and edges from the browser; without one, built-in templates still bootstrap common patterns. This assists design only; it does not replace your exported runtime graph.
In the browser
The app is a single page. The graph lives in memory while you work. Use File → Import or templates to load designs, and Export to copy or download Python or YAML. The UI defaults to mock runs and switches to live mode when you add an API key in the test panel.
Node types
| Node | Role |
|---|---|
| START / END | Graph entry and terminal states. |
| Agent | LLM step: provider, model, system prompt, tools, optional eval assertions, session store reference. |
| Retriever (RAG) | Vector or hybrid retrieval for downstream agents (Chroma, Qdrant, in-memory, BM25+vector in templates). |
| Session Store | Resource node for AgentConfig memory; bound in agent properties, not by edges alone. |
| Loop | Conditional iteration (e.g. reviewer returns work until approved). |
| Subgraph | Reusable subgraph invoked as a structured step. |
| Human Input (HITL) | Pause for approval or form input; branches on labeled outcomes. |
| Agent Tool | Expose another agent or target node as a tool for a parent agent. |
| Note | Non-executing annotation on the canvas. |
File → Templates includes simple chatbot, researcher + writer, RAG and hybrid RAG, reviewer loops, HITL approval, multi-model panels, and chain-of-thought layouts as starting points.
LLMs and agents
Each Agent node is one LLM-backed step. Configurable fields include:
- Provider and model (e.g. OpenAI
gpt-4o-mini; the static UI export and live test paths are OpenAI-oriented). - System prompt for that step’s role and constraints.
- Tools as a comma-separated list, or nested agent tools for delegation.
- Eval assertions such as
not_empty,contains, andno_apology, shown on the canvas and in traces. - Frozen outputs to pin a node’s last result while iterating downstream without extra spend.
Multi-agent patterns include sequential chains (research → write → review), fan-out via graph
shape, reviewer loops with labeled edges, RAG-grounded agents, and parent agents calling children
through Agent Tool nodes. Exported AgentGraph matches the diagram for auditing and
debugging.
The test panel (Run) sends a user message through the graph. With no API key, the engine produces
[mock] traces for demos and layout testing. With an OpenAI key, supported steps call
the API from the browser; keys stay in your session only. Timeline scrubber, Gantt view, history,
and trace replay help inspect handoffs and failures.
Use cases
- Prototyping agent products with stakeholders, then handing off exported Python to engineering.
- RAG pipelines with retrievers ahead of writer or summarizer agents; tune store type and
top_kin properties. - Human-in-the-loop compliance gates before external or publication steps.
- Quality loops with reviewer agents and conditional edges until
approvedor a cap on iterations. - Documentation and training via embed on a docs site using the same builder surface.
- Teaching orchestration without installing a full backend first.
Mock vs live runs
| Mode | When | Behavior |
|---|---|---|
| Mock | API key field empty | Deterministic [mock] traces; no external LLM calls; HITL steps auto-resolve for quick previews. |
| Live | OpenAI key in test panel | Completion streaming from the browser for supported agent steps. |
Open Run in the header, enter a test message, and watch the Output tab. Use History and the timeline scrubber to compare runs. If a step stays on “Running…”, clear the API key to return to mock mode and refresh the page.
Conclusion
LinkLab is a browser-native design surface for LLM agent systems: graph editing, live codegen,
mock and live test runs, and export to linklab Python or YAML. Map agents, tools,
retrieval, and human gates on the canvas, validate in the test panel, then copy or download code
for your production stack.