Skip to content

template for creating 3rd party gadgets and subagents for llmist.dev

License

Notifications You must be signed in to change notification settings

zbigniewsobiecki/llmist-gadget-template

Repository files navigation

{{PACKAGE_NAME}}

npm version CI License: MIT

{{DESCRIPTION}}

Built with llmist - see the documentation for more details.

Quick Start

Using with llmist CLI

# Use all gadgets
bunx @llmist/cli agent "your task" -g {{PACKAGE_NAME}}

# Use subagent preset (Explorer only)
bunx @llmist/cli agent "your task" -g {{PACKAGE_NAME}}:subagent

# Use readonly preset
bunx @llmist/cli agent "your task" -g {{PACKAGE_NAME}}:readonly

# Use from GitHub (before publishing to npm)
bunx @llmist/cli agent "your task" -g git+https://github.com/{{GITHUB_USER}}/{{PACKAGE_NAME}}.git

Configuration

Configure in ~/.llmist/cli.toml:

[subagents.Explorer]
model = "sonnet"           # Model for the explorer subagent
maxIterations = 20         # Maximum steps before giving up

Using in Projects

Installation

npm install {{PACKAGE_NAME}}
# or
bun add {{PACKAGE_NAME}}

Using the Subagent

import { LLMist } from 'llmist';
import { ExplorerSubagent } from '{{PACKAGE_NAME}}';

const result = await LLMist.createAgent()
  .withModel('sonnet')
  .withGadgets(new ExplorerSubagent())
  .askAndCollect('Explore this topic and report findings');

console.log(result.text);

Using Individual Gadgets

import { LLMist, AgentBuilder } from 'llmist';
import { exampleSearch, ExampleAction, SessionManager } from '{{PACKAGE_NAME}}';

// Function-based gadget (stateless)
const agent1 = new AgentBuilder(new LLMist())
  .withGadgets(exampleSearch)
  .ask('Search for something');

// Class-based gadget (with session manager)
const manager = new SessionManager();
const agent2 = new AgentBuilder(new LLMist())
  .withGadgets(new ExampleAction(manager))
  .ask('Perform an action');

Using Factory Functions

import { createGadgets, createGadgetsByPreset } from '{{PACKAGE_NAME}}';

// Create all gadgets
const gadgets = createGadgets();
agent.withGadgets(gadgets.ExampleSearch, gadgets.ExampleAction);

// Create by preset
const readonlyGadgets = createGadgetsByPreset('readonly');
agent.withGadgets(...readonlyGadgets);

Available Presets

Preset Gadgets Use Case
all All gadgets Full functionality
subagent Explorer Autonomous exploration
readonly ExampleSearch Read-only operations
minimal ExampleSearch Minimal footprint

Available Gadgets

Gadget Type Description
ExampleSearch Function Search for information
ExampleAction Class Perform actions on resources
Explorer Subagent Autonomous exploration agent

Documentation

Development

# Install dependencies
bun install

# Run tests
bun test

# Type check
bun run typecheck

# Lint
bun run lint

# Build
bun run build

# Run all checks (pre-commit)
bun run precheck

Template Customization

This project was created from the llmist gadget template. To customize:

  1. Replace all {{PACKAGE_NAME}} placeholders with your package name
  2. Replace all {{DESCRIPTION}} placeholders with your description
  3. Replace all {{AUTHOR}} placeholders with your name/org
  4. Replace all {{GITHUB_USER}} placeholders with your GitHub username

Placeholders appear in:

  • package.json
  • README.md
  • LICENSE
  • src/index.ts
  • examples/demo.ts

Learn More

License

MIT

About

template for creating 3rd party gadgets and subagents for llmist.dev

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •