Build Your First Agent in 10 Minutes
This guide walks you through creating and configuring your first agent on Mycelis — from initial setup to a fully configured routing pipeline with Knowledge Bases and MCP Tools.
Prerequisites
To create an agent, you need at least one model deployed. If you haven't done that yet, check out this guide first: Deploy Your First Model in 5 Minutes.
Navigate to Agents
In your dashboard, click Agents in the left sidebar. This is where you'll find an overview of all agents you've created in your workspace.
To create a new agent, click New Agent in the top-right corner.
Create an Agent
In the creation dialog, you can set:
- Name — a descriptive name for your agent
- Description — an optional short description
- Routing Strategy — the initial strategy to use (can be changed at any time from within the agent)
Mycelis supports three routing strategies:
| Strategy | Description |
|---|---|
| Fixed | A single fixed deployment handles all requests |
| Rule-Based | Rules determine which deployment receives a request |
| Workflow | Visual graph editor for complex pipelines |
Click Create to create the agent and open its detail view.
Configure Your Agent
In the agent detail view, a tab bar at the top gives you access to all configuration areas.
Tab: General
Here you can adjust the basic configuration of your agent:
- Name — rename the agent
- Slug (API Model ID) — the unique identifier used as the
modelfield in API requests. This is especially important for OpenAI-compatible clients like OpenCode, OpenClaw, and others - System Prompt — a system-level instruction text prepended to every request sent through this agent
Tab: Models & Routing
This is where you configure the routing strategy or switch to a different one. All three strategies are explained below.
Routing Strategy: Fixed
With Fixed routing, every request is forwarded to a single, statically configured deployment.
- Select Fixed as the strategy
- Pick the target deployment from the dropdown list
- Click Save
After saving, two additional tabs appear in the tab bar: Knowledge & Tools and Settings.
Tab: Knowledge & Tools
Under Knowledge & Tools, you can equip your agent with external knowledge sources and tools.
MCP Tools
You can add entire MCP servers or selectively enable individual tools within a server.
If you haven't activated any MCP tools yet, set them up first in the MCP Hub.
Knowledge Bases
Attach one or more Knowledge Bases to give your agent access to custom knowledge. For every request, the agent automatically retrieves relevant passages and adds them as context.
Haven't created a Knowledge Base yet? Learn how to set up a RAG pipeline.
Routing Strategy: Rule-Based
With Rule-Based routing, you define rules that determine which deployment handles a request — based on conditions like the detected intent, query content, or technical request properties.
Click New Rule to create a rule. Each rule consists of one or more Conditions and a target deployment.
Condition: Auto Intent
Mycelis automatically detects the intent of a request. You can select one of the following intents as a condition:
- Coding
- Debugging
- Code Review
- Architecture
- Explanation
- Documentation
- Creative Writing
- Data Analysis
- Math
- Translation
- DevOps
- Agentic
- Long Context
Condition: Text / Query
Evaluates the raw request text:
- Contains — the request contains a specific word or phrase
- Regex — the request matches a regular expression
Condition: Request Info
Technical properties of the request:
- Has Tools — the request includes tool definitions
- Tokens > N — the request exceeds N tokens
- Tokens < N — the request is below N tokens
- Client Type Is — the request originates from a specific client (Cursor, GitHub Copilot, Continue, OpenCode, Generic)
- MCP Tool Available — a specific MCP tool is available in the request
- Knowledge Base ID — a specific Knowledge Base is active
Fallback Rule
You can also add a Default Rule (fallback) that fires when no other rule matches. This ensures every request gets a response.
Routing Strategy: Workflow
The Workflow editor is a visual graph editor for building complex routing pipelines. In Workflow mode, Knowledge Bases and Tools are configured directly inside the editor.
You can start from one of the available templates or begin with a blank canvas and build your pipeline from scratch.
Available Node Types
| Node | Description |
|---|---|
| Start | Entry point of the workflow — every pipeline begins here |
| Raw Model | Forwards the request directly to a deployment |
| Agent | Forwards the request to another configured agent |
| If / Else | Branching node with configurable If and Else branches |
| Knowledge Base | Attaches a single Knowledge Base as context |
| All KBs | Attaches all Knowledge Bases in the workspace |
| MCP Tool | Calls a single MCP tool |
| MCP Server | Attaches a complete MCP server |
| MCP Hub | Makes all activated MCP tools available |
| Semantic Cache | Caches semantically similar requests for faster responses |
| Smart Router | Intelligent routing based on request properties |
Connect the nodes to define the desired data flow, then click Save when the workflow is ready.
That's it!
Your first agent is configured and ready to use. You can call it directly via the OpenAI-compatible API — use your agent's slug as the model field:
curl https://app.mycelis.ai/api/proxy/v1/chat/completions \
-H "Authorization: Bearer myk_..." \
-H "Content-Type: application/json" \
-d '{
"model": "your-agent-slug",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Next steps:
- Set Up a RAG Pipeline — attach documents as a knowledge source
- MCP Tools — use external APIs directly in your model context
- API Reference — all available API parameters