A Multi-Agent Story Production Pipeline for SillyTavern
The Council is a comprehensive multi-agent orchestration system that transforms SillyTavern's response generation into a full editorial production pipeline. It coordinates multiple specialized AI agents to produce high-quality, consistent narrative responses.
Version: 2.1.0-alpha Status: Alpha Complete
- Six-System Architecture: Modular design with clear separation of concerns
- Multi-Agent Orchestration: Coordinate multiple LLM agents in configurable pipelines
- Three Orchestration Modes: Synthesis, Compilation, and Injection
- Advanced Prompt Builder: Council Macros, conditionals, transforms, live validation
- Curation System: Topological data stores with CRUD/RAG pipelines
- Character System: Dynamic avatar agents from character data
- User Gavel System: Review and edit at key decision points
- Full ST Integration: Uses SillyTavern's APIs for seamless chat integration
-
Navigate to your SillyTavern installation's extensions folder:
SillyTavern/public/scripts/extensions/third-party/ -
Clone or copy the
TheCouncilfolder into this directory -
Restart SillyTavern
-
The Council button (⚖️) should appear next to your send button
- Click the ⚖️ Council button to open the navigation panel
- Configure your pipeline in the Pipeline tab
- Set up agents, positions, and teams
- Run the pipeline using the Execute button
- Review and edit at User Gavel points
┌─────────────────────────────────────────────────────────────────────────────┐
│ THE COUNCIL KERNEL │
│ (EventBus, StateManager, Storage, Presets, Hooks, UI Components) │
└────────────────────────────────────┬────────────────────────────────────────┘
┌──────────────────────────┼──────────────────────────┐
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────────┐ ┌─────────────────┐
│ CURATION SYSTEM │ │ PROMPT BUILDER SYS │ │ CHARACTER SYSTEM│
│ (Topologists) │ │ (Macros/Tokens) │ │ (Avatars) │
└────────┬────────┘ └──────────┬──────────┘ └────────┬────────┘
└───────────────────────────┼─────────────────────────┘
┌────────────────────────────────────┴────────────────────────────────────────┐
│ RESPONSE PIPELINE BUILDER SYSTEM (Editorial Agents) │
└────────────────────────────────────┬────────────────────────────────────────┘
┌────────────────────────────────────┴────────────────────────────────────────┐
│ RESPONSE ORCHESTRATION SYSTEM │
│ (Synthesis | Compilation | Injection modes) │
└─────────────────────────────────────────────────────────────────────────────┘
TheCouncil/
├── index.js # Entry point
├── core/ # System implementations
│ ├── kernel.js # The Council Kernel
│ ├── curation-system.js # Curation System
│ ├── character-system.js # Character System
│ ├── prompt-builder-system.js # Prompt Builder System
│ ├── pipeline-builder-system.js # Pipeline Builder System
│ └── orchestration-system.js # Orchestration System
├── ui/ # User interface
│ ├── nav-modal.js # Navigation modal
│ └── components/ # Reusable UI components
├── data/presets/ # Pipeline presets
└── docs/ # Documentation
| Mode | Purpose | Use Case |
|---|---|---|
| Synthesis | Multi-agent workflow produces final response | Complex creative tasks requiring multiple perspectives |
| Compilation | Multi-agent workflow produces optimized prompt | Prompt engineering and optimization |
| Injection | Replace ST tokens with Curation RAG outputs | Fast context injection without full pipeline |
LLM-backed workers that process inputs and produce outputs:
- Configurable system prompts using the Prompt Builder
- Per-agent API settings (temperature, max tokens)
- Support for custom and ST-native endpoints
Roles within teams that define how agents participate:
- Role descriptions
- Prompt modifiers (prefix, suffix)
- Priority ordering
Groups of positions working together:
- Team-level orchestration modes
- Participant selection
- Output aggregation
Multi-step workflows:
- Phases contain ordered actions
- Actions can reference agents, curation stores, or character avatars
- Input/output variable flow
- Gavel points for user intervention
The Prompt Builder provides advanced prompt construction:
- Custom: Write prompts directly with macro support
- ST Preset: Use SillyTavern prompt presets
- Token Builder: Drag-and-drop token assembly
{{macro:system_base}}
{{macro:greeting name="Alice" location="wonderland"}}
{{#if phase.isFirst}}
This is the first phase.
{{else}}
Building on previous work.
{{/if}}
{{input | uppercase | truncate:100}}
{{agent.name | default:'Unknown'}}
Manage topological data stores:
- Define custom schemas with fields and types
- CRUD operations on entries
- Topological indexing for relationships
- Retrieval-augmented generation
- Query building with LLM assistance
- Context injection into prompts
- AI-powered data management
- Automatic categorization and indexing
Dynamic avatar agents:
- Generate agents from character data
- Automatic personality and knowledge extraction
- Voice consistency guidance
- Coordinates multiple character agents
- Ensures narrative consistency
window.TheCouncil = {
// Modules
getModule(name), // Get registered module
// Events
on(event, handler), // Subscribe to event
off(event, handler), // Unsubscribe
emit(event, data), // Emit event
// State
getState(), // Get current state
setState(path, value), // Update state
// Storage
save(key, data), // Save to storage
load(key), // Load from storage
// Presets
discoverPresets(), // Find available presets
loadPreset(name), // Load preset by name
applyPreset(preset), // Apply preset to current config
};// System events
'kernel:ready' // Kernel initialized
'pipeline:start' // Pipeline execution started
'pipeline:phase' // Phase started
'pipeline:action' // Action started
'pipeline:complete' // Pipeline finished
'pipeline:error' // Error occurred
'gavel:await' // User intervention needed
'gavel:resolved' // User intervention complete
// UI events
'ui:modal:open' // Modal opened
'ui:modal:close' // Modal closedLocated in data/presets/:
default-pipeline.json- Empty starter pipelinequick-pipeline.json- Single-phase quick executionstandard-pipeline.json- Multi-phase editorial workflow
{
apiConfig: {
useCurrentConnection: true, // Use ST's current API
temperature: 0.7,
maxTokens: 2048,
},
systemPrompt: {
source: "custom", // custom | character | curation
customText: "...",
promptConfig: { ... } // Prompt Builder config
}
}Pipeline won't start:
- Check browser console for errors
- Verify all systems initialized (look for "initialized" logs)
- Ensure preset is valid
Agents not responding:
- Check API configuration in agent settings
- Verify API key if using custom endpoints
- Check rate limiting
Context missing:
- Ensure Curation stores have data
- Verify token resolution in Prompt Builder preview
Enable debug logging in browser console:
window.TheCouncil.getModule('logger').setLevel('debug');| Document | Purpose |
|---|---|
CLAUDE.md |
Developer quick reference |
docs/SYSTEM_DEFINITIONS.md |
Complete system specifications |
docs/STATUS_REPORT.md |
Implementation status |
docs/DEVELOPMENT_PLAN.md |
Development task plan |
- Author: The Liquor Priest
- Inspiration: Wild Turkey 101 Bourbon
MIT License - See LICENSE file for details
"Many voices, one story."