Skip to main content

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
The persona is the foundation of your agent’s behavior. A well-crafted persona produces consistent, reliable outputs across workflow executions.

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
This flexibility lets you optimize for cost and performance — use powerful models for complex reasoning tasks and lighter models for straightforward operations.

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
When you attach tools to an agent, you give it the ability to interact with external systems during workflow execution.

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
Knowledge bases transform agents from general-purpose assistants into domain experts with access to your organization’s information.

Guardrails

Guardrails ensure agents produce valid, safe outputs:
  • Output validation — Enforce expected data types and formats
  • Structured I/O schemas — Define input/output contracts using DSPy
  • Content filtering — Block unsafe or inappropriate content
  • Confidence thresholds — Specify minimum confidence levels for decisions
Guardrails are essential for production workflows where downstream systems depend on predictable agent behavior.

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
The agent’s output is stored in the workflow variable store and flows to the next node in the workflow canvas.

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
Start simple. Create a basic agent with just a persona and model, test it in a simple workflow, then progressively add tools and knowledge bases. This iterative approach helps you understand how each component affects agent behavior.

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
This balance makes agents suitable for production environments where you need both flexibility and reliability.

Next steps