A conversational LangChain agent powered by GPT-4o with Scalekit integration that demonstrates tool calling capabilities. This project serves as a foundation for building LangChain agents with real API integrations.
- 🤖 GPT-4o Agent: Uses OpenAI's GPT-4o for intelligent conversations and tool selection
- � Scalekit Tools: Integrated tools for various services (Gmail, etc.)
- �💬 Interactive Chat: Command-line interface for natural conversations
- 🔗 OAuth Authorization: Secure authorization flow for connected services
- OpenAI API Key: Get from OpenAI Platform
- Scalekit Credentials: Get from your Scalekit dashboard
- Ensure you have sufficient credits in your OpenAI account
- Clone or download this project
- Install dependencies:
pip install -r requirements.txt
- Set up your environment variables:
cp .env.example .env # Edit .env and add your credentials
Create a .env
file with the following variables:
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key_here
# Scalekit Configuration From dashboard
SCALEKIT_CLIENT_ID=your_scalekit_client_id
SCALEKIT_CLIENT_SECRET=your_scalekit_client_secret
SCALEKIT_ENV_URL=your_scalekit_environment_url
get these from your Scalekit dashboard at app.scalekit.com Developers-> Settings -> API Credentials
-
Run the agent:
python main.py
-
Follow the authorization prompts for each service (e.g., Gmail)
-
Start chatting with the agent
You: Hello!
Agent: Hi! I can help you with various tasks using connected services.
You: fetch my first unread email
In main.py
, you can customize:
user_name = "user-1234" # Change to your desired identifier
connection_names = ["gmail"] # Add more connection names as needed
To add more services:
- Add your connection name to
connection_names
array - Ensure the connection is configured in your Scalekit dashboard app.scalekit.com Agent Actions -> Connections -> Create Connection
- The agent will automatically include tools for the new service