@arrangedev/swarm
v0.0.1
Published
Orchestrate teams of local AI agents for code repair.
Readme
[!IMPORTANT]
This package is in active development, and may not work 100% as expected. It is not recommended to be used in production. Please report any issues you encounter.
Swarm
Swarm is a tool for orchestrating teams of local AI agents for code repair. It is designed to be used in conjunction with Llamafiles, an executable LLM file format.
Installation
npm install @arrangedev/swarm
Usage
Initialize a Hive
import { Hive } from "@arrangedev/swarm";
const models = [
{
type: ModelType.llamafile,
path: "./planner.llamafile",
parameters: {
temperature: 0.7,
maxTokens: 2048,
},
},
];
const roles = [
{
name: "Developer",
description: "Coordinates/plans tasks, and implements solutions",
responsibilities: [
"Code writing",
"Implementation",
"Task breakdown",
"Progress tracking",
],
},
];
const hive = new Hive(
"You are part of a collaborative AI development team.",
"Please help me create a REST API for a todo application.",
models,
roles
);
try {
await hive.initialize();
await hive.facilitate();
const log = hive.getConversationLog();
console.log("Task completed. Conversation log:", log);
} finally {
await hive.shutdown();
}