JorEl
The easiest way to use LLMs - from simple text generation to advanced agent systems
Simple Text Generation
Generate text or json responses with just a few lines of code.
import { JorEl } from 'jorel';
const jorEl = new JorEl({ openAI: true });
const response = await jorEl.text(
"What are the three laws of robotics?"
);
Vision Capabilities
Easily work with images in prompts.
import { JorEl, ImageContent } from 'jorel';
const jorEl = new JorEl({ openAI: true });
// Load image from file or URL
const image = await ImageContent.fromFile("./photo.jpg");
const response = await jorEl.text([
"What's in this image?", image
]);
Tool Integration
Give your LLMs the ability to perform actions.
import { JorEl } from 'jorel';
import { z } from 'zod';
const jorEl = new JorEl({ openAI: true });
const response = await jorEl.text(
"Send a message to the team that JorEl was released",
{
tools: [{
name: "send_slack_message",
description: "Send a message to a Slack channel",
params: z.object({
channel: z.string(),
message: z.string()
}),
executor: sendSlackMessage
}]
}
);
Intelligent Agents
Create agents that can collaborate and delegate tasks.
import { JorEl } from 'jorel';
import { z } from 'zod';
const jorEl = new JorEl({ openAI: true });
// Register tools
jorEl.team.addTools([
{
name: "search_docs",
description: "Search for documentation",
executor: searchDocs,
params: z.object({
query: z.string()
}),
},
]);
// Create main coordinator agent
const coordinator = jorEl.team.addAgent({
name: "coordinator",
description: "Coordinates between user and specialist agents",
systemMessage: "You coordinate requests between users and specialists"
});
// Add specialist agents
coordinator.addDelegate({
name: "researcher",
description: "Researches technical topics in detail and returns a summary",
tools: ["search_docs"]
});
// Create and execute a task
const task = await jorEl.team.createTask(
"What are the latest news about JorEl?"
);
const result = await jorEl.team.executeTask(task, {
limits: {
maxIterations: 10,
maxDelegations: 3
}
});
// Coordinator will delegate as needed