Brief IA

IBM and CUGA: Simplifying the Creation of Intelligent Agents

🔬 Research·Tom Levy·

IBM and CUGA: Simplifying the Creation of Intelligent Agents

IBM and CUGA: Simplifying the Creation of Intelligent Agents
Key Takeaways
1IBM introduces CUGA, a lightweight framework for creating agents, simplifying the management of tools and states.
2CUGA outperforms benchmarks like AppWorld due to its ability to maintain state and intelligently reschedule.
3The framework allows for configuring agents with adjustable reasoning modes, adapting to various execution environments.
💡Why it mattersCUGA provides businesses with a solution to develop robust agents without excessive complexity, thereby optimizing production processes.
Le brief IA que lisent les pros

Le brief IA que les pros lisent chaque soir

Les 7 actus IA du jour, décryptées en 5 min. Gratuit.

Inclus dès l'inscription : notre sélection des meilleurs guides & comparatifs IA.

Choisis ton rythme

Gratuit · Pas de spam · Désabonnement en 1 clic

📄
Full Analysis

IBM and the CUGA Framework: A Step Forward in Agent Creation

IBM has recently introduced CUGA, an innovative framework designed to simplify the creation of agent-based applications. The name CUGA, which stands for Configurable Generalist Agent, highlights its primary goal: to provide businesses with an efficient means of managing the complex technical aspects related to agent development. By using CUGA, developers can focus on the essentials, namely the list of tools and the prompt, without getting lost in technical details. To demonstrate the power of this framework, IBM has developed two dozen applications in a single file, showcasing its ability to operate autonomously and reliably in production. CUGA is easily accessible via a simple command: pip install cuga.

The Importance of a Framework Rather Than a Framework

In the field of agent creation, the crucial question is what a framework like CUGA can prevent developers from having to write. The answer lies in its ability to orchestrate a complex model without requiring repeated reconstructions. CUGA stands out for its capacity to plan before acting, combining tool calls and generated code, known as CodeAct. When a task spans multiple steps, most agents fail due to losing track of intermediate results. CUGA, on the other hand, maintains this state and incorporates a reflection step that allows for the detection and correction of errors before they disrupt the process.

This approach has enabled CUGA to surpass benchmarks such as AppWorld and WebArena. Unlike other frameworks that rely on a boundary model to recover errors, CUGA takes on this function, ensuring smooth and reliable execution. Furthermore, CUGA allows for the definition of the cost/latency trade-off from the configuration with reasoning modes of Fast, Balanced, and Precise, and the execution of code in the sandbox of your choice, whether local, Docker/Podman, or cloud E2B.

A Concrete Example of Application with CUGA

Let’s take the example of the IBM Cloud advisor, an agent designed to recommend IBM Cloud services suited to a given architecture. This agent is entirely contained in a single file, main.py, which includes the agent factory, the necessary tools, and the prompt. The agent's code is succinct yet powerful:

def make_agent():
    from cuga import CugaAgent
    from _llm import create_llm
    return CugaAgent(
        model=create_llm(
            provider=os.getenv("LLM_PROVIDER"),
            model=os.getenv("LLM_MODEL"),
            tools=_make_tools(),
            special_instructions=_SYSTEM,
            cuga_folder=str(_DIR / ".cuga"),
        )
    )

This code uses four key arguments. The model is generated by a small factory (create_llm) that can connect to various providers like OpenAI, Anthropic, watsonx, LiteLLM, or Ollama, depending on the environment variables. The cuga_folder directory is used to store the application's state and policies. The tools and special instructions are the elements that support the application. Additionally, the agent includes a small user interface, making its use even more intuitive.

The Convention That Simplifies Development

One often overlooked but crucial aspect of CUGA is its tool return convention. Each online tool follows a standardized format to signal success or failure. A success is indicated by {"ok": true, "data": {...}}, while a failure is reported by {"ok": false, "code": "...", "error": "..."}.

This convention allows CUGA to handle failures elegantly, bypassing problematic sections without interrupting overall execution. The CUGA scheduler manages a declared failure gracefully and blocks on an undeclared failure, where a raw stack trace surfaces in full view and execution derails. Applications that adhere to this convention operate more reliably, as they avoid raw exceptions that could derail the agent.

CUGA: A Comprehensive Library

The richness of CUGA lies not only in its two dozen applications but in the common structure they share. Once you understand how the cloud advisor works, you can apply that understanding to other applications. For example, a movie recommender can simply swap the IBM catalog tool for an MCP knowledge server. Thus, cuga-apps serves as a catalog of starting points, allowing developers to clone the repository, identify the application closest to their idea, and modify the list of tools and the prompt accordingly.

Conclusion

CUGA represents a significant advancement in simplifying the creation of agent-based applications. By reducing technical complexity to a simple configuration of tools and prompts, this framework offers remarkable flexibility and execution power. Applications developed with CUGA demonstrate the ability to create functional and efficient agents without requiring complex rewrites for production.

Brief IA — L'actualité IA en français

L'essentiel de l'actualité de l'intelligence artificielle, décrypté et expliqué chaque jour.