curl call that returns the model’s reply, then shows the same job done from a config file. Use it when you have a running instance and want your first agent, or a new one.
The example is a two-stage pipeline named Question answerer. The first stage answers a question sent in a JSON body and the second rewrites the answer as one paragraph.
Before you begin
- A running instance with the dashboard open. See Install ServFlow.
- An LLM provider. In the sidebar under Configure, open Providers and add one if the list is empty. A sub-agent without a provider cannot run.
Create an agent in the UI
Create the agent
1
Open the Agents page and click New Agent
In the sidebar under Build, open Agents. Click New Agent in the top right. The New Agent page opens.

2
Choose Start from scratch
Under How to start, choose Start from scratch. The Name and description section appears below it.
Use a template installs a ready-made agent. Import a config takes a config you already have. Both leave you in the same editor as the rest of this guide.

3
Name the agent and choose an architecture
Enter a Name, for example 
Question answerer. The Architecture section appears.Choose Sequential pipeline and set Pipeline stages to 2 sub-agents. Each section keeps a summary of your answer on its right edge, so you can change an earlier choice at any point.
4
Click Create Agent
Click Create Agent. The editor opens on a canvas with four nodes from top to bottom: the entry, labelled Manual trigger, the sub-agents Analyze request and Compose response, and Final response. The agent is saved, and its id, 
question-answerer, is derived from the name.
Set the entry
The entry decides how a run starts. A new agent starts as a trigger that runs by hand or on a schedule. To make it answer HTTP requests:1
Open the entry panel
Click the Manual trigger node. The Entry panel opens on the right.
2
Choose the webhook entry type
Under Entry type, choose Webhook — a plain HTTP request starts the agent. A Path field appears.
3
Enter a path
Enter 
/ask. The entry node on the canvas relabels to /ask. The agent answers POST requests on that path.
Configure the sub-agents
1
Open the first sub-agent
Click the Analyze request node. Its panel opens.
2
Choose a provider
Under Provider, choose your provider. The panel confirms with “Calls” and the provider’s name.
3
Write the prompts
Under Instructions, enter a System prompt:Enter a User prompt that reads the request body:The 
body function reads a field from a JSON request body.
4
Configure the second sub-agent
Click the Compose response node. Choose the same provider and enter a System prompt:Leave its User prompt empty. In a pipeline, a stage receives the previous stage’s reply.
5
Save
Click Save in the top bar. The button reads Saved, and the running server picks up the agent without a restart.
Verify
Test the agent from the editor first:1
Click Run
Click Run in the top bar. The run dialog asks for a Request body.
2
Enter a request body and run
Enter the body and click Run:

3
Read the result
The Run panel shows Completed, a log of each sub-agent’s turn, and a Final response block with the reply, the duration, and the conversation thread id. New payload runs it again with a different body.

body function only reads requests sent with Content-Type: application/json.
Create an agent from the CLI or MCP
If you keep agents in files, describe the agent in a JSON or YAML document and create it with theresource CLI or the management MCP server. Both write to the same store the dashboard uses, and a running server picks up the change without a restart.
CLI
Theagent noun of the resource command covers the whole lifecycle. It talks to the SQLite store directly, so it works with no server running.
- The body is a stored agent: a
name, an optionalconfig_id, and the config document underconfig. A missingconfig_idis derived from the name. -f -reads the body from stdin.--dry-runvalidates and prints the result without writing.--set key=valueoverlays one field by dotted path. Repeat it for more.--reloadis on by default and signals a running server to reload.
providerID with an id from servflowai resource provider list.
MCP
The management server at/api/mcp exposes the same operations to an AI client. The tools for agents are config_schema, config_example, validate_config, create_config, update_config, list_configs, get_config, delete_config, and set_config_enabled. config_schema and config_example take a kind argument that defaults to agent. A config has to name a real provider and, for a handler entry, a real integration, so list_providers and list_integrations come first.
In local and none authentication modes the MCP endpoint is unauthenticated. Anyone who can reach it can administer the instance, so keep it off the public internet.
For the shape of the config document, run servflowai resource agent schema and see Agents.
Related
Entry handlers
Every entry type, its fields, and the variables it injects.
Agents
What an agent is made of: entry, sub-agents, and context groups.
Dynamic content
Template functions such as
body, param, and secret.Install ServFlow
Get a running instance if you do not have one yet.