Agent Settings
This guide provides a comprehensive overview of all configuration options available when setting up and managing your AI agents in PLai Framework. Agent settings are organized into four main tabs: Agent, Model, Datasources, and Tools.Overview
Agent settings allow you to customize every aspect of your AI agent’s behavior, appearance, and capabilities. Each setting plays a crucial role in determining how your agent interacts with users, processes information, and executes tasks.Agent Tab
Identity, behavior, and personality settings
Model Tab
LLM provider, model selection, and advanced features
Datasources Tab
Knowledge base configuration and retrieval settings
Tools Tab
Tool integration and execution parameters
Agent Configuration
The Agent tab contains settings related to your agent’s identity, appearance, and core behavior.Avatar
Upload a custom image to represent your agent in chat interfaces.Supported Formats:
Recommended Size: 512x512 pixels for optimal display
.jpg, .jpeg, .pngRecommended Size: 512x512 pixels for optimal display
- Brand consistency across customer-facing agents
- Visual differentiation between multiple agents
- Enhanced user experience with personalized avatars
Name
The human-readable identifier for your agent.Display name that appears throughout the interface
- Keep it clear and descriptive (e.g., “Customer Support Bot”, “Data Analyst”)
- Avoid special characters that might cause display issues
- Consider your branding and user-facing context
Description
A brief summary of your agent’s purpose and capabilities.Explains what the agent does and when to use it
- Be specific about the agent’s specialty
- Mention key capabilities or domains
- Keep it concise (1-2 sentences)
Name Slug
A unique, URL-friendly identifier for your agent.Lowercase identifier with underscores (minimum 5 characters)
- Lowercase letters and numbers only
- Use underscores to separate words
- Minimum 5 characters
- Must match pattern:
^[a-z0-9]+(?:_[a-z0-9]+)*$
Core Agent
Availability: This setting is only visible for Core Agents Organization accounts.
Designates this agent as a core system agent
Prompt (System Instructions)
The system prompt defines your agent’s personality, behavior guidelines, and response style.Instructions that guide the agent’s behavior and responses
- Role Definition: Who the agent is
- Capabilities: What it can do
- Constraints: What it should/shouldn’t do
- Style Guidelines: How it should communicate
- Context: Additional relevant information
- Basic Example
- Advanced Example
- Markdown Editor
Initial Message (Intro Message)
The first message your agent sends when a new conversation starts.Greeting message displayed at the start of conversations
- Be welcoming and friendly
- Set expectations for what the agent can do
- Keep it concise
- Consider adding a call-to-action
- Simple
- Informative
- With Options
Model Configuration
The Model tab contains all settings related to the language model powering your agent.Language Model Selection
Choose the AI model provider and specific model for your agent.AI provider (OpenAI, Anthropic, Google, etc.)
Specific model within the selected provider
- OpenAI: GPT-4o, GPT-4.1, GPT-5
- Anthropic: Claude Sonnet, Claude Opus, Claude Haiku
- Google: Gemini Pro models, Gemini Flash models
- Groq: Llama models with ultra-fast inference
- Together AI: Open-source models (Llama, Mixtral)
- RouteLLM: Intelligent model routing
- Selection Guide
| Use Case | Recommended Model | Reason |
|---|---|---|
| Complex reasoning | GPT o1/o3 / Claude 4.x Opus | Best accuracy |
| Fast responses | GPT-4.1 mini / Gemini 2.5 Flash | Low latency |
| Cost optimization | RouteLLM | Automatic routing |
| Long context | Claude 4.x Sonnet / Gemini 3 Pro | Large context window |
| Structured output | GPT-4.x models / Gemini 3 Pro | Native support |
RouteLLM Configuration
What is RouteLLM?
RouteLLM intelligently routes requests between a “strong” model (for complex tasks) and a “weak” model (for simple tasks) based on query complexity, optimizing cost and performance.
RouteLLM intelligently routes requests between a “strong” model (for complex tasks) and a “weak” model (for simple tasks) based on query complexity, optimizing cost and performance.
Threshold
Sensitivity for routing between strong and weak models (0.01 - 0.30)
- Lower threshold (0.01 - 0.10): Routes more queries to the strong model (higher quality, higher cost)
- Higher threshold (0.15 - 0.30): Routes more queries to the weak model (lower cost, faster)
- Default (0.11): Balanced approach
| Threshold | Strong Model Usage | Best For |
|---|---|---|
| 0.05 | ~70% | Critical applications requiring high accuracy |
| 0.11 | ~50% | Balanced cost and quality |
| 0.20 | ~30% | Cost-sensitive applications |
Strong Model Config
Configuration for the high-performance model used for complex queries.Provider for the strong model
Specific strong model
Creativity level for strong model (0.0 - 2.0)
Maximum response length for strong model
Weak Model Config
Configuration for the efficient model used for simple queries.Provider for the weak model
Specific weak model
Creativity level for weak model (0.0 - 2.0)
Maximum response length for weak model
Enable Streaming
Stream responses in real-time as they’re generated
- ✅ Better user experience with progressive display
- ✅ Reduced perceived latency
- ✅ More interactive feel
- ✅ Users can start reading immediately
- ⚠️ Not supported by all models
- ⚠️ Cannot be used with Structured Output
- ⚠️ May not work well with certain integrations
Streaming and Structured Output are mutually exclusive. Enabling one will automatically disable the other.
- API integrations requiring complete responses
- Batch processing scenarios
- When using Structured Output
- WebSocket limitations in your application
Enable Language Detection
Automatically detect and respond in the user’s language
- Agent analyzes the user’s first message
- Detects the language automatically
- Responds in the same language throughout the conversation
- ✅ Seamless multi-language support
- ✅ No manual configuration needed
- ✅ Better global user experience
- ✅ Works with all models
Best Practice: Enable this for public-facing agents serving international audiences.
Enable Citations
Include source citations in agent responses
This feature is currently in development and may not be fully functional in all scenarios.
Structured Output
Force responses to follow a predefined JSON schema
- ✅ Model must support structured outputs (GPT-4, Gemini Pro)
- ✅ JSON Schema must be defined
- ❌ Cannot be used with RouteLLM
- ❌ Cannot be used with Streaming
JSON Schema
JSON Schema defining the structure of agent responses
- Contact Extraction
- Sentiment Analysis
- Product Catalog
- Schema Generator
- Data extraction and transformation
- API integration with strict requirements
- Database population from unstructured text
- Form filling automation
- Consistent report generation
Temperature
Controls randomness and creativity in responses (0.0 - 2.0)
| Value | Behavior | Best For |
|---|---|---|
| 0.0 - 0.3 | Deterministic, focused | Factual Q&A, data extraction, structured tasks |
| 0.4 - 0.7 | Balanced | General conversation, customer support |
| 0.8 - 1.2 | Creative, varied | Content creation, brainstorming |
| 1.3 - 2.0 | Highly creative | Creative writing, diverse ideas |
- Low (0.2)
- Medium (0.7)
- High (1.5)
Prompt: “Describe a sunset”Response:✅ Consistent, factual, predictable
Some models don’t support temperature adjustments. The interface will display an alert if temperature control is unavailable for your selected model.
Max Output Tokens
Maximum length of the agent’s responses (in tokens)
- Tokens are pieces of words used by language models
- Roughly 1 token ≈ 4 characters or ≈ 0.75 words
- Both input and output count toward limits
| Tokens | Words (approx) | Best For |
|---|---|---|
| 256 | ~192 | Short answers, chatbots |
| 512 | ~384 | Standard responses |
| 1024 | ~768 | Detailed explanations |
| 2048 | ~1536 | Long-form content |
| 4096+ | ~3072+ | Articles, reports |
- Higher token limits = higher costs per request
- Unused tokens still count toward limits
- Balance between thoroughness and cost
Max Steps (Tool Execution)
Maximum number of tool executions per agent response (1 - 128)
- Chain multiple tool calls together
- Iterate on results
- Execute complex multi-step workflows
| Steps | Use Case | Example |
|---|---|---|
| 1-3 | Simple tool use | Single database query, one API call |
| 4-10 | Multi-step workflows | Search → Analyze → Summarize |
| 11-25 | Complex automation | Data gathering → Processing → Formatting → Output |
| 26+ | Advanced workflows | Complex research or data pipelines |
Higher step limits give your agent more autonomy but can increase response time and costs. Start conservative and increase as needed.
Datasources Configuration
The Datasources tab configures how your agent retrieves and uses information from connected knowledge bases.Vector Top K
Number of most relevant document chunks to retrieve from vector search
- User query is converted to a vector embedding
- Vector database finds similar document chunks
- Top K most similar chunks are retrieved
- Agent uses these chunks to formulate response
| Value | Retrieval Scope | Best For |
|---|---|---|
| 3-5 | Narrow, focused | Precise questions with clear answers |
| 6-10 | Balanced | General purpose Q&A |
| 11-20 | Broad | Complex questions requiring multiple sources |
| 20+ | Comprehensive | Research, detailed analysis |
- Lower K: Faster, more focused, may miss relevant context
- Higher K: More comprehensive, slower, may include irrelevant info
Enable Rerank
Use a reranking model to improve relevance of retrieved documents
- ✅ Improved answer accuracy
- ✅ Better handling of complex queries
- ✅ Reduced hallucinations
- ✅ More relevant context for the agent
Rerank Top K
Number of top documents to keep after reranking
This setting only appears when “Enable Rerank” is turned on.
- Vector Top K: 20 (cast a wide net)
- Rerank Top K: 5 (keep only the best)
Rerank Threshold
Minimum relevance score required to include a document (0.01 - 1.0)
This setting only appears when “Enable Rerank” is turned on.
| Threshold | Strictness | Result |
|---|---|---|
| 0.01 - 0.1 | Lenient | Includes marginal matches |
| 0.15 - 0.3 | Moderate | Balanced filtering (recommended) |
| 0.4 - 0.6 | Strict | Only highly relevant documents |
| 0.7 - 1.0 | Very Strict | May exclude too many results |
Datasources Selection
List of datasource IDs that this agent can access
- PDF documents
- Web pages
- Text files
- Structured data
- API integrations
- ✅ Only enable relevant datasources to reduce noise
- ✅ Separate datasources by topic or domain
- ✅ Regularly update datasource content
- ⚠️ Too many datasources can slow retrieval
- ⚠️ Ensure datasource content is high quality
| Agent Type | Enabled Datasources |
|---|---|
| Customer Support | Product docs, FAQ, Return policies |
| Sales Agent | Product catalog, Pricing, Case studies |
| Technical Support | Technical docs, API reference, Troubleshooting guides |
| HR Assistant | Company policies, Benefits info, Onboarding materials |
Tools Configuration
The Tools tab manages your agent’s ability to execute actions and interact with external systems.Tool Max Steps
Maximum number of tool calls the agent can make per response (1 - 128)
This is the same setting as “Max Steps” in the Model tab, shown here for convenience when configuring tools.
Tools Selection
List of tool IDs that this agent can use
- Make API calls
- Execute code
- Query databases
- Search the web
- Interact with external systems
- Call other agents
- API Request: Make HTTP requests to external APIs
- Code Interpreter: Execute Python code for calculations and data processing
- Web Search (Perplexity AI): Search the internet for current information
- External Datasource: Query external data sources
- Agent Tool: Call another agent as a tool
- MCP Server: Connect to Model Context Protocol servers
- BigQuery: Query Google BigQuery databases
- ✅ Only enable tools the agent actually needs
- ✅ Test tool behavior thoroughly
- ✅ Monitor tool usage and errors
- ✅ Set appropriate max steps for your tools
- ⚠️ Too many tools can confuse the agent
- ⚠️ Some tools have rate limits or costs
- Customer Support
- Data Analyst
- Research Assistant
Enabled Tools:
- API Request (check order status)
- External Datasource (knowledge base)
- Web Search (product updates)
Saving Changes
After configuring your agent settings:- Review your changes in each tab
- Click “Update Agent” at the bottom of the settings panel
- Wait for confirmation that settings were saved
- Test your agent to ensure it behaves as expected
Best Practices Summary
Agent Identity & Behavior
Agent Identity & Behavior
- Use clear, descriptive names
- Write detailed prompts with specific guidelines
- Test initial messages for user engagement
- Update prompts iteratively based on performance
Model Selection
Model Selection
- Choose models based on your specific use case
- Use RouteLLM for cost optimization
- Enable streaming for better UX
- Only use structured output when necessary
- Monitor temperature settings and adjust for consistency
Datasources & Retrieval
Datasources & Retrieval
- Start with moderate Vector Top K (6-10)
- Enable reranking for accuracy-critical applications
- Only connect relevant datasources
- Maintain high-quality datasource content
- Monitor retrieval performance
Tools & Capabilities
Tools & Capabilities
- Only enable necessary tools
- Set appropriate max steps
- Test tool chains thoroughly
- Watch for circular references
- Monitor tool usage and costs
Troubleshooting
Agent not responding
Agent not responding
Possible Causes:
- No LLM model selected
- Model doesn’t support required features
- Max steps set too low for complex tasks
- Check that a model is selected in Model tab
- Verify model compatibility with your settings
- Increase max steps if using multiple tools
Irrelevant responses from datasources
Irrelevant responses from datasources
Possible Causes:
- Vector Top K too high
- Rerank threshold too low
- Poor quality datasource content
- Reduce Vector Top K to 5-10
- Enable reranking with threshold 0.2-0.3
- Review and improve datasource content quality
Tool errors
Tool errors
Possible Causes:
- Model doesn’t support tools
- Circular agent references
- Tool configuration issues
- Switch to tool-capable model (GPT-4, Claude, Gemini)
- Check for and remove circular references
- Verify tool configurations and permissions
Streaming not working
Streaming not working
Possible Causes:
- Model doesn’t support streaming
- Structured output is enabled
- Verify model supports streaming
- Disable structured output to use streaming