Quickstart
Build your first AI agent with Chainless in under 2 minutes.
Build Your First Chainless Agent
Let’s create a simple AI agent using Chainless that can utilize tools and collaborate with other agents to complete a task.
Make sure you have chainless
installed. If not, follow the installation guide first.
Set Your OpenAI API Key
Chainless supports various LLM providers. In this example, we’ll use OpenAI’s GPT-4 model by setting the required environment variable:
Define a Tool Function
Tools are callable functions that your agents can use. Let’s define a simple search tool:
Create Your Agent
Agents are the core of Chainless. They use tools and respond to tasks. Here’s a simple agent setup:
Run the Agent Manually
You can invoke the agent directly by calling start()
:
Orchestrate with TaskFlow
For more complex, multi-step tasks, use TaskFlow
: