Autonomous AI agents with tools, file search, and code execution
LibreChat’s Agents feature provides powerful autonomous AI assistants that can use tools, search files, execute code, and chain operations to accomplish complex tasks.
Agents can write and execute Python code to analyze data, perform calculations, and generate visualizations:
# Agent can analyze data from uploaded filesimport pandas as pdimport matplotlib.pyplot as pltdf = pd.read_csv('sales_data.csv')print(df.describe())plt.plot(df['month'], df['revenue'])plt.savefig('revenue_trend.png')
SSRF Protection: If not configured, SSRF targets (localhost, private IPs) are blocked. To allow internal targets, explicitly add them to allowedDomains.
Provide detailed instructions to guide agent behavior:
instructions: | You are a senior software engineer specializing in Python and data analysis. When analyzing code: - Always check for edge cases - Provide detailed explanations - Suggest optimizations When working with data: - Validate data quality first - Use appropriate visualizations - Document your assumptions
name: Data Analystprovider: openAImodel: gpt-4oinstructions: | You are an expert data analyst. Analyze uploaded datasets, create visualizations, and provide insights.tools: - execute_code - file_searchtool_resources: execute_code: file_ids: []
Research Assistant Agent
name: Research Assistantprovider: anthropicmodel: claude-4.5-sonnetinstructions: | You are a research assistant. Search documents and the web to find accurate, well-cited information.tools: - file_search - web_searchtool_resources: file_search: vector_stores: - name: Research Papers
Code Review Agent
name: Code Reviewerprovider: openAImodel: gpt-4oinstructions: | You are a senior code reviewer. Analyze code for bugs, security issues, and style improvements.tools: - execute_code - file_searchmodel_parameters: temperature: 0.3