Mistral Le Chat allows users to build, customize, and deploy specialized AI assistants—known as custom agents—directly within its conversational interface and through Mistral AI Studio. Instead of repeatedly pasting prompt instructions, re-uploading reference documents, or toggling tools for routine tasks, custom agents package a chosen Mistral foundation model, explicit system guidelines, persistent document libraries, and native tool access into a reusable assistant. This guide details how to navigate Le Chat's agent creation workflow, structure tailored system instructions, connect reference files via document libraries for retrieval-augmented generation (RAG), equip agents with execution tools, and deploy them across team conversations using direct mentions.
Core Architecture of Mistral Custom Agents
Custom agents in Mistral Le Chat transform general-purpose large language models into role-specific digital coworkers. By bundling behavioral rules, proprietary knowledge, and execution capabilities into a single persistent configuration, agents eliminate repetitive setup and reduce prompt drift across multi-turn sessions.
Each custom agent consists of four interconnected components:
- Foundation Model: The underlying engine that governs reasoning capacity, context window size, latency, and operational cost.
- System Instructions: The behavioral constitution and role definition that dictates tone, analytical frameworks, output formatting, and operational boundaries.
- Document Libraries: Persistent collections of uploaded knowledge files (such as enterprise policy handbooks, codebase documentation, or research papers) indexed for vector retrieval and grounded citations.
- Tool Connectors: Native capabilities such as live web search, sandboxed Python code execution, and Model Context Protocol (MCP) integrations that allow the agent to fetch real-time information or perform computational tasks.
The table below highlights how key Mistral models align with different agent use cases:
| Model | Primary Strengths | Recommended Agent Use Cases |
|---|---|---|
| Mistral Large | Advanced multi-step reasoning, nuanced language comprehension, complex instruction following | Strategic planning, legal document analysis, executive synthesis, complex customer support |
| Mistral Small | High throughput, low latency, cost-efficient processing | High-volume triage, standard customer inquiry handling, rapid text summarization |
| Codestral | Specialized code generation, debugging, refactoring across 80+ programming languages | Technical documentation writing, code review, automated test generation, syntax validation |
| Pixtral | Native multimodal understanding of text, charts, diagrams, and scanned imagery | Visual report extraction, architectural diagram analysis, UI/UX audit assistants |
Step-by-Step Guide to Creating an Agent in Le Chat
Building a custom agent in Mistral Le Chat does not require technical coding experience. Users can configure, test, and save assistants directly within the web workspace.
Step 1: Access the Agents Workspace
- Log in to Mistral Le Chat using your organization or individual account.
- In the left-hand navigation sidebar, click on the Agents tab.
- Click the Create Agent button located in the top-right corner of the agent directory.
- Choose whether to start from a blank canvas or select a pre-built starter template (such as a coding helper, creative ideator, or document summarizer) as a baseline.
Step 2: Define Agent Identity and Core Metadata
- Name: Assign a clear, distinctive name (e.g.,
Financial-Auditor-BotorDocs-Reviewer). Because agents are invoked in chat using the@symbol, choose a concise identifier without special symbols. - Description: Provide a brief summary of the agent's responsibilities. This description appears in your team's agent catalog and helps collaborators identify when to invoke the assistant.
- Avatar: Select an icon or upload a visual badge to make the agent immediately recognizable in multi-agent chat threads.
Step 3: Select the Engine and Parameters
Under the model configuration settings:
- Select the appropriate Mistral model from the dropdown menu based on the analytical depth required.
- If configuring via Mistral AI Studio or advanced settings, adjust the Temperature parameter. Lower values (e.g.,
0.1to0.3) make the agent deterministic and factual, which is critical for document analysis and code auditing. Higher values (e.g.,0.7to0.9) encourage creative variance for copywriting and brainstorming.
Crafting Tailored System Instructions
The Instructions field serves as the system prompt that defines how your agent interprets queries, structures responses, and handles edge cases. Writing precise instructions ensures the agent remains focused on its objective and adheres to brand or organizational standards.
Key Elements of High-Performance Instructions
To maximize reliability, organize your system instructions into distinct operational sections:
- Role and Persona: Establish the agent's professional identity, level of seniority, and communication style (e.g., "You are a senior technical writer specializing in API documentation for cloud infrastructure").
- Task Objectives: Outline the primary deliverables the agent must produce, such as executive summaries, code diffs, or step-by-step troubleshooting workflows.
- Formatting and Output Rules: Specify exact output structures, such as CommonMark markdown tables, bulleted action items, or code snippets with language tags.
- Negative Constraints and Boundaries: Explicitly state what the agent must not do, including refusing out-of-scope requests, avoiding speculative assertions, or prohibiting the use of raw HTML.
- Citation Instructions: Instruct the agent to prioritize facts retrieved from attached knowledge files and to explicitly mention when information is absent from the provided documents.
Example System Instruction Blueprint
Below is an example of an effective, production-grade system instruction for an enterprise policy assistant:
Role & Purpose:
You are the Internal Compliance Assistant for Acme Corp. Your purpose is to help employees understand corporate IT security policies and data governance standards.
Operational Guidelines:
1. Always ground your explanations in the attached Acme Security Handbook documents.
2. When answering policy questions, quote the relevant policy section or document title.
3. If an employee asks a question that is not covered in the attached knowledge files, explicitly state: "This topic is not addressed in current company policy documentation. Please contact the IT Security team at security@acme.internal."
4. Never speculate or invent internal procedures.
Tone and Format:
- Professional, objective, and clear.
- Use bullet points for procedural steps.
- Avoid technical jargon unless explaining specific security protocols.
Incorporating Few-Shot Examples
Adding few-shot examples—demonstrations of ideal user inputs paired with expected model outputs—within the instructions significantly improves format consistency:
Example Interaction:
User: Can I use personal USB flash drives on company laptops?
Assistant: According to Section 4.2 of the IT Security Handbook ("Removable Storage Media"):
- Personal USB storage devices are strictly prohibited on all company-issued laptops.
- Data transfers must occur through approved enterprise cloud storage.
- Exceptions require written approval from the IT Security Director.
Connecting Knowledge Files via Document Libraries
One of the most powerful capabilities of Mistral custom agents is the ability to ground answers in proprietary data through Mistral's Document Libraries and native retrieval-augmented generation (RAG).
Understanding Document Libraries
Rather than uploading files into individual chat sessions where context windows can become cluttered, Mistral organizes knowledge into persistent Document Libraries. Once a library is created and populated with source material, multiple agents can connect to it simultaneously.
Supported file types include:
- PDF documents (
.pdf) - Plain text files (
.txt) - Markdown files (
.md) - Word documents (
.docx) - Code repositories and technical specifications
Setting Up a Document Library
- In Le Chat or Mistral AI Studio, navigate to the Libraries section.
- Click Create Library, enter a descriptive title (e.g.,
Product-Specifications-2026), and add an optional description. - Upload your reference documents. Mistral automatically initiates document parsing, text extraction, and vector embedding.
- Monitor the file processing status:
Running: The document is being parsed, chunked, and indexed into the vector database.Completed: The document is fully indexed and ready for retrieval queries.
Attaching Libraries to Your Custom Agent
- Open your agent in the Agents editor.
- Navigate to the Knowledge or Tools configuration panel.
- Enable the Document Library tool.
- Select the specific library or libraries you want the agent to search.
- In your system instructions, reinforce retrieval behavior by instructing the model: "Consult the connected Document Library before answering questions regarding proprietary procedures or product specifications."
Grounding and Verifiable Citations
When an agent queries an attached Document Library, Mistral's retrieval pipeline fetches relevant text chunks and provides them as contextual grounding. In its response, the agent produces verifiable citations (tool_reference chunks) that link directly back to the source document and page number. This transparency allows users to verify claims against primary sources and eliminates AI hallucinations.
Team Access and Permissions
In enterprise and organization workspaces, Document Libraries support granular access control:
- Viewer: Users can query the library and attach it to their personal agents, but cannot add or delete documents.
- Editor: Team members can upload new files, update existing documentation, and manage library metadata.
- Org Sharing: Organization administrators can share libraries across the entire enterprise directory, ensuring all teams access identical, up-to-date documentation.
Equipping Agents with Native Tools
Beyond passive document search, Mistral custom agents can be configured with active execution tools:
- Web Search (
web_search): Enables the agent to query the public web in real time. This is essential for agents that track market trends, verify recent regulatory changes, or gather current industry news. - Code Interpreter (
code_interpreter): Provides a sandboxed Python execution environment. The agent can write, run, and debug Python code to perform statistical calculations, clean CSV datasets, or generate mathematical models. - Image Generation: Allows the agent to generate contextual diagrams, marketing mockups, and illustrations upon user request.
- Connectors and Model Context Protocol (MCP): For developers and enterprise teams, Mistral supports registering external MCP servers and custom function calls, allowing agents to query internal databases, trigger GitHub pull requests, or update CRM records.
To activate tools, toggle the desired capabilities in the Tools section of the agent configuration panel.
Testing, Testing, and Deploying Agents
Mistral Le Chat includes built-in iteration features to validate agent performance before sharing it with a broader team.
Real-Time Interactive Preview
On the right-hand side of the agent configuration interface, Le Chat provides a live Preview panel:
- Enter typical user prompts to verify whether the agent adheres to system instructions.
- Ask questions that require knowledge from attached documents to confirm that the RAG connector retrieves relevant passages and outputs accurate citations.
- Test edge cases—such as off-topic questions or adversarial prompts—to ensure boundary guardrails hold.
- Adjust the system instructions or add clarifying rules in real time.
Automatic Saving
Mistral Le Chat automatically saves all modifications to agent metadata, system prompts, and tool configurations in real time. There is no manual save button required; changes reflect immediately in subsequent conversations.
Invoking Custom Agents in Conversations
Once configured, your custom agent appears in your personal agent drawer and the organization catalog:
- Direct Invocation via
@Mention: In any new or existing Le Chat conversation, type@followed by the agent's name (e.g.,@ComplianceBot How do I request a software license?). The agent assumes control of the conversation turn, applying its tailored instructions and knowledge base. - Dedicated Agent Chats: You can initiate a conversation directly from the Agents tab by clicking on the agent card and selecting Start Chat.
- Multi-Agent Collaboration: Within a single conversation thread, users can call multiple specialized agents sequentially (e.g., asking
@DataAnalystto summarize a dataset and then prompting@Copywriterto turn the findings into an executive newsletter).
Best Practices for Agent Maintenance
To keep custom agents accurate and valuable over time, follow these operational best practices:
- Keep Document Libraries Fresh: Periodically review and prune outdated documents in your attached libraries. When internal policies or product features change, upload updated files and remove obsolete versions to prevent conflicting answers.
- Refine Instructions Iteratively: Review user interactions and identify common failure modes. If the agent frequently provides overly verbose responses, add an explicit length constraint to the system instructions.
- Separate Broad and Specialized Roles: Rather than building a single monolithic agent that attempts to handle marketing, coding, and compliance simultaneously, create focused agents dedicated to specific workflows.
- Audit Tool Permissions: Only enable tools that are strictly necessary for the agent's mandate. For instance, an internal compliance agent should rarely have web search enabled if its sole source of truth must be internal company documentation.