Quick Start
- Code
- No Code
1
Install Package
First, install the required packages:
2
Set API Key
Set your OpenAI API key as an environment variable in your terminal:
3
Create a file
Create a new file
app.py with the basic setup:4
Start Agents
Type this in your terminal to run your agents:
Requirements
- Python 3.10 or higher
- OpenAI API key. Generate OpenAI API key here
- LangChain compatible tools and utilities
Understanding LangChain Integration
What is LangChain Integration?
LangChain integration enables agents to:
- Use LangChain’s extensive tool ecosystem
- Access various data sources and APIs
- Leverage pre-built utilities and wrappers
- Combine multiple tools in a single agent
- Extend agent capabilities with community tools
Features
Tool Integration
Seamlessly use LangChain tools with PraisonAI agents.
Multiple Sources
Access various data sources through LangChain utilities.
Community Tools
Leverage the extensive LangChain community ecosystem.
Custom Tools
Create and integrate custom LangChain tools.
LangChain Tools with Wrappers
- LangChain tools with wrappers can be directly used as Tools without modification.
- PraisonAI will automatically detect the tool and use it.
- Some exceptions apply where it doesn’t work.
Example Wrapper Usage
Example without Wrapper Usage
Next Steps
Memory Integration
Learn how to combine LangChain tools with agent memory
Custom Tools
Create your own custom tools for agents
For optimal results, ensure all required dependencies are installed and API keys are properly configured for each tool.
With More Detailed Instructions
- Code
- No Code
1
Install Package
First, install the required packages:
2
Set API Key
Set your OpenAI API key as an environment variable in your terminal:
3
Create a file
Create a new file
app.py with the basic setup:4
Start Agents
Type this in your terminal to run your agents:
Best Practices
Prefer wrapper utilities over raw tools
Prefer wrapper utilities over raw tools
Pass LangChain
*Wrapper utilities (e.g. WikipediaAPIWrapper, SerpAPIWrapper) directly in the tools=[...] list. PraisonAI auto-detects callable tools and generates a schema from the signature, so wrappers work without extra glue code. Reach for a plain Python function only when a tool needs API-key setup that a wrapper does not expose.Wrap non-standard tools in a function
Wrap non-standard tools in a function
Some LangChain tools require constructor arguments (like an API key) before they can run. Wrap those in a small typed function so the agent gets a clean schema:
Write clear docstrings and type hints
Write clear docstrings and type hints
PraisonAI builds the tool schema from each function’s signature and docstring. Add a one-line docstring and annotate every parameter (
query: str) so the agent knows when and how to call the tool.Install only the tools you need
Install only the tools you need
LangChain community tools pull in their own dependencies (
wikipedia, youtube-search, google-search-results). Install just the extras a page uses and set the matching API keys before running, so agents fail fast on config rather than mid-run.Related
Custom Tools
Build your own agent tools
Tools Overview
Browse PraisonAI tool documentation

