Skip to main content
Set your API key in your code:
Or use a .env file:
Then load it with:
Yes—you can use third-party models for simple, non–mission-critical tasks (usually one or two tools per agent). See Third-Party Models for more information. Keep in mind that many third-party models currently struggle with function calling.
To persist conversations between application restarts, implement callbacks that save and load the full message history from a local file. For example, define your callback functions:
This setup preserves your conversation context between runs.
To support multiple users/chats, you need to load and save thread IDs in your database accordingly. Each chat/user should have unique thread IDs. Ensure to check out our Deployment to Production guide for more information.
There are two ways to transfer data between tools and agents:
  1. Use agency context inside your tools. Read more: Agency Context
  2. Create a tool (or modify an existing one) that uploads files to storage and outputs the file ID. This file ID can then be used by other tools or agents.
When file types like .json, .docx, or .pptx are uploaded, CodeInterpreter is auto-added to process them. To change the agent’s behavior, update its instructions or create a custom file-handling tool.
Embed your agency within a FastAPI endpoint:
Build a dedicated API backend (FastAPI is recommended) that manages authentication and persists thread state using callbacks. For more details, refer to our Deployment to Production guide.

Getting Support

Community Support

Join our Discord community for quick help and discussions.

Professional Services

Get professional help with our Agents-as-a-Service subscription.