Install
Use a supported Node version, then:Start the application
Save assupport-server.ts:
support-server.ts
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Agentium 4.0.0 · Upgrade from 3.x.
A complete local service, a request to try, and paths to larger harness, voice, and worker applications.
npm init -y
npm pkg set type=module
npm install @agentium/core@4.0.0 @agentium/transport@4.0.0 openai express
npm install --save-dev tsx typescript @types/node @types/express
export OPENAI_API_KEY="your-key"
support-server.ts:
import express from "express";
import { Agent, openai } from "@agentium/core";
import { createAgentRouter } from "@agentium/transport";
const support = new Agent({
name: "support",
model: openai(process.env.OPENAI_MODEL ?? "gpt-6.1-sol"),
instructions: "Help customers with orders. Ask for an order ID when it is missing.",
});
const app = express();
app.use(express.json({ limit: "1mb" }));
app.use("/api", createAgentRouter({
registry: false,
agents: { support },
security: { mode: "local" },
}));
const server = app.listen(3000, "127.0.0.1", () => {
console.log("Support API: http://127.0.0.1:3000/api/agents/support/run");
});
let closing = false;
function shutdown() {
if (closing) return;
closing = true;
server.close((error) => {
void support.close().catch(console.error);
if (error) { console.error(error); process.exitCode = 1; }
});
}
process.once("SIGINT", shutdown);
process.once("SIGTERM", shutdown);
npx tsx support-server.ts
curl --fail-with-body http://127.0.0.1:3000/api/agents/support/run \
-H 'Content-Type: application/json' \
-d '{"input":"Where is my order?"}'
| Application | Complete path |
|---|---|
| Ground the answer in order data | Support tools, knowledge, approval |
| Compose a reusable research runtime | Research harness |
| Continue scoped conversations | Harness sessions |
| Review project documents | Workspace harness |
| Execute a background job | Queue quickstart |
| Control an outbound phone call | Local call lifecycle, then carrier setup |
| Connect audio and speech | Voice adapters, streaming pipeline |