A strategic AI advisor that provides cunning, pragmatic counsel inspired by Niccolò Machiavelli's philosophy. Ask about work challenges, personal dilemmas, or life decisions — receive advice focused on power dynamics, strategic positioning, and calculated action.
- Multi-Model Support: Choose between OpenAI (GPT-4o, GPT-4o-mini), Anthropic (Claude Sonnet), or Deepseek
- Machiavellian Strategy: Advice rooted in The Prince and The Discourses — pragmatic, not moralistic
- Modern Context: Tailored for corporate politics, negotiations, and organizational dynamics
- Gradio Interface: Clean, simple web UI
-
Install dependencies (using conda
aienvironment):conda activate ai
-
Configure API keys — Edit
.env:OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-ant-... DEEPSEEK_API_KEY=sk-... -
Run the app:
python app.py
-
Open http://127.0.0.1:7860 in your browser
- Select your preferred AI model from the dropdown
- Type your situation or question
- Press Enter or click ⚔️ Seek Counsel
- Receive strategic advice with references to Machiavelli's works
| File | Description |
|---|---|
app.py |
Gradio web interface |
utils.py |
API handlers and Machiavelli system prompt |
.env |
API keys (not committed) |
.env.example |
Template for environment variables |
- "My colleague is taking credit for my work in front of our manager"
- "How do I negotiate a raise without leverage?"
- "A vendor is stalling on contract terms — how do I force a decision?"
"Everyone sees what you appear to be, few experience what you really are." — The Prince