Documentation Index
Fetch the complete documentation index at: https://docs.swarms.world/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheLLMCouncil creates a council of specialized LLM agents that collaborate through independent responses, peer review, and synthesis. Inspired by Andrej Karpathy’s llm-council, it demonstrates how different models evaluate and rank each other’s work.
Installation
Workflow
- Dispatch: Query sent to all council members in parallel
- Respond: Each member independently answers the query
- Evaluate: All members review and rank anonymized responses
- Synthesize: Chairman creates final answer based on responses and rankings
Attributes
Name of the council
Description of the council’s purpose
List of Agent instances representing council members. If None, creates default council with GPT-5.1, Gemini 3 Pro, Claude Sonnet 4.5, and Grok-4
Model name for the Chairman agent that synthesizes responses
Whether to print progress and intermediate results
Format for the output (“list”, “dict”, “string”, “final”, “json”, “yaml”, etc.)
Methods
run()
Execute the full LLM Council workflow.task(str): The user’s task/query to process (preferred parameter)query(str): Alias for task (kept for backwards compatibility)
batched_run()
Run the LLM Council workflow for a batch of tasks.tasks(List[str]): List of tasks to process
Usage Examples
Basic Usage with Default Council
Custom Council Members
Batch Processing
Different Output Formats
Non-Verbose Mode
Default Council Members
When no custom members are provided, the default council includes:-
GPT-5.1 Councilor
- Specialization: Analytical and comprehensive responses
- Focus: Deep analysis, thorough exploration
-
Gemini 3 Pro Councilor
- Specialization: Concise and well-structured responses
- Focus: Clear structure, efficient information processing
-
Claude Sonnet 4.5 Councilor
- Specialization: Thoughtful and balanced responses
- Focus: Nuanced reasoning, ethical considerations
-
Grok-4 Councilor
- Specialization: Creative and innovative responses
- Focus: Unique perspectives, creative problem-solving
Evaluation Process
Each council member evaluates all responses (anonymized) and provides:- Rankings: Ordered list from best to worst response
- Reasoning: Explanation for each ranking
- Observations: Additional insights about strengths/weaknesses
Synthesis Process
The Chairman agent:- Reviews all original responses
- Considers all evaluations and rankings
- Identifies strongest elements from each response
- Creates cohesive final answer incorporating best aspects
- Acknowledges which perspectives influenced the synthesis
Output Structure
The conversation history includes:Features
- Parallel Execution: All council members respond simultaneously
- Anonymous Evaluation: Responses are anonymized during peer review
- Multi-Model Diversity: Leverages different LLM strengths
- Peer Review: Each member evaluates all responses objectively
- Intelligent Synthesis: Chairman creates cohesive final answer
- Transparent Process: Full conversation history available
- Flexible Output: Multiple output format options
- Batch Processing: Handle multiple queries efficiently
Best Practices
- Council Composition: Include agents with complementary strengths
- Clear Queries: Provide well-defined questions for best results
- Output Type: Use “final” for end-user answers, “dict” for analysis
- Custom Members: Tailor council to your domain/use case
- Verbose Mode: Enable for understanding the decision process