Skip to content

Commit aa54ab8

Browse files
authored
feat(openagi): Add Python template for Lux computer-use model
1 parent d064395 commit aa54ab8

File tree

9 files changed

+2878
-2
lines changed

9 files changed

+2878
-2
lines changed

index.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ type TemplateKey =
2121
| "computer-use"
2222
| "cua"
2323
| "magnitude"
24-
| "gemini-cua";
24+
| "gemini-cua"
25+
| "openagi";
2526
type LanguageInfo = { name: string; shorthand: string };
2627
type TemplateInfo = {
2728
name: string;
@@ -40,6 +41,7 @@ const TEMPLATE_COMPUTER_USE = "computer-use";
4041
const TEMPLATE_CUA = "cua";
4142
const TEMPLATE_MAGNITUDE = "magnitude";
4243
const TEMPLATE_GEMINI_CUA = "gemini-cua";
44+
const TEMPLATE_OPENAGI = "openagi";
4345
const LANGUAGE_SHORTHAND_TS = "ts";
4446
const LANGUAGE_SHORTHAND_PY = "py";
4547

@@ -93,6 +95,11 @@ const TEMPLATES: Record<TemplateKey, TemplateInfo> = {
9395
description: "Implements Gemini 2.5 Computer Use Agent",
9496
languages: [LANGUAGE_TYPESCRIPT],
9597
},
98+
[TEMPLATE_OPENAGI]: {
99+
name: "OpenAGI Lux",
100+
description: "Implements the OpenAGI Lux computer-use model",
101+
languages: [LANGUAGE_PYTHON],
102+
},
96103
};
97104

98105
const INVOKE_SAMPLES: Record<
@@ -125,6 +132,8 @@ const INVOKE_SAMPLES: Record<
125132
'kernel invoke python-cu cu-task --payload \'{"query": "Return the first url of a search result for NYC restaurant reviews Pete Wells"}\'',
126133
[TEMPLATE_CUA]:
127134
'kernel invoke python-cua cua-task --payload \'{"task": "Go to https://news.ycombinator.com and get the top 5 articles"}\'',
135+
[TEMPLATE_OPENAGI]:
136+
'kernel invoke python-openagi openagi-task --payload \'{"task": "Go to https://news.ycombinator.com and get the top 5 articles"}\'',
128137
},
129138
};
130139

@@ -147,6 +156,7 @@ const REGISTERED_APP_NAMES: Record<
147156
[TEMPLATE_ADVANCED_SAMPLE]: "python-advanced",
148157
[TEMPLATE_COMPUTER_USE]: "python-cu",
149158
[TEMPLATE_CUA]: "python-cua",
159+
[TEMPLATE_OPENAGI]: "python-openagi",
150160
},
151161
};
152162

@@ -394,6 +404,8 @@ function printNextSteps(
394404
? "kernel deploy main.py --env ANTHROPIC_API_KEY=XXX"
395405
: language === LANGUAGE_PYTHON && template === TEMPLATE_CUA
396406
? "kernel deploy main.py --env OPENAI_API_KEY=XXX"
407+
: language === LANGUAGE_PYTHON && template === TEMPLATE_OPENAGI
408+
? "kernel deploy main.py --env OAGI_API_KEY=XXX"
397409
: "";
398410

399411
console.log(
@@ -427,7 +439,7 @@ program
427439
)
428440
.option(
429441
"-t, --template <template>",
430-
`Template type (${TEMPLATE_SAMPLE_APP}, ${TEMPLATE_BROWSER_USE}, ${TEMPLATE_STAGEHAND}, ${TEMPLATE_ADVANCED_SAMPLE}, ${TEMPLATE_COMPUTER_USE}, ${TEMPLATE_CUA}, ${TEMPLATE_MAGNITUDE}, ${TEMPLATE_GEMINI_CUA})`
442+
`Template type (${TEMPLATE_SAMPLE_APP}, ${TEMPLATE_BROWSER_USE}, ${TEMPLATE_STAGEHAND}, ${TEMPLATE_ADVANCED_SAMPLE}, ${TEMPLATE_COMPUTER_USE}, ${TEMPLATE_CUA}, ${TEMPLATE_MAGNITUDE}, ${TEMPLATE_GEMINI_CUA}, ${TEMPLATE_OPENAGI})`
431443
)
432444
.action(
433445
async (

0 commit comments

Comments
 (0)