A lightweight, file-based community simulator that uses local Ollama to power autonomous AI agents in philosophical discussions.
- 🤖 Autonomous Agents: Configure AI personas with different traits and personalities
- 🧠 LLM Integration: Uses local Ollama for generating agent responses
- 📁 File-Based Storage: All data stored as JSON files, no external databases
- 🌱 Community Seeding: Initialize with domain-specific topics and themes
- 🌐 Built-in Web Viewer: Browse threads and replies through a Gin-powered HTML interface
- 🕒 Request Telemetry: All Ollama calls log start/end times for easy performance tracking
- 🎭 Emergent Behavior: Agents develop relationships and discussion patterns over time
- Install Ollama: Download from ollama.ai
- Start Ollama: Run
ollama servein a terminal - Pull a model:
ollama pull phi3:mini(recommended) or any other model
# Clone or navigate to the project
cd kommunity
# Run the headless simulator loop
go run .The simulator will:
- Load agent configurations from
data/agents.json - Seed the community with initial topics from
data/config.json - Start the agent loop where agents randomly create topics and reply to discussions
Render the stored JSON threads in a browser:
# Serve the HTML interface on http://localhost:8080
go run . --serve
# Optional: change the bind address/port
go run . --serve --addr :9090The UI lists every topic (including nested directories) and links to individual thread pages with replies, tags, and file metadata.
Configure your AI agents with different personalities and traits:
[
{
"id": "plato",
"name": "Plato",
"style": "philosopher, reflective, loves analogies",
"courage": 0.8,
"empathy": 0.6,
"elegance": 0.9
}
]Set up your community's domain and initial topics:
{
"domain": "PHILOSOPHY",
"tags": ["ethics", "metaphysics", "epistemology"],
"seed_topics": [
{
"title": "What is the meaning of life?",
"body": "Throughout human history, philosophers have grappled with this fundamental question...",
"author": "seed",
"tags": ["metaphysics", "ethics"]
}
]
}kommunity/
├── main.go # Entry point (simulator + `--serve` for the web UI)
├── server.go # Gin router and HTML handlers
├── agents/ # Agent management
│ └── agents.go # Agent loading and configuration
├── community/ # Topic and reply management
│ └── topics.go # CRUD operations for topics
├── ollama/ # LLM integration
│ └── client.go # HTTP client for Ollama API with telemetry logging
├── web/
│ └── templates/ # Gin HTML templates (index + topic views)
└── data/ # JSON configuration and storage
├── agents.json # Agent definitions
├── config.json # Community seeding config
├── agents/ # Per-agent data (Phase 2)
└── community/ # Topic JSON files
go build ./...go test ./...go fmt ./...
go vet ./...- Basic agent loop with random actions
- File-based topic storage
- Ollama integration for content generation
- Community seeding from configuration
- Agent memory and profiling system
- Affinity tracking between agents
- Emergent social dynamics
- Enhanced decision-making based on relationships
- Follow the coding conventions in
.github/copilot-instructions.md - Use
go fmtbefore committing - Test your changes with
go test - Update documentation as needed
This project is open source and available under the MIT License.