Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ type TemplateKey =
| "computer-use"
| "cua"
| "magnitude"
| "gemini-cua";
| "gemini-cua"
| "openagi";
type LanguageInfo = { name: string; shorthand: string };
type TemplateInfo = {
name: string;
Expand All @@ -40,6 +41,7 @@ const TEMPLATE_COMPUTER_USE = "computer-use";
const TEMPLATE_CUA = "cua";
const TEMPLATE_MAGNITUDE = "magnitude";
const TEMPLATE_GEMINI_CUA = "gemini-cua";
const TEMPLATE_OPENAGI = "openagi";
const LANGUAGE_SHORTHAND_TS = "ts";
const LANGUAGE_SHORTHAND_PY = "py";

Expand Down Expand Up @@ -93,6 +95,11 @@ const TEMPLATES: Record<TemplateKey, TemplateInfo> = {
description: "Implements Gemini 2.5 Computer Use Agent",
languages: [LANGUAGE_TYPESCRIPT],
},
[TEMPLATE_OPENAGI]: {
name: "OpenAGI Lux",
description: "Implements the OpenAGI Lux computer-use model",
languages: [LANGUAGE_PYTHON],
},
};

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

Expand All @@ -147,6 +156,7 @@ const REGISTERED_APP_NAMES: Record<
[TEMPLATE_ADVANCED_SAMPLE]: "python-advanced",
[TEMPLATE_COMPUTER_USE]: "python-cu",
[TEMPLATE_CUA]: "python-cua",
[TEMPLATE_OPENAGI]: "python-openagi",
},
};

Expand Down Expand Up @@ -394,6 +404,8 @@ function printNextSteps(
? "kernel deploy main.py --env ANTHROPIC_API_KEY=XXX"
: language === LANGUAGE_PYTHON && template === TEMPLATE_CUA
? "kernel deploy main.py --env OPENAI_API_KEY=XXX"
: language === LANGUAGE_PYTHON && template === TEMPLATE_OPENAGI
? "kernel deploy main.py --env OAGI_API_KEY=XXX"
: "";

console.log(
Expand Down Expand Up @@ -427,7 +439,7 @@ program
)
.option(
"-t, --template <template>",
`Template type (${TEMPLATE_SAMPLE_APP}, ${TEMPLATE_BROWSER_USE}, ${TEMPLATE_STAGEHAND}, ${TEMPLATE_ADVANCED_SAMPLE}, ${TEMPLATE_COMPUTER_USE}, ${TEMPLATE_CUA}, ${TEMPLATE_MAGNITUDE}, ${TEMPLATE_GEMINI_CUA})`
`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})`
)
.action(
async (
Expand Down
Loading