New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@arrangedev/swarm

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arrangedev/swarm

Orchestrate teams of local AI agents for code repair.

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

[!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();
}

FAQs

Package last updated on 06 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts