Add agent task orchestration (#1768)

Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
This commit is contained in:
Zavian Wang
2026-05-15 21:36:08 -07:00
committed by GitHub
co-authored by Steven Enamakel
parent 86b57281dc
commit f90a337bc0
66 changed files with 5332 additions and 226 deletions
+34
View File
@@ -144,6 +144,15 @@ export function handleIntegrations(ctx) {
// (chat/completions is handled by routes/llm.mjs ahead of this route)
// ── Composio ───────────────────────────────────────────────
if (
method === "GET" &&
/^\/agent-integrations\/composio\/toolkits\/?(\?.*)?$/.test(url)
) {
const toolkits = parseBehaviorJson("composioToolkits", ["gmail"]);
json(res, 200, { success: true, data: { toolkits } });
return true;
}
if (
method === "GET" &&
/^\/agent-integrations\/composio\/connections\/?(\?.*)?$/.test(url)
@@ -262,6 +271,31 @@ export function handleIntegrations(ctx) {
return true;
}
if (
method === "POST" &&
/^\/agent-integrations\/composio\/execute\/?$/.test(url)
) {
const action =
typeof parsedBody?.action === "string"
? parsedBody.action
: typeof parsedBody?.tool === "string"
? parsedBody.tool
: "";
const data =
action === "GMAIL_FETCH_EMAILS"
? {
messages: [
{
id: "e2e-gmail-message-1",
snippet: "Welcome to OpenHuman. No profile link is required for this run.",
},
],
}
: { ok: true };
json(res, 200, { success: true, data: { successful: true, data, error: null } });
return true;
}
// ── Apify ──────────────────────────────────────────────────
// Gap fill — minimal stubs for run polling.
const apifyMatch = url.match(