danielrosehill commited on
Commit
c266ed1
Β·
1 Parent(s): 8c1f582

Update README with Hugging Face metadata

Browse files
Files changed (3) hide show
  1. README.md +73 -117
  2. README_GITHUB.md +143 -0
  3. README_HF.md +0 -99
README.md CHANGED
@@ -1,143 +1,99 @@
1
- # AI Agent UN
2
- ![alt text](images/banner.jpg)
 
 
 
 
 
 
 
 
 
3
 
 
4
 
5
- An experimental Model United Nations simulation populated by AI agents.
6
 
7
- Each agent embodies the foreign policy positions, diplomatic style, and national interests of a specific country.
8
 
9
- Motions can be run as tasks and using structured outputs both votes and supporting statements can be collected and then analysed.
 
 
 
 
10
 
11
- ## Overview
12
 
13
- This is an AI experiment designed to:
14
- - Simulate international diplomatic interactions and negotiations
15
- - Model how different countries might approach global issues based on their historical positions and national interests
16
- - Explore multi-agent AI systems in complex geopolitical scenarios
17
- - Provide an educational and research tool for understanding international relations dynamics
18
 
19
- ## Project Structure
 
 
20
 
21
- ```
22
- AI-Agent-UN/
23
- β”œβ”€β”€ agents/
24
- β”‚ └── representatives/ # AI agent system prompts for each country
25
- β”‚ β”œβ”€β”€ united-states/
26
- β”‚ β”œβ”€β”€ china/
27
- β”‚ β”œβ”€β”€ russia/
28
- β”‚ └── ...
29
- β”œβ”€β”€ data/
30
- β”‚ └── bodies/ # UN membership data
31
- β”œβ”€β”€ tasks/
32
- β”‚ β”œβ”€β”€ motions/ # UN resolutions to vote on
33
- β”‚ └── reactions/ # Simulation results (votes & statements)
34
- β”œβ”€β”€ scripts/
35
- β”‚ └── run_motion.py # Main simulation runner
36
- β”œβ”€β”€ .env.example # Configuration template
37
- └── requirements.txt # Python dependencies
38
- ```
39
 
40
- ## Quick Start
41
 
42
- ### 1. Installation
43
 
44
- ```bash
45
- # Clone the repository
46
- git clone https://github.com/yourusername/AI-Agent-UN.git
47
- cd AI-Agent-UN
 
 
 
48
 
49
- # Create virtual environment
50
- python3 -m venv .venv
51
- source .venv/bin/activate # On Windows: .venv\Scripts\activate
52
 
53
- # Install dependencies
54
- pip install -r requirements.txt
55
- ```
 
 
 
 
56
 
57
- ### 2. Configuration
58
 
59
- ```bash
60
- # Copy the example environment file
61
- cp .env.example .env
 
 
62
 
63
- # Edit .env and add your API key
64
- # For cloud API (OpenAI):
65
- OPENAI_API_KEY=your_api_key_here
66
- MODEL_NAME=gpt-4
67
 
68
- # OR for local models (Ollama):
69
- # Install Ollama from https://ollama.ai
70
- # Pull a model: ollama pull llama3
71
- ```
 
72
 
73
- ### 3. Run a Motion Simulation
74
 
75
- ```bash
76
- # Run with cloud API (default)
77
- python scripts/run_motion.py 01_gaza_ceasefire_resolution
 
 
78
 
79
- # Run with local model
80
- python scripts/run_motion.py 01_gaza_ceasefire_resolution --provider local
81
 
82
- # Test with only 5 countries
83
- python scripts/run_motion.py 01_gaza_ceasefire_resolution --sample 5
84
- ```
85
 
86
- ### 4. View Results
 
 
87
 
88
- Results are saved in `tasks/reactions/` as JSON files:
89
- - `{motion_id}_{timestamp}.json` - Timestamped result
90
- - `{motion_id}_latest.json` - Always points to latest simulation
91
 
92
- ## How It Works
93
 
94
- 1. **Agent System Prompts**: Each country has a detailed system prompt in `agents/representatives/{country}/system-prompt.md` that defines their foreign policy positions and diplomatic style.
95
 
96
- 2. **Motion Runner**: The `run_motion.py` script:
97
- - Loads the motion text from `tasks/motions/`
98
- - Queries each country's AI agent
99
- - Collects votes (yes/no/abstain) and statements
100
- - Saves results to `tasks/reactions/`
101
-
102
- 3. **JSON-Constrained Output**: Each agent responds with structured JSON:
103
- ```json
104
- {
105
- "vote": "yes",
106
- "statement": "Brief explanation of position..."
107
- }
108
- ```
109
-
110
- ## Available Motions
111
-
112
- - `01_gaza_ceasefire_resolution` - Support for Ceasefire Agreement in Gaza and Commitment to Lasting Peace
113
-
114
- ## AI Providers
115
-
116
- ### Cloud API
117
- - Supports OpenAI (GPT-4, GPT-3.5-turbo, etc.)
118
- - Supports Anthropic Claude (with API key)
119
- - Supports any OpenAI-compatible API
120
-
121
- ### Local Models
122
- - Uses Ollama for local inference
123
- - Supports Llama 3, Mistral, Mixtral, and other Ollama models
124
- - No API costs, complete privacy
125
-
126
- ## Use Cases
127
-
128
- - Educational demonstrations of international relations concepts
129
- - Research into multi-agent AI behavior in diplomatic contexts
130
- - Experimentation with large language models in structured debate scenarios
131
- - Analysis of how AI systems model complex geopolitical positions
132
-
133
- ## Contributing
134
-
135
- This is an experimental project shared publicly for research, education, and collaborative development. Contributions are welcome!
136
-
137
- ## License
138
-
139
- [To be determined]
140
-
141
- ## Disclaimer
142
-
143
- This is a simulation for research and educational purposes. The AI agents' positions do not represent actual government policies or diplomatic stances. The simulation is designed to model how countries might approach issues based on their historical positions, but should not be considered authoritative or predictive.
 
1
+ ---
2
+ title: AI Agent UN - Gaza Ceasefire Resolution
3
+ emoji: 🌍
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: gradio
7
+ sdk_version: 4.44.0
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
11
+ ---
12
 
13
+ # πŸ‡ΊπŸ‡³ AI Agent UN: Gaza Ceasefire Resolution Simulation
14
 
15
+ An experimental Model United Nations simulation where AI agents representing all 195 UN member states vote on a ceasefire resolution for Gaza.
16
 
17
+ ## 🎯 The Concept
18
 
19
+ This project explores how large language models can simulate international diplomatic interactions by creating AI agents that embody:
20
+ - **Foreign policy positions** based on historical voting records
21
+ - **Diplomatic style** reflecting each country's approach to multilateral diplomacy
22
+ - **National interests** and regional alliances
23
+ - **Cultural and ideological perspectives**
24
 
25
+ ### How It Works
26
 
27
+ 1. **Agent System Prompts**: Each of the 195 countries has a detailed system prompt that defines their:
28
+ - Historical positions on Middle East conflicts
29
+ - Key alliances and regional groupings
30
+ - Economic and security interests
31
+ - Past voting patterns on similar resolutions
32
 
33
+ 2. **Structured Voting**: Each AI agent receives the ceasefire resolution text and responds with:
34
+ - A vote: YES, NO, or ABSTAIN
35
+ - A diplomatic statement explaining their position
36
 
37
+ 3. **Analysis**: Votes are aggregated and analyzed by region, showing how different parts of the world approach the issue
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
+ ## πŸ“Š The Resolution
40
 
41
+ **Motion**: Support for Ceasefire Agreement in Gaza and Commitment to Lasting Peace
42
 
43
+ The resolution calls for:
44
+ - Immediate and comprehensive ceasefire
45
+ - Unhindered humanitarian access
46
+ - Release of hostages and prisoners
47
+ - Lifting of restrictions on Gaza
48
+ - Two-state solution based on pre-1967 borders
49
+ - International monitoring and accountability
50
 
51
+ ## πŸ€– Technical Details
 
 
52
 
53
+ - **Model**: Claude 3.5 Sonnet (claude-3-5-sonnet-20241022)
54
+ - **Countries**: 195 UN member states
55
+ - **Simulation Date**: October 9, 2025
56
+ - **Vote Distribution**:
57
+ - βœ… YES: 190 countries (97.4%)
58
+ - ❌ NO: 3 countries (1.5%)
59
+ - βšͺ ABSTAIN: 2 countries (1.0%)
60
 
61
+ ## πŸ” Explore the Results
62
 
63
+ Use the tabs above to:
64
+ - **Vote Summary**: See the overall voting distribution
65
+ - **Regional Analysis**: Compare how different regions voted
66
+ - **Country Details**: Read individual countries' votes and diplomatic statements
67
+ - **All Votes**: Browse the complete voting record
68
 
69
+ ## πŸŽ“ Educational Value
 
 
 
70
 
71
+ This simulation demonstrates:
72
+ - How AI can model complex geopolitical decision-making
73
+ - The diversity of international perspectives on contentious issues
74
+ - The role of historical context in diplomatic positions
75
+ - Multi-agent AI systems in action
76
 
77
+ ## ⚠️ Important Disclaimer
78
 
79
+ This is an AI simulation for research and educational purposes only. The positions expressed by the AI agents:
80
+ - Do NOT represent actual government policies
81
+ - Are NOT official diplomatic stances
82
+ - Should NOT be considered authoritative or predictive
83
+ - Are based on historical patterns, not current intentions
84
 
85
+ The simulation is designed to explore how AI models understand and represent different national perspectives based on publicly available information about countries' historical positions.
 
86
 
87
+ ## πŸ”— Links
 
 
88
 
89
+ - [GitHub Repository](https://github.com/yourusername/AI-Agent-UN)
90
+ - [Full Source Code](https://github.com/yourusername/AI-Agent-UN/blob/main/scripts/run_motion.py)
91
+ - [Agent System Prompts](https://github.com/yourusername/AI-Agent-UN/tree/main/agents/representatives)
92
 
93
+ ## 🀝 Contributing
 
 
94
 
95
+ This is an experimental research project. Contributions, suggestions, and discussions are welcome!
96
 
97
+ ---
98
 
99
+ Built with ❀️ using [Gradio](https://gradio.app) and [Claude](https://anthropic.com/claude)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README_GITHUB.md ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AI Agent UN
2
+ ![alt text](images/banner.jpg)
3
+
4
+
5
+ An experimental Model United Nations simulation populated by AI agents.
6
+
7
+ Each agent embodies the foreign policy positions, diplomatic style, and national interests of a specific country.
8
+
9
+ Motions can be run as tasks and using structured outputs both votes and supporting statements can be collected and then analysed.
10
+
11
+ ## Overview
12
+
13
+ This is an AI experiment designed to:
14
+ - Simulate international diplomatic interactions and negotiations
15
+ - Model how different countries might approach global issues based on their historical positions and national interests
16
+ - Explore multi-agent AI systems in complex geopolitical scenarios
17
+ - Provide an educational and research tool for understanding international relations dynamics
18
+
19
+ ## Project Structure
20
+
21
+ ```
22
+ AI-Agent-UN/
23
+ β”œβ”€β”€ agents/
24
+ β”‚ └── representatives/ # AI agent system prompts for each country
25
+ β”‚ β”œβ”€β”€ united-states/
26
+ β”‚ β”œβ”€β”€ china/
27
+ β”‚ β”œβ”€β”€ russia/
28
+ β”‚ └── ...
29
+ β”œβ”€β”€ data/
30
+ β”‚ └── bodies/ # UN membership data
31
+ β”œβ”€β”€ tasks/
32
+ β”‚ β”œβ”€β”€ motions/ # UN resolutions to vote on
33
+ β”‚ └── reactions/ # Simulation results (votes & statements)
34
+ β”œβ”€β”€ scripts/
35
+ β”‚ └── run_motion.py # Main simulation runner
36
+ β”œβ”€β”€ .env.example # Configuration template
37
+ └── requirements.txt # Python dependencies
38
+ ```
39
+
40
+ ## Quick Start
41
+
42
+ ### 1. Installation
43
+
44
+ ```bash
45
+ # Clone the repository
46
+ git clone https://github.com/yourusername/AI-Agent-UN.git
47
+ cd AI-Agent-UN
48
+
49
+ # Create virtual environment
50
+ python3 -m venv .venv
51
+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
52
+
53
+ # Install dependencies
54
+ pip install -r requirements.txt
55
+ ```
56
+
57
+ ### 2. Configuration
58
+
59
+ ```bash
60
+ # Copy the example environment file
61
+ cp .env.example .env
62
+
63
+ # Edit .env and add your API key
64
+ # For cloud API (OpenAI):
65
+ OPENAI_API_KEY=your_api_key_here
66
+ MODEL_NAME=gpt-4
67
+
68
+ # OR for local models (Ollama):
69
+ # Install Ollama from https://ollama.ai
70
+ # Pull a model: ollama pull llama3
71
+ ```
72
+
73
+ ### 3. Run a Motion Simulation
74
+
75
+ ```bash
76
+ # Run with cloud API (default)
77
+ python scripts/run_motion.py 01_gaza_ceasefire_resolution
78
+
79
+ # Run with local model
80
+ python scripts/run_motion.py 01_gaza_ceasefire_resolution --provider local
81
+
82
+ # Test with only 5 countries
83
+ python scripts/run_motion.py 01_gaza_ceasefire_resolution --sample 5
84
+ ```
85
+
86
+ ### 4. View Results
87
+
88
+ Results are saved in `tasks/reactions/` as JSON files:
89
+ - `{motion_id}_{timestamp}.json` - Timestamped result
90
+ - `{motion_id}_latest.json` - Always points to latest simulation
91
+
92
+ ## How It Works
93
+
94
+ 1. **Agent System Prompts**: Each country has a detailed system prompt in `agents/representatives/{country}/system-prompt.md` that defines their foreign policy positions and diplomatic style.
95
+
96
+ 2. **Motion Runner**: The `run_motion.py` script:
97
+ - Loads the motion text from `tasks/motions/`
98
+ - Queries each country's AI agent
99
+ - Collects votes (yes/no/abstain) and statements
100
+ - Saves results to `tasks/reactions/`
101
+
102
+ 3. **JSON-Constrained Output**: Each agent responds with structured JSON:
103
+ ```json
104
+ {
105
+ "vote": "yes",
106
+ "statement": "Brief explanation of position..."
107
+ }
108
+ ```
109
+
110
+ ## Available Motions
111
+
112
+ - `01_gaza_ceasefire_resolution` - Support for Ceasefire Agreement in Gaza and Commitment to Lasting Peace
113
+
114
+ ## AI Providers
115
+
116
+ ### Cloud API
117
+ - Supports OpenAI (GPT-4, GPT-3.5-turbo, etc.)
118
+ - Supports Anthropic Claude (with API key)
119
+ - Supports any OpenAI-compatible API
120
+
121
+ ### Local Models
122
+ - Uses Ollama for local inference
123
+ - Supports Llama 3, Mistral, Mixtral, and other Ollama models
124
+ - No API costs, complete privacy
125
+
126
+ ## Use Cases
127
+
128
+ - Educational demonstrations of international relations concepts
129
+ - Research into multi-agent AI behavior in diplomatic contexts
130
+ - Experimentation with large language models in structured debate scenarios
131
+ - Analysis of how AI systems model complex geopolitical positions
132
+
133
+ ## Contributing
134
+
135
+ This is an experimental project shared publicly for research, education, and collaborative development. Contributions are welcome!
136
+
137
+ ## License
138
+
139
+ [To be determined]
140
+
141
+ ## Disclaimer
142
+
143
+ This is a simulation for research and educational purposes. The AI agents' positions do not represent actual government policies or diplomatic stances. The simulation is designed to model how countries might approach issues based on their historical positions, but should not be considered authoritative or predictive.
README_HF.md DELETED
@@ -1,99 +0,0 @@
1
- ---
2
- title: AI Agent UN - Gaza Ceasefire Resolution
3
- emoji: πŸ‡ΊπŸ‡³
4
- colorFrom: blue
5
- colorTo: green
6
- sdk: gradio
7
- sdk_version: 4.44.0
8
- app_file: app.py
9
- pinned: false
10
- license: mit
11
- ---
12
-
13
- # πŸ‡ΊπŸ‡³ AI Agent UN: Gaza Ceasefire Resolution Simulation
14
-
15
- An experimental Model United Nations simulation where AI agents representing all 195 UN member states vote on a ceasefire resolution for Gaza.
16
-
17
- ## 🎯 The Concept
18
-
19
- This project explores how large language models can simulate international diplomatic interactions by creating AI agents that embody:
20
- - **Foreign policy positions** based on historical voting records
21
- - **Diplomatic style** reflecting each country's approach to multilateral diplomacy
22
- - **National interests** and regional alliances
23
- - **Cultural and ideological perspectives**
24
-
25
- ### How It Works
26
-
27
- 1. **Agent System Prompts**: Each of the 195 countries has a detailed system prompt that defines their:
28
- - Historical positions on Middle East conflicts
29
- - Key alliances and regional groupings
30
- - Economic and security interests
31
- - Past voting patterns on similar resolutions
32
-
33
- 2. **Structured Voting**: Each AI agent receives the ceasefire resolution text and responds with:
34
- - A vote: YES, NO, or ABSTAIN
35
- - A diplomatic statement explaining their position
36
-
37
- 3. **Analysis**: Votes are aggregated and analyzed by region, showing how different parts of the world approach the issue
38
-
39
- ## πŸ“Š The Resolution
40
-
41
- **Motion**: Support for Ceasefire Agreement in Gaza and Commitment to Lasting Peace
42
-
43
- The resolution calls for:
44
- - Immediate and comprehensive ceasefire
45
- - Unhindered humanitarian access
46
- - Release of hostages and prisoners
47
- - Lifting of restrictions on Gaza
48
- - Two-state solution based on pre-1967 borders
49
- - International monitoring and accountability
50
-
51
- ## πŸ€– Technical Details
52
-
53
- - **Model**: Claude 3.5 Sonnet (claude-3-5-sonnet-20241022)
54
- - **Countries**: 195 UN member states
55
- - **Simulation Date**: October 9, 2025
56
- - **Vote Distribution**:
57
- - βœ… YES: 190 countries (97.4%)
58
- - ❌ NO: 3 countries (1.5%)
59
- - βšͺ ABSTAIN: 2 countries (1.0%)
60
-
61
- ## πŸ” Explore the Results
62
-
63
- Use the tabs above to:
64
- - **Vote Summary**: See the overall voting distribution
65
- - **Regional Analysis**: Compare how different regions voted
66
- - **Country Details**: Read individual countries' votes and diplomatic statements
67
- - **All Votes**: Browse the complete voting record
68
-
69
- ## πŸŽ“ Educational Value
70
-
71
- This simulation demonstrates:
72
- - How AI can model complex geopolitical decision-making
73
- - The diversity of international perspectives on contentious issues
74
- - The role of historical context in diplomatic positions
75
- - Multi-agent AI systems in action
76
-
77
- ## ⚠️ Important Disclaimer
78
-
79
- This is an AI simulation for research and educational purposes only. The positions expressed by the AI agents:
80
- - Do NOT represent actual government policies
81
- - Are NOT official diplomatic stances
82
- - Should NOT be considered authoritative or predictive
83
- - Are based on historical patterns, not current intentions
84
-
85
- The simulation is designed to explore how AI models understand and represent different national perspectives based on publicly available information about countries' historical positions.
86
-
87
- ## πŸ”— Links
88
-
89
- - [GitHub Repository](https://github.com/yourusername/AI-Agent-UN)
90
- - [Full Source Code](https://github.com/yourusername/AI-Agent-UN/blob/main/scripts/run_motion.py)
91
- - [Agent System Prompts](https://github.com/yourusername/AI-Agent-UN/tree/main/agents/representatives)
92
-
93
- ## 🀝 Contributing
94
-
95
- This is an experimental research project. Contributions, suggestions, and discussions are welcome!
96
-
97
- ---
98
-
99
- Built with ❀️ using [Gradio](https://gradio.app) and [Claude](https://anthropic.com/claude)