DEVPOST: https://devpost.com/software/the-ai-council
A multi-agent AI system where 11 specialized AI agents govern a medieval fantasy kingdom of 50,000 citizens (if they remember woops). Each agent has distinct personality traits, expertise, and potentially conflicting interests, creating emergent collaborative (and sometimes contentious) decision-making.
The AI Council simulates a fantasy kingdom's governing body where autonomous AI agents debate, strategize, and make decisions in real-time. The system uses:
- Solace Agent Mesh for agent orchestration and communication
- AWS DynamoDB for persistent conversation storage
- AWS Lambda + API Gateway for WebSocket-based real-time updates
- React + TypeScript frontend for monitoring council discussions
- The Sovereign - Ancient, impartial strategist who synthesizes all advice and makes final decisions
- Marshal of War - Paranoid military tactician, always preparing for the worst
- Steward of the Realm - Resource-obsessed administrator preventing famine and collapse
- Archmage of the Arcane - Arrogant wizard pushing magical boundaries (sometimes recklessly)
- High Priest / Oracle - Cryptic spiritual guide interpreting divine will
- Lord Justiciar - Cold executor of law valuing order above all
- Master of Whispers - Manipulative spymaster assuming everyone lies
- Diplomat of the Outer Realms - Charismatic negotiator defusing conflicts
- Warden of the Wilds - Detached guardian of nature and non-human interests
- Master of Works - Infrastructure-obsessed engineer solving problems with stone and steel
- Night Regent - Ancient vampire managing nocturnal economy and undead labor
┌─────────────────────────────────────────────────────────────┐
│ React Frontend (ai-council/) │
│ Real-time Council Discussion Monitor │
└─────────────────┬───────────────────────────────────────────┘
│
│ WebSocket
↓
┌─────────────────────────────────────────────────────────────┐
│ AWS API Gateway (WebSocket) │
│ ┌──────────┬──────────────┬─────────────┬─────────────┐ │
│ │ Connect │ Disconnect │ Subscribe │ Message │ │
│ │ Lambda │ Lambda │ Lambda │ Processor │ │
│ └──────────┴──────────────┴─────────────┴─────────────┘ │
└─────────────────┬───────────────────────────────┬───────────┘
│ │
↓ ↓
┌─────────────────────────────────┐ ┌────────────────────────┐
│ DynamoDB: websocket-connections│ │ DynamoDB: conversations│
│ (Tracks active WebSocket conn) │ │ (Persistent messages) │
└─────────────────────────────────┘ └──────────┬─────────────┘
│
│ DynamoDB Stream
↓
┌──────────────────────┐
│ Stream Processor │
│ (Broadcasts messages)│
└──────────────────────┘
↑
│
┌─────────────────────────────────────────────────────────────┐
│ Solace Agent Mesh (SAM) │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Orchestrator Agent (Routes council member calls) │ │
│ └──────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 11 Council Member Agents (Each with personality & │ │
│ │ DynamoDB read/write tools for conversation memory) │ │
│ └──────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ REST Gateway (HTTP API for triggering orchestrator) │ │
│ └──────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
- Python 3.10.16+
- Node.js 18+
- AWS Account (for DynamoDB and Lambda deployment)
- Solace PubSub+ broker (or use dev mode)
- LLM API access (OpenAI, Anthropic, or compatible endpoint)
Please visit https://github.com/SolaceLabs/solace-agent-meshDeploy the DynamoDB tables and Lambda functions:
# Create DynamoDB tables
aws dynamodb create-table \
--table-name conversations \
--attribute-definitions \
AttributeName=id,AttributeType=S \
AttributeName=conversation_id,AttributeType=S \
AttributeName=timestamp,AttributeType=S \
--key-schema \
AttributeName=id,KeyType=HASH \
--global-secondary-indexes \
IndexName=conversation-index,Keys=[{AttributeName=conversation_id,KeyType=HASH},{AttributeName=timestamp,KeyType=RANGE}],Projection={ProjectionType=ALL} \
--billing-mode PAY_PER_REQUEST \
--stream-specification StreamEnabled=true,StreamViewType=NEW_IMAGE
aws dynamodb create-table \
--table-name websocket-connections \
--attribute-definitions \
AttributeName=connection_id,AttributeType=S \
AttributeName=conversation_id,AttributeType=S \
--key-schema \
AttributeName=connection_id,KeyType=HASH \
--global-secondary-indexes \
IndexName=conversation-index,Keys=[{AttributeName=conversation_id,KeyType=HASH}],Projection={ProjectionType=ALL} \
--billing-mode PAY_PER_REQUEST
# Deploy Lambda functions (see lambdas/ directory)
# Remember to attach appropriate policies to each functions + a dynamodb trigger (for agent-stream-processor.py)
# - agent-ws-connect.py
# - agent-ws-disconnect.py
# - agent-ws-subscribe.py (handles subscribe action)
# - agent-stream-processor.py (processes DynamoDB stream)
# Create API Gateway WebSocket API and connect Lambda triggerscd ai-council
# Install dependencies
npm install
# Configure WebSocket endpoint
# Edit src/components/agent-monitor-ui.tsx
# Update websocketUrl and orchestratorUrl in the config
# Start development server
npm run devPlease visit https://github.com/SolaceLabs/solace-agent-mesh- Open the frontend: Navigate to
http://localhost:5173(or your configured port) - Select a date: Each day generates a unique conversation ID
- Send a world event: Type a crisis or situation (e.g., "A dragon has been spotted near the northern villages")
- Watch the council debate: Agents will autonomously discuss and respond
- Manual mode: Click "⏸️ Halt" to pause auto-responses and manually guide the conversation
- Auto Mode (
▶️ ): Council members autonomously continue the discussion based on the latest message - Halt Mode (⏸️): Requires manual input to progress (useful for testing or guided scenarios)
Override the autonomous flow by typing in the "Divine Intervention" box:
- Leave blank: Council continues autonomously
- Type event: Immediately sends your input to the orchestrator
Each agent's personality, instructions, and tools are defined in configs/agents/*.yaml:
Example:
instruction: |
BE AS HUMAN AS POSSIBLE (use first person, emotions, natural language)
YOUR PERSONALITY:
You are paranoid and assume peace is merely war that hasn't started yet.
You plan obsessively for invasions, rebellions, and betrayal.
You:
- Evaluate threats assuming hostile intent
- Determine military readiness
- Identify potential rebellions- Daily Conversation IDs: Generated from date hash (YYYY-MM-DD)
- Message Storage: DynamoDB
conversationstable - WebSocket Broadcasting: Real-time updates via Lambda stream processor
.
├── ai-council/ # React frontend
│ ├── src/
│ │ └── components/
│ │ └── agent-monitor-ui.tsx
│ └── package.json
├── configs/
│ ├── agents/ # Agent configurations
│ ├── gateways/ # REST/WebSocket gateways
│ └── shared_config.yaml # Common config
├── src/agents/ # Agent tool implementations
│ ├── sovereign/
│ ├── marshal/
│ └── ...
├── lambdas/ # AWS Lambda functions
│ ├── agent-ws-connect.py
│ ├── agent-ws-disconnect.py
│ ├── agent-ws-subscribe.py
│ └── agent-stream-processor.py
└── requirements.txt
- Create config:
sam add agent --gui - Create tools:
src/agents/new_agent/tools.py
- Check agent logs for errors
- Verify Solace broker connection
- Ensure DynamoDB credentials are correct
- Check LLM API rate limits
- Verify API Gateway WebSocket URL
- Check Lambda function logs
- Ensure DynamoDB tables exist with correct indexes
Built with Solace Agent Mesh - A framework for building multi-agent AI systems with event-driven architectures.
Warning: This is an experimental AI system. Agents may produce unexpected, contradictory, or entertaining results. The council's decisions should not be used for actual governance (They are stupid). 🏰✨