GuideIntegrations

Yutori

Use Yutori's n1 model with Cua cloud sandboxes

Cua supports Yutori's n1 model as a computer-use agent. This guide shows how to connect Yutori n1 to a Cua cloud sandbox for an interactive agent loop.

Setup

Install the Cua SDK and python-dotenv:

pip install cua-computer cua-agent python-dotenv

Set the following environment variables (or add them to a .env file):

export CUA_API_KEY=your-cua-api-key
export YUTORI_API_KEY=your-yutori-api-key
  • CUA_API_KEY — your Cua cloud API key. Get one from the Cua dashboard.
  • YUTORI_API_KEY — your Yutori API key. Get one from Yutori.

Usage

Create a file called yutori_cua_script.py with the following contents:

import asyncio
import os

import dotenv

dotenv.load_dotenv()

from cua import ComputerAgent, Computer

CUA_API_KEY = os.environ["CUA_API_KEY"]
YUTORI_API_KEY = os.environ["YUTORI_API_KEY"]


async def main():
    async with Computer(
        os_type="linux",
        provider_type="cloudv2",
        name="my-sandbox",
        api_key=CUA_API_KEY,
    ) as computer:
        agent = ComputerAgent(
            model="yutori/n1",
            tools=[computer],
            api_key=YUTORI_API_KEY,
        )

        history = []
        while True:
            user_input = input("> ")
            history.append({"role": "user", "content": user_input})

            async for result in agent.run(history, stream=False):
                history += result["output"]


asyncio.run(main())

Running the script

python yutori_cua_script.py

Once running, you'll see a > prompt. Type a natural-language instruction and the Yutori n1 agent will execute it inside the Cua cloud sandbox. For example:

> Open Firefox and search for "Cua computer use agent"

The agent maintains conversation history, so you can issue follow-up instructions that build on previous actions.

Was this page helpful?


On this page