Creating Agents
Step-by-step guide to creating and configuring AI agents in ThinkFleet.
Creating Agents
This guide walks you through creating an AI agent in ThinkFleet, from initial setup to deployment.
Step 1: Create a New Agent
- Navigate to Agents in the sidebar
- Click New Agent
- Choose the agent type:
- Chatbot — for Q&A and conversational assistants
- Agent — for task-oriented assistants with tool access
- Name your agent (e.g., "Support Agent", "Sales Assistant")
Step 2: Configure the System Prompt
The system prompt is the most important part of agent configuration. It defines who the agent is, what it knows, and how it behaves.
Writing an Effective System Prompt
A good system prompt includes:
- Role definition — Who is the agent?
- Behavioral rules — How should it respond?
- Knowledge boundaries — What should it know (and not know)?
- Tool usage guidelines — When should it use specific tools?
- Output format — How should responses be structured?
Example: Customer Support Agent
You are a customer support agent for TechCorp, a SaaS company.
## Your Role
- Help customers with product questions, account issues, and troubleshooting
- You have access to the knowledge base containing product documentation and FAQs
## Rules
- Always greet the customer warmly
- Search the knowledge base before answering product questions
- If you cannot find an answer, say so honestly — do not make things up
- For billing issues, use the "Create Support Ticket" tool with priority "high"
- For technical bugs, use the "Create Jira Issue" tool
- Never share internal company information, pricing formulas, or customer data of other users
## Response Style
- Be concise but helpful
- Use bullet points for multi-step instructions
- Include relevant links when available
Example: Developer Assistant
You are a senior software engineer assistant.
## Capabilities
- Review code and suggest improvements
- Help debug issues using available monitoring tools
- Create Jira tickets for bugs and features
- Query the database for application metrics
## Guidelines
- Always explain your reasoning
- When suggesting code changes, provide specific examples
- If you need to query the database, confirm the query with the user first
- For production issues, always check the monitoring dashboard before suggesting fixes
Using Personas
Instead of writing a system prompt from scratch, you can select a Persona — a pre-configured template:
- In the agent settings, click Select Persona
- Browse available personas by category:
- General — All-purpose assistant
- Developer — Code review, debugging, architecture
- QA — Testing, bug reports, quality assurance
- DevOps — Infrastructure, deployments, monitoring
- Research — Data gathering, analysis, summarization
- Accountant — Financial analysis, invoicing, reporting
- Select a persona to auto-fill the system prompt and tool recommendations
- Customize the prompt to fit your specific needs
Step 3: Select Tools
Tools give your agent the ability to take action. Navigate to the Tools tab in agent settings.
Adding Flow Tools
- Click Add Tool and select Flow
- Browse your existing flows
- Select the flows you want the agent to use
- Each flow appears as a callable tool with:
- Name: Derived from the flow name
- Description: You can customize this to help the LLM understand when to use it
- Parameters: Derived from the flow's trigger inputs
Adding Piece Tools
- Click Add Tool and select Piece
- Search for a piece (e.g., "Slack")
- Select specific actions to expose as tools
- Connect an account for the piece
Adding Built-in MCP Tools
- Click Add Tool and select Built-in Service
- Browse available services (email, web scraping, database, etc.)
- Enable the services you need
- Some services require a connection; others work without one
Adding External MCP Servers
- Click Add Tool and select MCP Server
- Enter the server URL or select from featured templates
- Configure authentication if required
- ThinkFleet discovers available tools from the server automatically
Step 4: Connect a Knowledge Base
If your agent needs to answer questions from documents:
- Navigate to the Knowledge Base tab
- Select an existing knowledge base or create a new one
- The agent will automatically search the knowledge base when relevant
See Knowledge Base Overview for details on creating and managing knowledge bases.
Step 5: Configure Memory
Memory settings control how the agent remembers past interactions:
| Setting | Description |
|---|---|
| Conversation History | Number of recent messages to include in context |
| Per-User Memory | Store user-specific facts across sessions |
| Semantic Recall | Search past conversations for relevant context |
See Agent Memory for detailed configuration options.
Step 6: Test Your Agent
Before deploying, test your agent in the built-in chat interface:
- Click Test Agent in the toolbar
- Send test messages covering common scenarios
- Verify that:
- The agent responds appropriately
- Tools are called when expected
- Knowledge base results are relevant
- The tone matches your system prompt
Testing Tips
- Test edge cases: vague questions, off-topic requests, multi-step tasks
- Verify tool usage: ask the agent to do something that requires a specific tool
- Check knowledge grounding: ask about topics covered in your documents
- Test refusal: ask about things the agent shouldn't answer
Step 7: Deploy
Enable the Agent
Toggle the agent status to Active. This makes it available through all configured channels.
Embed as Chat Widget
Get the embed code from the Deploy tab:
<script
src="https://your-instance.thinkfleet.com/chat/widget.js"
data-agent-id="agent_abc123"
data-theme="light"
data-position="bottom-right"
data-title="Chat with us"
data-placeholder="Type your message...">
</script>
Widget Customization
| Attribute | Description | Default |
|---|---|---|
data-theme |
"light" or "dark" |
"light" |
data-position |
Widget position on screen | "bottom-right" |
data-title |
Chat window title | Agent name |
data-placeholder |
Input placeholder text | "Type a message..." |
data-primary-color |
Brand color (hex) | "#6366f1" |
API Access
Use the agent via the REST API for programmatic integration. See API Reference.
Agent Settings Reference
| Setting | Description |
|---|---|
| Name | Display name for the agent |
| Type | Chatbot or Agent |
| System Prompt | Instructions defining behavior |
| Model | LLM model to use |
| Temperature | Creativity level (0 = deterministic, 1 = creative) |
| Max Tokens | Maximum response length |
| Tools | Available tools for the agent |
| Knowledge Base | Document collection for RAG |
| Memory | Conversation history and recall settings |