{"id":43117000,"url":"https://github.com/sotopia-lab/sotopia","last_synced_at":"2026-02-11T16:01:36.647Z","repository":{"id":203342717,"uuid":"708991650","full_name":"sotopia-lab/sotopia","owner":"sotopia-lab","description":"Sotopia: an Open-ended Social Learning Environment (ICLR 2024 spotlight)","archived":false,"fork":false,"pushed_at":"2025-12-13T23:03:13.000Z","size":639935,"stargazers_count":267,"open_issues_count":21,"forks_count":40,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-12-15T18:56:55.531Z","etag":null,"topics":["large-language-models","llm-agent","machine-learning","reinforcement-learning-environments"],"latest_commit_sha":null,"homepage":"https://docs.sotopia.world","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sotopia-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-23T19:47:26.000Z","updated_at":"2025-12-13T22:33:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"e37032c7-6c61-482d-abe5-8c36934351c7","html_url":"https://github.com/sotopia-lab/sotopia","commit_stats":{"total_commits":118,"total_committers":9,"mean_commits":13.11111111111111,"dds":0.5593220338983051,"last_synced_commit":"c4fdb166bab6f20ee541c48dd614981d38303b19"},"previous_names":["sotopia-lab/sotopia"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/sotopia-lab/sotopia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sotopia-lab%2Fsotopia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sotopia-lab%2Fsotopia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sotopia-lab%2Fsotopia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sotopia-lab%2Fsotopia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sotopia-lab","download_url":"https://codeload.github.com/sotopia-lab/sotopia/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sotopia-lab%2Fsotopia/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29336999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T16:00:30.228Z","status":"ssl_error","status_checked_at":"2026-02-11T16:00:25.398Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["large-language-models","llm-agent","machine-learning","reinforcement-learning-environments"],"created_at":"2026-01-31T19:05:30.491Z","updated_at":"2026-02-11T16:01:36.634Z","avatar_url":"https://github.com/sotopia-lab.png","language":"Python","funding_links":[],"categories":["Datasets and Environments","Miscellaneous"],"sub_categories":[],"readme":"\u003cdiv style=\"width: 100%;\"\u003e\n  \u003cimg src=\"figs/title.png\" style=\"width: 100%;\" alt=\"sotopia\"\u003e\u003c/img\u003e\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003eSotopia: an Open-ended Social Learning Environment\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![pypi](https://img.shields.io/pypi/v/sotopia.svg)](https://pypi.python.org/pypi/sotopia)\n[![versions](https://img.shields.io/pypi/pyversions/sotopia.svg)](https://github.com/sotopia/sotopia)\n[![CI](https://img.shields.io/github/actions/workflow/status/sotopia-lab/sotopia/tests.yml?branch=main\u0026logo=github\u0026label=CI)](https://github.com/sotopia-lab/sotopia/actions?query=branch%3Amain)\n[![codecov](https://codecov.io/github/sotopia-lab/sotopia/graph/badge.svg?token=00LRQFX0QR)](https://codecov.io/github/sotopia-lab/sotopia)\n[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/14hJOfzpA37PRUzdlFgiqVzUGIhhngqnz?usp=sharing)\n\n[![Project Page](https://img.shields.io/badge/Project-Page-green.svg)](https://www.sotopia.world/projects/sotopia)\n[![Paper PDF](https://img.shields.io/badge/Paper-PDF-red.svg)](https://arxiv.org/abs/2310.11667)\n[![Dataset](https://img.shields.io/badge/%F0%9F%A4%97-Sotopia%20Dataset-yellow)](https://huggingface.co/datasets/cmu-lti/sotopia)\n[![Demo](https://img.shields.io/badge/%F0%9F%A4%97-Sotopia%20Demo-orange)](https://demo.sotopia.world)\n\n\n\n\u003c/div\u003e\n\n## News\n\n* [05/2024] Sotopia was presented at ICLR 2024 as a spotlight ⭐!\n\n\n## Introduction\n\nSotopia is an open-ended social learning environment that allows agents to interact with each other and the environment. The environment is designed to be a platform for evaluating and faciliating social intelligence in language agents. The environment is designed to be open-ended, meaning that the environment can be easily extended to include new environments and new agents. The environment is also designed to be scalable, meaning that the environment can be easily scaled to include a large number of agents and environments.\n\n\n```bibtex\n@inproceedings{zhou2024sotopia,\n  title = {SOTOPIA: Interactive Evaluation for Social Intelligence in Language Agents},\n  author = {Zhou*, Xuhui and Zhu*, Hao and Mathur, Leena and Zhang, Ruohong and Qi, Zhengyang and Yu, Haofei and Morency, Louis-Philippe and Bisk, Yonatan and Fried, Daniel and Neubig, Graham and Sap, Maarten},\n  journal = {ICLR},\n  year = {2024},\n  url = {https://openreview.net/forum?id=mM7VurbA4r},\n}\n```\n\n\n\n## Get started\n\n### Install locally\nWe recommend using a virtual environment, e.g. with uv: `pip install uv; uv sync --all-extras`.\n\n\u003e [!NOTE]\n\u003e You can of course use any other package manager to install the dependencies (e.g. pip, conda, etc.). But we strongly recommend using uv, especially for the development of Sotopia.\n\n\nThen:\n`uv run sotopia install`\n\n### Storage Backend Options\n\nSotopia supports two storage backends:\n\n1. **Redis (default)** - Recommended for production use\n   - Requires Redis server running\n   - We recommend using Docker: `docker run -d -p 6379:6379 redis/redis-stack-server:latest`\n   - Set via: `export SOTOPIA_STORAGE_BACKEND=redis` (or leave unset)\n\n2. **Local JSON** - Simpler setup for development/testing\n   - No external dependencies required\n   - Stores data in `~/.sotopia/data/`\n   - Set via: `export SOTOPIA_STORAGE_BACKEND=local`\n   - **Note**: Experimental framework features require Redis\n\n\u003e [!WARNING]\n\u003e For Redis setup, we recommend using Docker. Other installation methods have been shown to be error-prone.\n\n### Environment Variables\n\nSotopia uses environment variables for configuration. The recommended way to set them is using a `.env` file in the project root:\n\n```bash\n# Create a .env file\ncat \u003e .env \u003c\u003c EOF\n# Required: OpenAI API key\nOPENAI_API_KEY=your_openai_key_here\n\n# Storage backend: \"redis\" (default) or \"local\"\nSOTOPIA_STORAGE_BACKEND=local\n\n# Redis connection (only needed if using Redis backend)\n# REDIS_OM_URL=redis://localhost:6379\nEOF\n```\n\n**Environment Variables:**\n- `OPENAI_API_KEY` (required): Your OpenAI API key for running LLM-based simulations\n- `SOTOPIA_STORAGE_BACKEND` (optional): Storage backend - `\"redis\"` (default) or `\"local\"`\n- `REDIS_OM_URL` (optional): Redis connection string (default: `\"redis://localhost:6379\"`)\n\n**Loading Environment Variables:**\n\nWith `uv`:\n```bash\n# Option 1: Use --env-file flag\nuv run --env-file .env python examples/minimalist_demo.py\n\n# Option 2: Export manually\nexport $(cat .env | xargs) \u0026\u0026 uv run python examples/minimalist_demo.py\n```\n\nWith other tools (pip, conda):\n```bash\n# Export variables before running\nexport $(cat .env | xargs)\npython examples/minimalist_demo.py\n```\n\n\u003e [!NOTE]\n\u003e `uv` does not automatically load `.env` files. Use the `--env-file` flag or export variables manually.\n\n## Easy Sample Server\nYou can view an episode demo with default parameters with the following:\n```python\nimport asyncio\nfrom sotopia.samplers import UniformSampler\nfrom sotopia.server import run_async_server\n\nasyncio.run(\n    run_async_server(\n        model_dict={\n            \"env\": \"gpt-4\",\n            \"agent1\": \"gpt-4o-mini\",\n            \"agent2\": \"gpt-4o-mini\",\n        },\n        sampler=UniformSampler(),\n    )\n)\n```\n\u003e [!WARNING]\n\u003e You won't be able to run the server locally if you don't have any datasets installed.\n\nor run\n```bash\npython examples/minimalist_demo.py\n```\n\n## Help\n\n\u003e [!IMPORTANT]\n\u003e If you are trying to develop on top of Sotopia, we highly recommend to follow the [development guide](https://docs.sotopia.world/contribution/contribution), but cross-reference with this README for latest changes as the documentation may be outdated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsotopia-lab%2Fsotopia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsotopia-lab%2Fsotopia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsotopia-lab%2Fsotopia/lists"}