Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.xhipai.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The queue system now supports team job types, allowing you to schedule and enqueue team runs alongside agent and workflow jobs.

Enqueue a Team Run

import { AgentQueue } from "@agentium/queue";

const queue = new AgentQueue({
  connection: { host: "localhost", port: 6379 },
});

const { jobId } = await queue.enqueueTeamRun({
  teamName: "research-team",
  input: "Analyze Q4 results",
  sessionId: "session-123",
  priority: 1,
});

Schedule a Recurring Team Run

await queue.schedule({
  id: "daily-analysis",
  cron: "0 9 * * *",
  timezone: "America/New_York",
  team: {
    name: "research-team",
    input: "Generate daily market report",
  },
});

Worker Setup

import { AgentWorker } from "@agentium/queue";

const worker = new AgentWorker({
  connection: { host: "localhost", port: 6379 },
  agentRegistry: { analyst: analystAgent },
  teamRegistry: { "research-team": researchTeam },  // new!
  workflowRegistry: { pipeline: dataPipeline },
});

Job Types

TypePayloadHandler
agentAgentJobPayloadagent.run(input, opts)
teamTeamJobPayloadteam.run(input, opts)
workflowWorkflowJobPayloadworkflow.run(opts)