OctoTools: Stanford’s open-source framework optimizes LLM reasoning through modular tool orchestration

Join our daily and weekly newsletters for the latest updates and exclusive content on industry-leading AI coverage. Learn More


OctoTools, a new open-source agentic platform released by scientists at Stanford University, can turbocharge large language models (LLMs) for reasoning tasks by breaking down tasks into subunits and enhancing the models with tools. While tool use has already become an important application of LLMs, OctoTools makes these capabilities much more accessible by removing technical barriers and allowing to developers and enterprises to extend a platform with their own tools and workflows.

Experiments show that OctoTools outperforms classic prompting methods and other LLM application frameworks, making it a promising tool for real-world uses of AI models.

LLMs often struggle with reasoning tasks that involve multiple steps, logical decomposition or specialized domain knowledge. One solution is to outsource specific steps of the solution to external tools such as calculators, code interpreters, search engines or image processing tools. In this scenario, the model focuses on higher-level planning while the actual calculation and reasoning are done through the tools.

However, tool use has its own challenges. For example, classic LLMs often require substantial training or few-shot learning with curated data to adapt to new tools, and once augmented, they will be limited to specific domains and tool types. 

Tool selection also remains a pain point. LLMs can become good at using one or a few tools, but when a task requires using multiple tools, they can get confused and perform badly.

OctoTools
OctoTools framework (source: GitHub)

OctoTools addresses these pain points through a training-free agentic framework that can orchestrate multiple tools without the need to fine-tune or adjust the models. OctoTools uses a modular approach to tackle planning and reasoning tasks and can use any general-purpose LLM as its backbone.

Among the key components of OctoTools are “tool cards,” which act as wrappers to the tools the system can use, such as Python code interpreters and web-search APIs. Tool cards include metadata such as input-output formats, limitations and best practices for each tool. Developers can add their own tool cards to the framework to suit their applications.

When a new prompt is fed into OctoTools, a “planner” module uses the backbone LLM to generate a high-level plan that summarizes the objective, analyzes the required skills, identifies relevant tools and includes additional considerations for the task. The planner determines a set of sub-goals that the system needs to achieve to accomplish the task and describes them in a text-based action plan.

For each step in the plan, an “action predictor” module refines the sub-goal to specify the tool required to achieve it and make sure it is executable and verifiable.

Once the plan is ready to be executed, a “command generator” maps the text-based plan to Python code that invokes the specified tools for each sub-goal, then passes the command to the “command executor,” which runs the command in a Python environment. The results of each step are validated by a “context verifier” module and the final result is consolidated by a “solution summarizer.”

OctoTools
Example of OctoTools components (source: GitHub)

“By separating strategic planning from command generation, OctoTools reduces errors and increases transparency, making the system more reliable and easier to maintain,” the researchers write.

OctoTools also uses an optimization algorithm to select the best subset of tools for each task. This helps avoid overwhelming the model with irrelevant tools. 

Agentic frameworks

There are several frameworks for creating LLM applications and agentic systems, including Microsoft AutoGen, LangChain and OpenAI API “function calling.” OctoTools outperforms these platforms on tasks that require reasoning and tool use, according to its developers.

OctoTools vs other agentic frameworks (source: GitHub)

The researchers tested all frameworks on several benchmarks for visual, mathematical and scientific reasoning, as well as medical knowledge and agentic tasks. OctoTools achieved an average accuracy gain of 10.6% over AutoGen, 7.5% over GPT-Functions, and 7.3% over LangChain when using the same tools. According to the researchers, the reason for OctoTools’ better performance is its superior tool usage distribution and the proper decomposition of the query into sub-goals.

OctoTools offers enterprises a practical solution for using LLMs for complex tasks. Its extendable tool integration will help overcome existing barriers to creating advanced AI reasoning applications. The researchers have released the code for OctoTools on GitHub.

Share the Post:

Related Posts

Tether Finalizes Buying 70% of Adecoagro Stake, Securing Tokenization Ambition

Tether, the issuer behind the nearly $150 billion USDT stablecoin, has finalized the purchase of a 70% stake in the Latin American agricultural firm Adecoagro (AGRO), which has a market cap of nearly a billion dollars.
Tether initially invested $100 million in Adecoagro in September 2024 for a 9.8% stake, then offered to increase it to 51% in February, and finally raised it to control 70% in March.

STORY CONTINUES BELOW
Don’t miss another story.Subscribe to the Crypto Daybook Americas Newsletter today. See all newsletters

Sign me up

By signing up, you will receive emails about CoinDesk products and you agree to our terms of use and privacy policy.

Read more: Tether’s $100M Investment in LatAm Agriculture Firm May Be a Tokenization Play
This majority stake gives Tether control over one of the region’s most prominent food and bioenergy producers. Adecoagro owns sugar mills, rice farms, dairy operations, and renewable energy assets across Brazil, Argentina, and Uruguay.
Tether said it aims to help scale Adecoagro’s output while aligning the company with its mission of fostering “economic freedom” through decentralized finance and investment in underserved markets.

The move might be part of Tether’s ambition to tokenize real-world assets, as it launched its asset tokenization service Hadron last year. The platform was designed to simplify the process of converting a wide range of real-world assets, including bonds, commodities, stocks, other stablecoins, and loyalty points into digital tokens on blockchain rails.
Read more: Tether Unveils New Platform to Simplify Asset Tokenization for Businesses, Nation-States
“By aligning with in Adecoagro’s proven expertise in agriculture and renewable energy, we are taking another concrete step toward bridging traditional industries with the future of decentralized finance and economic empowerment,” said Paolo Ardoino, CEO of Tether.
Following the deal, Adecoagro’s board was also reshuffled. Five members stepped down and were replaced by executives tied to Tether and its strategic goals. Juan Sartori, a Uruguayan businessman with political and agricultural interests, took over as chairman.
In the past year, Tether has launched ventures in bitcoin mining, AI, and encrypted communications. AGRO’s shares were up 2.6% on Wednesday.
Read more: Tether’s $100M Investment in LatAm Agriculture Firm May Be a Tokenization Play
Disclaimer: Parts of this article were generated with the assistance from AI tools and reviewed by our editorial team to ensure accuracy and adherence to our standards. For more information, see CoinDesk’s full AI Policy.

Read More

Alberta Leader Smith Lashes Out at Liberals, Wants New Deal

Alberta Premier Danielle Smith challenged Mark Carney to strike a better deal for her oil-rich province, saying she would not allow the “status quo” to prevail in its relationship with the federal government.

While congratulating the Liberal prime minister on his election victory, Smith said a large number of Albertans are deeply frustrated that a government that “overtly attacked” her province’s economy has been returned to power. 

“I invite the prime minister to immediately commence working with our government to reset the relationship between Ottawa and Alberta with meaningful action rather than hollow rhetoric,” she said in a statement.

“Albertans are proud Canadians that want this nation to be strong, prosperous and united, but we will no longer tolerate having our industries threatened and our resources landlocked by Ottawa.”

Alberta has been in conflict with Canada’s Liberal government since Carney’s predecessor, Justin Trudeau, was elected in 2015 and began rolling out environmental policies, including an emissions cap, new pipeline regulations and a ban on tankers off the northern British Columbia coast. Smith says those measures encroach on the province’s jurisdiction and hamper oil and gas development. 

The growing hostility has prompted some Albertans to call for greater autonomy from the federal government, and even fueled a small but simmering secession movement. 

The Alberta government will hold a caucus meeting on Friday to discuss the province’s future within a united Canada, Smith said. 

‘Pivotal Moment’

Carney said in his victory speech early Tuesday that he intends to govern for all Canadians. He has pledged to turn the country into a “superpower” in both clean and conventional energy, and said it needs to produce more oil while reducing the associated emissions.

“My optimistic view is a Carney win is status quo for a sector that’s dealt with significant challenges over the past 10 years,” Eric Nuttall, senior portfolio manager at Ninepoint Partners in Toronto, said on BNN Bloomberg Television. 

He said Carney’s apparent reluctance to repeal the environmental assessment law known as Bill C-69 means “no oil pipelines.” 

“So for our Canadian energy sector, at least in the oil sector, they’ll be required to remain as disciplined in returning that free cash flow back to shareholders in the form of share buybacks because there will be nothing left to do with it.”

Lisa Baiton, chief executive officer of the Canadian Association of Petroleum Producers, said she was encouraged by the tone set by the two leading parties throughout the election campaign on the importance of oil and gas to the country’s economy.

“Canada stands at a pivotal moment in its history — caught in a trade war with our closest trading partner and facing direct challenges to our sovereignty from the president of the United States,” she said in a statement. 

“Developing our world-class oil and natural gas resources to their full potential by growing our exports to international markets will strengthen our energy security and economic sovereignty.”

Read More