Skip to content

Setting up CUA to run locally - #4

Merged
inaas7 merged 3 commits into
mainfrom
cua
Sep 14, 2025
Merged

inaas7 merged 3 commits into
mainfrom
cua

Conversation

@laygofiona

@laygofiona laygofiona commented Sep 14, 2025 •

Copy link
Copy Markdown
Owner
  • Changed computer configuration from Cloud to Docker
  • Updated requirements.txt to fix "Computer" module not found error when running Cua.py
  • Added steps in prompt to determine music instrument and select the right music instrument in bandlab

Summary by CodeRabbit

  • New Features
    • Default instrument changed from Piano to Guitar.
    • Enhanced task flow with clearer steps for instrument selection, searching by name, resetting playhead, and playback.
    • Updated prompts for file import with explicit fields (File to Import, File Name Only, Instrument).
    • Messaging updated to reflect container-based workflow.
  • Documentation
    • Refined public-facing instructions with improved formatting and guidance.
  • Chores
    • Added pinned dependencies to ensure a reproducible Python runtime environment.

@coderabbitai

coderabbitai Bot commented Sep 14, 2025 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

Migrates the agent from a cloud “Computer” to a Docker-based “Container” in cua.py, updates the public function default instrument to "guitar", revises task/prompt steps for container workflow, and adds a pinned requirements.txt specifying the Python environment.

Changes

Cohort / File(s) Summary
Runtime migration: cloud → docker
cua.py
Switches provider_type from "cloud" to "docker"; sets image "trycua/cua-ubuntu:latest"; renames context/resource from Computer to Container; updates usages (run, interface.write_bytes, tools binding); updates instance name to "bandlabs-container".
Public API default change
cua.py
Changes computer_use_agent signature default: instrument from "piano" to "guitar".
Prompt/task updates
cua.py
Adjusts task prompt text for container workflow; adds steps for instrument selection and playback; expands file import prompt with explicit fields.
Dependency pinning
requirements.txt
Introduces pinned versions for a broad set of packages (web, ML/AI, data, HTTP, telemetry, utilities) to define a reproducible environment; no code logic changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Agent
  participant Container as Docker Container
  participant App as Web App (BandLab)
  Note over Agent,Container: Provider switched: cloud "Computer" → docker "Container"
  User->>Agent: Call computer_use_agent(midi_file, instrument="guitar")
  Agent->>Container: start(image="trycua/cua-ubuntu:latest", name="bandlabs-container")
  Agent->>Container: write_bytes(midi_file)
  Agent->>Container: run(task prompts & steps)
  Container->>App: Open app, set instrument, import file, position playhead, play
  App-->>Container: UI responses/status
  Container-->>Agent: Execution result
  Agent-->>User: Return outcome/logs
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Feature/vapi #1 — Similar migration in cua.py (cloud→docker), renaming Computer→Container, and prompt/default instrument adjustments.

Poem

I tuned my strings from cloud to sea,
A docker drum now beats for me.
With pinned-byte seeds and careful art,
I hop through prompts to do my part.
Guitar in paw, I press “Run” true—
Container hums, the MIDI grew. 🐇🎸

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cua

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ccbf03c and 9a19d7b.

📒 Files selected for processing (2)
  • cua.py (4 hunks)
  • requirements.txt (1 hunks)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@inaas7
inaas7 merged commit fec6346 into main Sep 14, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants