Napoleon Hill (1883β1970) was one of the most influential authors on personal success. His masterpiece Think and Grow Rich (1937) remains one of the best-selling books of all time. In Chapter 10 β The Mastermind, he revealed the greatest secret to success: A group of brilliant minds with a shared goal creates an invisible "third mind" that is more powerful than any individual.
"Whatever the mind of man can conceive and believe, it can achieve." β Napoleon Hill
Hill's legacy is preserved by the Napoleon Hill Foundation.
# 1. Clone the repo
git clone <repo-url>
cd NAPOLEON_HILLS_AI_MASTERMIND_CLASSES
# 2. Run setup (creates venv and installs only what this env needs)
python3 setup.py
# 3. Enter your API key
nano .env # or open .env in your editor
# 4. Start!
python3 supervisor_loop.pyOptional β Start the Web Editor:
python3 mastermind_web.py
# β opens http://127.0.0.1:7700If OPENAI_API_BASE is set, setup skips litellm and uses the OpenAI-compatible HTTP endpoint directly. No need to activate a venv β the scripts find it automatically.
Everything runs in Markdown files β no database, no complicated setup. Members, sessions, personas, conversations β all .md files that you can edit in your browser or editor.
| Folder | Type | Description |
|---|---|---|
members_ai/ |
π€ AI Personas | Characters with their own personality. The loop calls the LLM. |
members/ |
π€ Humans | You write directly into the session file. The loop waits for you. |
members_agents/ |
π¦Ύ Agents | Autonomous agents that act independently. |
AI Persona Examples:
- π Elon Musk β First principles, moonshots, execution
- π John D. Rockefeller β Strategy, discipline, long-term thinking
- π Henry Ford β Mass production, efficiency, work ethic
- π GPT-OSS β Fun to run with an abliterated (uncensored) LLM for unfiltered, raw debate
- ...and many more in
members_ai/
Create a file in sessions/:
# My Business Idea
members: elon_musk, john_rockefeller, your_name
thesis: How do I build a company that lasts 100 years?
speaker: elon_muskThat's it. The loop takes over.
# Uncomment and enter one key:
# OPENAI_API_KEY=...
# GEMINI_API_KEY=...
# KILOCODE_API_KEY=sk-...default_model: gemini/gemini-flash-latest
response_sentences: 4-5
sleep_seconds: 0.5
editor_refresh_ms: 2000| Setting | Description | Examples |
|---|---|---|
default_model |
Which LLM to use | gemini/gemini-flash-latest, openai/gpt-5.4, ollama/gpt-oss:20b |
response_sentences |
Response length | 2-3, 4-5, 1, 5-7 |
sleep_seconds |
Pause between cycles | 0.5, 1, 10 |
editor_refresh_ms |
Browser refresh rate | 1000, 2000, 500 |
Live Editing: Changes are applied immediately, no restart needed!
python3 mastermind_web.py
# β http://127.0.0.1:7700Features:
- π All sessions, members, and config in one place
- π Auto-refresh β watch AI responses come in
- π Smart scroll β stays at the bottom when you're at the bottom
- βοΈ Edit config directly in the browser
- πΎ Save with
Ctrl+S/Cmd+S
- Open the Web Editor or the session in your favorite Markdown editor
- Watch the AI members discuss
- When it's your turn β just write under
speaker: your_name - Save β the loop continues automatically
πΈ You don't type any code. You just write.
NAPOLEON_HILLS_AI_MASTERMIND_CLASSES/
βββ .env # π API Keys (private)
βββ mastermind_config.md # βοΈ Settings (editable)
βββ supervisor_loop.py # π The main loop
βββ mastermind_web.py # π Web Editor
βββ setup.py # π¦ Installation
βββ rules.md # π Global rules for everyone
βββ members_ai/ # π€ AI Personas
β βββ elon_musk.md
β βββ john_rockefeller.md
β βββ ...
βββ members/ # π€ Humans
β βββ your_name.md
βββ members_agents/ # π¦Ύ Agents
βββ sessions/ # π¬ Conversations
βββ my_session.md
Runs on litellm β all major providers and locally running abliterated LLMs:
| Provider | Model Format | Example |
|---|---|---|
| Ollama | ollama/... |
ollama/gpt-oss:20b |
gemini/... |
gemini/gemini-flash-latest |
|
| xAI | xai/... |
xai/grok-4-1-fast-non-reasoning |
| Kilocode | kilocode/... |
kilocode/z-ai/glm-5 |
| OpenAI | openai/... |
openai/gpt-5.4 |
- Faster rounds? β
sleep_seconds: 0.25 - Longer responses? β
response_sentences: 6-8 - Test a different model? β Just change it in the config, it's applied live
- Multiple sessions in parallel? β Just create more files in
sessions/ - Different providers per persona? β Add
model:(e.g.openai/gpt-5.4) to the top line of the persona.mdfile
π° "It is literally true that you can succeed best and quickest by helping others to succeed." β Napoleon Hill
π¦ Built on Napoleon Hill's Mastermind Principle.


