Platform / API and developers
An agent platform as a library.
Exulu IMP is also an npm package. You write knowledge bases, tools and agents in TypeScript, in your own repository.
import { ExuluApp } from "@exulu/backend";
import { contexts } from "./contexts/index";
import { tools } from "./tools/index";
import { serviceAgent } from "./agents/service-agent";
export const app = new ExuluApp();
export const ready = app.create({
config: {
workers: { enabled: true },
MCP: { enabled: true },
},
contexts,
tools,
agents: [serviceAgent],
});import { app, ready } from "./exulu";
await ready;
const server = await app.express.init();
// your own routes run next to the platform's
server.get("/health", (_req, res) => {
res.json({ ok: true });
});
server.listen(Number(process.env.PORT ?? 9001));import { app, ready } from "./exulu";
await ready;
// background jobs: syncs, embeddings, evals, routines
await app.bullmq.workers.create();Knowledge as code
A knowledge base is a TypeScript object.
Fields, data source and embedding model live in code. The platform creates the tables and shows the knowledge base in the interface.
- manuals.ts:9Your own fields, each with its type
- manuals.ts:13Embedding model from your model list, computed in the background
- manuals.ts:21Rights that new entries receive
- manuals-source.ts:9Sync every night, as a cron expression
- manuals-source.ts:16Same id, same entry: changes are taken over
Without a chunker of your own, a built-in sentence chunker splits the text; chunkers for Markdown and for recursive splitting come with the package.
ExuluContext in the documentationimport { ExuluContext, ExuluQueues } from "@exulu/backend";
import { nightlySync } from "./manuals-source";
export const manuals = new ExuluContext({
id: "manuals",
name: "Manuals",
description: "Service manuals: faults, settings, maintenance.",
active: true,
fields: [
{ name: "content", type: "longText", required: true },
{ name: "series", type: "enum", enumValues: ["pumps", "valves"] },
],
embedder: {
model: "text-embedding-3-small", // from your model list
queue: ExuluQueues.register("embed", { worker: 4, queue: 4 }).use(),
},
sources: [nightlySync],
configuration: {
calculateVectors: "onInsert",
languages: ["german", "english"],
defaultRightsMode: "roles",
maxRetrievalResults: 10,
cutoffs: { cosineDistance: 0.5, tsvector: 0.5, hybrid: 0.5 },
},
});import { ExuluQueues, type ExuluItem } from "@exulu/backend";
import { listReleasedManuals } from "../lib/dms"; // your code
export const nightlySync = {
id: "manuals_nightly",
name: "Document system",
description: "Imports released manuals every night.",
config: {
schedule: "0 2 * * *",
queue: ExuluQueues.register("sync", { worker: 1, queue: 1 }).use(),
retries: 3,
},
execute: async (): Promise<ExuluItem[]> => {
const docs = await listReleasedManuals();
return docs.map((doc) => ({
external_id: doc.number, // upserted by this id
name: doc.title,
content: doc.text,
series: doc.series,
}));
},
};import { ExuluTool } from "@exulu/backend";
import { z } from "zod";
export const createTicket = new ExuluTool({
id: "create_ticket",
name: "Create ticket",
description: "Opens a service ticket for a fault.",
type: "function",
inputSchema: z.object({
title: z.string().describe("Short summary of the fault."),
priority: z.enum(["low", "normal", "high"]).describe("How urgent."),
}),
config: [
{ name: "ticket_api", description: "Ticket API", type: "string" },
{ name: "ticket_key", description: "API key", type: "variable" },
],
needsApproval: true, // a person confirms first
execute: async ({ title, priority, toolVariablesConfig: cfg }) => {
const res = await fetch(`${cfg.ticket_api}/tickets`, {
method: "POST",
headers: { "x-api-key": cfg.ticket_key },
body: JSON.stringify({ title, priority }),
});
return { result: await res.text() };
},
});import type { ExuluAgent } from "@exulu/backend";
// optional: an agent in code instead of the workbench
export const serviceAgent: ExuluAgent = {
id: "0b6f3d1e-7c2a-4f5e-9a41-3d8e2c6b7f10", // fixed UUID
type: "agent",
source: "code",
active: true,
name: "Service agent",
instructions: "Answer from the manuals. Open tickets on request.",
model: "gemini-2.5-flash", // from your model list
tools: [
{ id: "create_ticket", type: "function", name: "Create ticket",
description: "Opens a service ticket.", config: [] },
],
};Tools as code
A tool is a function with a schema.
Input schema and function live in code. Admins enter settings and keys per agent; unless set otherwise, a tool asks for approval before each call.
- create-ticket.ts:9The schema the model gets to see
- create-ticket.ts:13Settings, set per agent in the interface
- create-ticket.ts:15The key is stored encrypted in the platform
- create-ticket.ts:17A person approves the call
- service-agent.ts:12An agent in code gets the tool directly
Agents are created in the interface or, if you like, in code; the platform reads both.
ExuluTool in the documentationYour own instance
Your repository, your instance.
your-instance/
- package.json@exulu/backend at a fixed version
- docker-compose.backend.ymlserver
- docker-compose.worker.ymlworker
- src/
- exulu.tsthe app
- server.tsHTTP server, your routes
- worker.tsbackground jobs
- contexts/knowledge bases and sources
- tools/tools
- agents/agents in code, optional
In code, versioned in Git
- App configuration and model list
- Knowledge bases with fields and sources
- Tools
- Agents, if you like
In the interface
- Agents and their instructions
- Tool settings per agent
- Roles and rights
- Budgets
Extensible
Eight places for your own code.
- new ExuluTool()
Tools
Functions that agents call, also with sign-in to the target system.
- new ExuluContext()
Knowledge bases
Your own fields and tables, searchable for agents.
- sources: [ … ]
Data sources
Sync on a schedule, entries updated by their id.
- processor
Processing
Pull text from files, enrich entries, then embed them.
- ExuluChunkers
Chunkers
Split texts the way your documents are built.
- new ExuluEval()
Evals
Your own checks that score answers from 0 to 100.
- ExuluQueues.register()
Queues
Long jobs in the worker, with concurrency and rate limit.
- server.get()
Your own routes
Endpoints of your application in the same server.
API
From outside: GraphQL, REST and MCP.
Your applications talk to Exulu IMP through documented interfaces, with organisation API keys.
GraphQL
POST /graphqlOne endpoint for the platform's data; the schema includes your own knowledge bases.
REST
OpenAPICall agents, as a stream or in one piece; described as OpenAPI.
MCP
/mcp/:agentEvery agent as an MCP server, with its tools.
API keys
x-api-keyFor the whole platform or only for selected agents, attributable to a team or project.
# list agents over the GraphQL API
curl -X POST https://imp.example.com/graphql \
-H "x-api-key: sk_<secret>/integration" \
-H "Content-Type: application/json" \
-d '{"query": "query { agentsPagination(limit: 5) { items { id name } } }"}'{
"mcpServers": {
"service-agent": {
"type": "http",
"url": "https://imp.example.com/mcp/<agent-id>",
"headers": { "x-api-key": "sk_<secret>/integration" }
}
}
}# 1. raise the package version
npm install @exulu/backend@<version>
# 2. rebuild and restart server and worker
docker compose -f docker-compose.backend.yml build
docker compose -f docker-compose.worker.yml build
docker compose -f docker-compose.backend.yml up -d
docker compose -f docker-compose.worker.yml up -d
# 3. on start, new tables and columns are added; the log says:
# [EXULU] Database initialized.Versioned and traceable
An update is a new package version.
Numbered releases
Every version of the package has its number; what changes is in the changelog.
Raise the version
In package.json, then rebuild and restart server and worker.
The database follows
The platform adds new tables and columns itself on start.
The core of the platform is source-available under the Elastic License 2.0; further functions are under a commercial licence.
Documentation
Everything else is in the documentation.
Setup, tutorials, the reference of every class and both APIs.