Skip to main content

AI Agents

Agents are specialized AI modules that handle different types of requests. Mesachat's agent system dynamically routes messages to the most appropriate agent.

Agent Routing

When a message arrives, the agent router evaluates:

  1. Keywords — Specific trigger words or phrases
  2. Semantic matching — AI-powered intent classification
  3. Priority — Agent priority for conflict resolution

The best-matching agent handles the request.

Built-in Agents

Mesachat comes with several pre-configured agents:

AgentPurposeExample Triggers
ChatGeneral conversationAny unmatched message
Web SearchSearch the internet"search for...", "find..."
Image GenerationCreate images"generate an image of..."
CodeWrite and explain code"write a function that..."
Web AnalyzerAnalyze web pages"summarize this URL..."

Agent Capabilities

Each agent has:

  • Role Instructions — Define personality and behavior
  • Tool Access — Which tools the agent can use
  • Behavior Instructions — Guidelines for responses

Orchestration

For complex requests that require multiple steps, Mesachat uses an orchestration engine:

  1. Planner analyzes the goal and creates an action plan
  2. Executor carries out each step
  3. Satisfaction Checker evaluates if the goal is met
  4. Shared data flows between steps for context
tip

Orchestration is automatic. If a request requires multiple agents (e.g., "search for React tutorials and create a summary image"), the orchestrator coordinates them.

Managing Agents

Agents are configured in the database and managed through the Agent Studio in the admin interface at /agents/definitions.