Skip to content

Conversation

@dprevoznik
Copy link
Contributor

@dprevoznik dprevoznik commented Dec 17, 2025

Summary

  • Add new OpenAGI Computer Use Python template powered by OpenAGI's Lux models (lux-actor-1 and lux-thinker-1), featuring two agent types: AsyncDefaultAgent for high-level immediate execution and TaskerAgent for structured workflows with predefined steps

    Note: Required mocking pyautogui and mouseinfo modules to prevent X11 connection attempts at import time—the OAGI SDK imports these internally, but they're unused in Kernel's deployed environment.

  • Standardize computer use template naming convention across all providers (e.g., cuaopenai-computer-use, computer-useanthropic-computer-use, gemini-cuagemini-computer-use)

  • Unify template descriptions and action names for consistency (e.g., cu-taskcua-task)

Note: If preferred, I can split this PR into two separate PRs—one for the naming convention changes and one for the OpenAGI template addition. Let me know!

Test plan

  • Verify kernel create shows the new OpenAGI template in Python language options
  • Test creating a new project with the OpenAGI template: kernel create --template openagi-computer-use --language python
  • Confirm renamed templates still work correctly (anthropic-computer-use, openai-computer-use, gemini-computer-use)
    • Anthropic
    • OpenAI
    • Gemini -> Seems to fail due to using stagehand v3 library version now when it's built for stagehand v2. I believe this is unrelated to the changes in this repo though as the deployment builds and the invocation starts as expected before failing. Planning to fix in another PR if that works.
  • Deploy and invoke the OpenAGI template with both agent types:
    kernel invoke python-openagi-cua openagi-default-task -p '{"instruction": "Navigate to https://agiopen.org"}'
    kernel invoke python-openagi-cua openagi-tasker-task -p '{"task": "...", "todos": [...]}'

Note

Adds a new Python OpenAGI computer-use template and renames/standardizes Anthropic/OpenAI/Gemini computer-use templates (incl. actions, app names, and commands) across code, docs, and tests.

  • Templates:
    • New: python/openagi-computer-use (AsyncDefaultAgent, TaskerAgent, replay recording; requires OAGI_API_KEY).
    • Standardization/Renames:
      • computer-useanthropic-computer-use (TS/Python).
      • cuaopenai-computer-use (TS/Python).
      • gemini-cuagemini-computer-use (TS only).
    • Unified action name cu-taskcua-task; app/package names updated (e.g., ts-cuts-anthropic-cua, python-cuapython-openai-cua).
  • CLI/Code:
    • Update template constants/map, display ordering (prioritize Anthropic/OpenAI/Gemini), and per-template deploy/invoke commands.
    • Adjust file copy tests to new template keys; fix tests for Gemini availability on Python.
  • Docs:
    • README and QA guide: refreshed template matrix, create/deploy/invoke commands, env vars; added optional automated runtime testing; checklist updated to 13 apps including OpenAGI.
  • Template Sources:
    • TS/Python template files updated to new app IDs and action names; Gemini/OpenAI/Anthropic READMEs retitled.

Written by Cursor Bugbot for commit febd317. This will update automatically on new commits. Configure here.

Add a new Python template for OpenAGI's Lux computer-use models.
Supports AsyncDefaultAgent and TaskerAgent from the OAGI SDK.

KERNEL-685
Add env variable file for people who may choose not to use the CLI after initial installation
Change the tasker agent sample payload to be something that's less ambiguous.
After various rounds of testing and noticing that there was a display error showing up during deployment, due to dependencies of the OAGI library, I ended up having to add this logic to mock some of the required configuration for those dependencies.
Allows users to choose whether they want to record replays for each invocation. This way someone doesn't need to redeploy to enable replays.
Add Replays info to Readme + go template logged example for this app after template creation.
Update the naming convention across the various computer-use templates in Kernel Create (Python + TypeScript) to be consistent. This impacts both the template names and the default kernel app name for the created template.
Standard the computer use template descriptions
…oagi-cua-python-template-to-kernel-cli

# Conflicts:
#	pkg/create/templates.go
#	pkg/templates/python/anthropic-computer-use/.env.example
#	pkg/templates/python/anthropic-computer-use/main.py
#	pkg/templates/python/openai-computer-use/.env.example
#	pkg/templates/python/openai-computer-use/uv.lock
#	pkg/templates/typescript/anthropic-computer-use/.env.example
#	pkg/templates/typescript/gemini-computer-use/.env.example
#	pkg/templates/typescript/gemini-computer-use/pnpm-lock.yaml
#	pkg/templates/typescript/openai-computer-use/pnpm-lock.yaml
Co-authored-by: danny <danny@onkernel.com>
@cursor
Copy link

cursor bot commented Dec 17, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

…-cli' of https://github.com/onkernel/cli into danny/kernel-685-add-oagi-cua-python-template-to-kernel-cli
> Add new oagi sample app
> Update the paths
> Update the deployed app names referenced
> Add a step 7 that will automatically try to invoke the deployed apps to automate testing for changes introduced.
@dprevoznik dprevoznik requested a review from rgarcia December 18, 2025 15:21
@dprevoznik
Copy link
Contributor Author

@rgarcia updated qa.md with the changes you requested. Automated testing surfaced some issues that will require updates to templates outside the scope of this PR (Gemini / Anthropic / OpenAI — we expected the OpenAI failure since computer-use-preview is unavailable), so I’ll follow up on those separately.

In case you missed it, I’d also appreciate a review of the workaround I implemented for OAGI deployments here:
https://github.com/onkernel/cli/pull/55/changes#diff-fb4e050f5b88dfc12e918a9d486a9039f3c5af2e383b036b2287f28931011dfcR6-R16

I think it’s solid, but wanted to get your take.

EntryPoint: "main.py",
NeedsEnvFile: true,
InvokeCommand: `kernel invoke python-cua cua-task --payload '{"task": "Go to https://news.ycombinator.com and get the top 5 articles"}'`,
InvokeCommand: `kernel invoke python-openagi-cua openagi-default-task -p '{"instruction": "Navigate to https://agiopen.org and click the What is Computer Use? button", "record_replay": "True"}'`,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: JSON string instead of boolean for record_replay parameter

The record_replay parameter is passed as a JSON string "True" instead of a JSON boolean true. The TypedDict and dataclass both expect a boolean type. While "True" (string) happens to be truthy so recording is enabled, using "False" to disable recording will fail silently — the string "False" is also truthy in Python, so recording will still be enabled. The correct JSON syntax would be "record_replay": true or "record_replay": false (lowercase, no quotes).

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wait this might be valid

@dprevoznik dprevoznik merged commit d7a6ec8 into main Dec 18, 2025
2 checks passed
@dprevoznik dprevoznik deleted the danny/kernel-685-add-oagi-cua-python-template-to-kernel-cli branch December 18, 2025 16:02
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.

4 participants