A Society of Agents
Inspired by Marvin Minsky's Society of Mind, a multi-agent simulation where AI personalities debate questions from different perspectives. Ask a question, specify the viewpoints you want, and watch the debate unfold.
What it does
- You provide a question and the perspectives you want represented
- AI generates distinct agent personalities for each perspective
- An orchestrator facilitates debate between the agents
- Agents discuss, disagree, and build on each other's arguments
Installation
pip install pysociety
or
uv add pysociety
Quick Start
Create a .env file with your API key:
ANTHROPIC_API_KEY=your-api-key-here
Run a debate
uv run python -m llm_society \
"What is the meaning of life? I want an optimistic, a pessimistic, and a pragmatic view."
More examples
# Ethics debate
uv run python -m llm_society "$(cat examples/trolley_problem.txt)"
# Philosophy
uv run python -m llm_society "$(cat examples/free_will.txt)"
# Social issues
uv run python -m llm_society "$(cat examples/wealth_inequality.txt)"
Example Questions
| File | Topic | Perspectives |
|---|---|---|
meaning_of_life.txt |
Meaning of life | Optimist, Pessimist |
trolley_problem.txt |
Trolley problem | Utilitarian, Deontologist, Virtue ethicist |
free_will.txt |
Free will | Determinist, Libertarian, Compatibilist |
wealth_inequality.txt |
Wealth inequality | Libertarian, Socialist, Rawlsian, Communitarian |
animal_rights.txt |
Animal rights | Peter Singer, Traditionalist, Environmental ethicist |
civil_disobedience.txt |
Civil disobedience | Thoreau, MLK, Legal positivist, Conservative |
Optional Configuration
You can customize models in .env:
# Main orchestrator model
MAIN_AGENT_MODEL=anthropic:claude-opus-4-5-20251101
# Sub-agent models
SUB_AGENT_MODEL=anthropic:claude-sonnet-4-5-20250929
# Prompt generation model
PROMPT_GENERATOR_MODEL=anthropic/claude-opus-4-5-20251101
Metadata
Release files for pysociety 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pysociety-0.2.4.tar.gz | 821.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pysociety-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 828.7 kB
Release files / pysociety-0.2.4.tar.gz
| Download URL | pysociety-0.2.4.tar.gz |
|---|---|
| Size | 821.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76c7f12c16571bd91c6cd80ff9e343c16ea82f7205d32d8a487d07f5d75b866c
|
|
BLAKE2b-256 checksum How to use checksums |
6026bb10adbf8400962f3b6dd6eb561b99fe4ae02ca5d5c47b4ce3a20a217953
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / pysociety-0.2.4-py3-none-any.whl
| Download URL | pysociety-0.2.4-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
354d383caa6892ef6d0531a8c3727eb8c01724e2bdfb526ead904d35265174d4
|
|
BLAKE2b-256 checksum How to use checksums |
9307ee21c52c9bc1eaec81db68964e945fb9f5979221f1d763f4db73a944475e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|