What are agents?
Agents are AI-powered entities that combine a language model, persona, tools, knowledge bases, and guardrails to perform tasks within your workflows. Think of an agent as a specialized team member with specific expertise, access to certain tools, and clear instructions about what it should and shouldn’t do. Unlike simple chatbots, MagOneAI agents are designed for production workflows. They execute as Activity nodes in Temporal-orchestrated processes, integrate with external systems via the Model Context Protocol (MCP), and operate within structured guardrails that ensure reliable, predictable behavior.Agent configuration breakdown
Every agent in MagOneAI consists of five core components:Persona
The persona defines your agent’s identity and behavior. It includes:- Name — A clear, descriptive identifier like “Contract Compliance Analyst” or “Customer Onboarding Assistant”
- Role description — What the agent does and its area of expertise
- System prompt instructions — Detailed behavioral guidelines that shape how the agent reasons and responds
- Constraints — Explicit boundaries defining what the agent should NOT do
Model
Each agent is powered by a language model (LLM) that you configure:- Choose from supported providers (OpenAI, Anthropic, Google, etc.)
- Select model tier based on task complexity
- Configure model parameters (temperature, max tokens, etc.)
- Different agents in the same workflow can use different models
Tools
Tools are MCP-connected capabilities that let your agent take actions in the real world:- Calendar tools — Schedule meetings, check availability, send invites
- Email tools — Send messages, read inbox, draft responses
- Search tools — Query databases, search documents, fetch external data
- Database tools — Read and write structured data
- Custom tools — Connect any API or system via MCP protocol
Knowledge bases
Knowledge bases are collections of documents that agents can access via retrieval-augmented generation (RAG):- Upload your documents (PDFs, DOCX, TXT, CSV, Markdown)
- Documents are chunked, embedded, and stored in Qdrant vector database
- Agents retrieve relevant context when answering questions
- Ground agent responses in your specific data and policies
Guardrails
The enforced guardrail is output schema validation — a JSON Schema attached to the agent that shapes and checks the structure of its output:- Output validation — Enforce the fields, data types, and structure of the agent’s output against a JSON Schema
- Structured output contract — The schema is rendered into the system prompt so the model produces the expected shape, and the output is validated against it at the workflow’s END node
How agents work within workflows
Agents don’t operate in isolation. They function as Activity nodes within Temporal workflows, executing as part of a larger orchestrated process.Agent execution flow
When an agent executes within a workflow:1
Receive input
The agent receives input variables from the workflow context (previous node outputs, workflow parameters, or user input)
2
LLM reasoning
The language model processes the input using the agent’s persona, system prompt, and any retrieved context
3
Tool calls (if needed)
If the agent has tools attached and the task requires external actions, the LLM generates tool calls that execute via MCP
4
RAG retrieval (if needed)
If the agent has knowledge bases attached, relevant document chunks are retrieved and injected into the prompt context
5
Generate output
The agent produces structured output according to its guardrails and output schema
Reusability across use cases
One of MagOneAI’s key advantages is agent reusability. You create an agent once and use it across multiple workflows within a project:- Build a “Contract Analyst” agent with compliance knowledge bases
- Use it in an approval workflow, a risk assessment workflow, and an audit workflow
- When you update the agent’s persona or knowledge base, all workflows benefit
- Maintain consistency across your organization’s processes
Agent lifecycle
Creating and deploying an agent follows a clear progression:1
Create agent with persona and model
Start by defining the agent’s identity, role, and selecting an appropriate language model
2
Attach tools and knowledge bases
Connect the capabilities and information sources the agent needs to perform its role
3
Add agent to workflow as an Activity node
Drag the agent onto the workflow canvas and position it in the execution flow
4
Configure input/output mapping
Map workflow variables to the agent’s input schema and define how outputs feed downstream nodes
5
Test and iterate
Execute test runs, review agent behavior, refine persona and guardrails, then deploy to production
Structured autonomy
MagOneAI agents embody “structured autonomy” — they’re autonomous in their reasoning and decision-making, but operate within well-defined boundaries:- Autonomous reasoning — Agents use LLMs to interpret inputs, plan actions, and generate outputs without rigid if/then rules
- Structured execution — Agents execute within Temporal workflows that provide durability, observability, and error handling
- Bounded actions — Tools and guardrails constrain what agents can do, preventing unexpected behavior
- Traceable decisions — Every agent execution is logged with full context, making behavior auditable
Next steps
Personas and prompts
Learn how to craft effective agent personas and system prompts
Knowledge bases and RAG
Create knowledge bases and enable retrieval-augmented generation
Building workflows
Understand how agents fit into Temporal-orchestrated workflows