OctoTools: An agentic framework with extensible tools for complex reasoning
OctoTools: An agentic framework with extensible tools for complex reasoning
Stay tuned, we're working on the following:
TBD: We're excited to collaborate with the community to expand OctoTools to more tools, domains, and beyond! Join our Slack or reach out to Pan Lu to get started!
Here is a detailed explanation and tutorial on octotools here.
Excited to have a tutorial video for OctoTools covered by Discover AI at YouTube!
We introduce OctoTools, a training-free, user-friendly, and easily extensible open-source agentic framework designed to tackle complex reasoning across diverse domains. OctoTools introduces standardized tool cards to encapsulate tool functionality, a planner for both high-level and low-level planning, and an executor to carry out tool usage.
Tool cards define tool-usage metadata and encapsulate heterogeneous tools, enabling training-free integration of new tools without additional training or framework refinement. (2) The planner governs both high-level and low-level planning to address the global objective and refine actions step by step. (3) The executor instantiates tool calls by generating executable commands and save structured results in the context. The final answer is summarized from the full trajectory in the context. Furthermore, the task-specific toolset optimization algorithm learns a beneficial subset of tools for downstream tasks.
We validate OctoTools' generality across 16 diverse tasks (including MathVista, MMLU-Pro, MedQA, and GAIA-Text), achieving substantial average accuracy gains of 9.3% over GPT-4o. Furthermore, OctoTools also outperforms AutoGen, GPT-Functions and LangChain by up to 10.6% when given the same set of tools.
We support a broad range of LLM engines, including GPT-4o, Claude 3.5 Sonnet, Gemini 1.5 Pro, and more.
| Model Family | Engines (Multi-modal) | Engines (Text-Only) | Official Model List |
|---|---|---|---|
| OpenAI | gpt-4-turbo, gpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, o1, o3, o1-pro, o4-mini |
gpt-3.5-turbo, gpt-4, o1-mini, o3-mini |
OpenAI Models |
| Azure OpenAI | gpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, o1, o3, o1-pro, o4-mini |
gpt-3.5-turbo, gpt-4, o1-mini, o3-mini |
Azure OpenAI Models |
| Anthropic | claude-3-haiku-20240307, claude-3-sonnet-20240229, claude-3-opus-20240229, claude-3-5-sonnet-20240620, claude-3-5-sonnet-20241022, claude-3-5-haiku-20241022, claude-3-7-sonnet-20250219 |
Anthropic Models | |
| TogetherAI | Most multi-modal models, including meta-llama/Llama-4-Scout-17B-16E-Instruct, Qwen/QwQ-32B, Qwen/Qwen2-VL-72B-Instruct |
Most text-only models, including meta-llama/Llama-3-70b-chat-hf, Qwen/Qwen2-72B-Instruct |
TogetherAI Models |
| DeepSeek | deepseek-chat, deepseek-reasoner |
DeepSeek Models | |
| Gemini | gemini-1.5-pro, gemini-1.5-flash-8b, gemini-1.5-flash, gemini-2.0-flash-lite, gemini-2.0-flash, gemini-2.5-pro-preview-03-25 |
Gemini Models | |
| Grok | grok-2-vision-1212, grok-2-vision, grok-2-vision-latest |
grok-3-mini-fast-beta, grok-3-mini-fast, grok-3-mini-fast-latest, grok-3-mini-beta, grok-3-mini, grok-3-mini-latest, grok-3-fast-beta, grok-3-fast, grok-3-fast-latest, grok-3-beta, grok-3, grok-3-latest |
Grok Models |
| vLLM | Various vLLM-supported models, for example, Qwen2.5-VL-3B-Instruct and Qwen2.5-VL-72B-Instruct. You can also use local checkpoint models for customization and local inference. (Example-1, Example-2) |
Various vLLM-supported models, for example, Qwen2.5-1.5B-Instruct. You can also use local checkpoint models for customization and local inference. |
vLLM Models |
| LiteLLM | Any model supported by LiteLLM, including models from OpenAI, Anthropic, Google, Mistral, Cohere, and more. | Any model supported by LiteLLM, including models from OpenAI, Anthropic, Gemini, Mistral, Cohere, and more. | LiteLLM Models |
| Forge | Any Forge-supported models via forge/Provider/model-name (e.g., forge/OpenAI/gpt-4o-mini). |
Same as multi-modal column. | Forge Models |
| Ollama | Any model supported by Ollama, such as DeepSeek-R1, Qwen 3, Llama 3.3, Gemma 3, and other models. |
Any model supported by Ollama, such as Qwen 2.5‑VL. |
Ollama Models |
Note: If you are using TogetherAI models, please ensure have the prefix 'together-' in the model string, for example,
together-meta-llama/Llama-4-Scout-17B-16E-Instruct. For VLLM models, use the prefix 'vllm-', for example,vllm-meta-llama/Llama-4-Scout-17B-16E-Instruct. For LiteLLM, use the prefix 'litellm-', for example,litellm-gpt-4oorlitellm-claude-3-sonnet-20240229. For Ollama, use the prefix 'ollama-', for example,ollama-qwen3:latest. For Forge, use the prefix 'forge/', for example,forge/OpenAI/gpt-4o-mini, and setFORGE_API_KEY(optionalFORGE_API_BASE). For other custom engines, you can edit the factory.py file and add its interface file to add support for your engine. Your pull request will be warmly welcomed!
Currently, there are two ways to install OctoTools. For most use cases, standard installation would suffice. However, to replicate the benchmarks mentioned in the original paper and to make your own edits to the code, you would need to several bash scripts from Github. An editable installation is recommended.
Create a conda environment and install the dependencies:
conda create -n octotools python=3.10
conda activate octotools
# Alternatively, you can use: `source activate octotools` if the above command does not work
pip install octotoolkitMake .env file, and set OPENAI_API_KEY, GOOGLE_API_KEY, GOOGLE_CX, etc. For example:
…Obtain a Google API Key and Google CX according to the Google Custom Search API documentation and Programmable Search Engine Page. More details are available in the Google Search Tool documentation.
Start with a fresh new environment:
conda create -n octotools python=3.10
conda activate octotoolsClone the github repo:
git clone https://github.com/octotools/octotools.gitIn the root directory (the directory that contains pyproject.toml), run the following command:
pip install -e .(Optional) Install parallel for running benchmark experiments in parallel:
sudo apt-get update
sudo apt-get install parallelIn a brand new folder, paste the following code to set the API keys:
# Remember to put your API keys in .env
import dotenv
dotenv.load_dotenv()
# Or, you can set the API keys directly
import os
os.environ["OPENAI_API_KEY"] = "your_api_key"Then, paste the following code to test the default solver:
# Import the solver
from octotools.solver import construct_solver
# Set the LLM engine name
llm_engine_name = "gpt-4o"
# Construct the solver
solver = construct_solver(llm_engine_name=llm_engine_name)
# Solve the user query
output = solver.solve("What is the capital of France?")
print(output["direct_output"])
# Similarly, you could pass in a photo
output = solver.solve("What is the name of this item in French?", image_path="<PATH_TO_IMG>")
print(output["direct_output"])You should be able to see
No open issues yet, or sync has not completed.