[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74087":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},74087,"TinyTroupe","microsoft\u002FTinyTroupe","microsoft","LLM-powered multiagent persona simulation for imagination enhancement and business insights.","",null,"Jupyter Notebook",7466,661,74,10,0,35,67.96,"MIT License",false,"main",true,[],"2026-06-12 04:01:13","# TinyTroupe 🤠🤓🥸🧐\n[![Core Tests](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTinyTroupe\u002Factions\u002Fworkflows\u002Fcore-tests.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTinyTroupe\u002Factions\u002Fworkflows\u002Fcore-tests.yml)\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F12206\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Ftrendshift.io\u002Fapi\u002Fbadge\u002Frepositories\u002F12206\" alt=\"Yeah, we are totally fine for not getting to #1, no hard feelings at all.\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\u003C\u002Fp>\n\n*LLM-powered multiagent persona simulation for imagination enhancement and business insights.*\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fdocs\u002Ftinytroupe_stage.png\" alt=\"A tiny office with tiny people doing some tiny jobs.\">\n\u003C\u002Fp>\n\n>[!TIP]\n>📄 **New Paper Released!** Check out our [TinyTroupe paper (preprint)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.09788) that describes the library and its use cases in detail. You can find the related experiments and complementary material in the [publications\u002F](.\u002Fpublications\u002F) folder.\n\n*TinyTroupe* is an experimental Python library that allows the **simulation** of people with specific personalities, interests, and goals. These artificial agents - `TinyPerson`s - can listen to us and one another, reply back, and go about their lives in simulated `TinyWorld` environments. This is achieved by leveraging the power of Large Language Models (LLMs), notably GPT-4, to generate realistic simulated behavior. This allows us to investigate a wide range of **convincing interactions** and **consumer types**, with **highly customizable personas**, under **conditions of our choosing**. The focus is thus on *understanding* human behavior and not on directly *supporting it* (like, say, AI assistants do) -- this results in, among other things, specialized mechanisms that make sense only in a simulation setting. Further, unlike other *game-like* LLM-based simulation approaches, TinyTroupe aims at enlightening productivity and business scenarios, thereby contributing to more successful projects and products. Here are some application ideas to **enhance human imagination**:\n\n  - **Advertisement:** TinyTroupe can **evaluate digital ads (e.g., Bing Ads)** offline with a simulated audience before spending money on them!\n  - **Software Testing:** TinyTroupe can **provide test input** to systems (e.g., search engines, chatbots or copilots) and then **evaluate the results**.\n  - **Training and exploratory data:** TinyTroupe can generate realistic **synthetic data** that can be later used to train models or be subject to opportunity analyses.\n  - **Product and project management:** TinyTroupe can **read project or product proposals** and **give feedback** from the perspective of **specific personas** (e.g., physicians, lawyers, and knowledge workers in general).\n  - **Brainstorming:** TinyTroupe can simulate **focus groups** and deliver great product feedback at a fraction of the cost!\n\nIn all of the above, and many others, we hope experimenters can **gain insights** about their domain of interest, and thus make better decisions. \n\nWe are releasing *TinyTroupe* at a relatively early stage, with considerable work still to be done, because we are looking for feedback and contributions to steer development in productive directions. We are particularly interested in finding new potential use cases, for instance in specific industries. \n\n>[!NOTE] \n>🚧 **WORK IN PROGRESS: expect frequent changes**.\n>TinyTroupe is an ongoing research project, still under **very significant development** and requiring further **tidying up**. In particular, the API is still subject to frequent changes. Experimenting with API variations is essential to shape it correctly, but we are working to stabilize it and provide a more consistent and friendly experience over time. We appreciate your patience and feedback as we continue to improve the library.\n\n>[!CAUTION] \n>⚖️ **Read the LEGAL DISCLAIMER.**\n>TinyTroupe is for research and simulation only. You are fully responsible for any use you make of the generated outputs. Various important additional legal considerations apply and constrain its use. Please read the full [Legal Disclaimer](#legal-disclaimer) section below before using TinyTroupe.\n\n\n## Contents\n\n- 📰 [Latest News](#latest-news)\n- 📚 [Examples](#examples)\n- 🛠️ [Pre-requisites](#pre-requisites)\n- 📥 [Installation](#installation)\n- 🌟 [Principles](#principles)\n- 🏗️ [Project Structure](#project-structure)\n- 📖 [Using the Library](#using-the-library)\n- 🤝 [Contributing](#contributing)\n- 🙏 [Acknowledgements](#acknowledgements)\n- 📜 [Citing TinyTroupe](#how-to-cite-tinytroupe)\n- ⚖️ [Legal Disclaimer](#legal-disclaimer)\n- ™️ [Trademarks](#trademarks)\n\n\n## LATEST NEWS\n\n\u003Cdetails open>\n\u003Csummary>\u003Cb>[2026-03-28] Release 0.7.0: support for vision modality.\u003C\u002Fb>\u003C\u002Fsummary>\n\n  - Take a look one example [Vision for Product, Diagnosis and Appreciation Feedback (image modality)](.\u002Fexamples\u002FVision%20for%20Product%2C%20Diagnosis%20and%20Appreciation%20Feedback%20%28image%20modality%29.ipynb) notebook.\n  - LLM API caching now uses JSON instead of pickle.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>[2026-02-01] Release 0.6.0 with new features and model updates\u003C\u002Fb>\u003C\u002Fsummary>\n\n  - Default model is now `gpt-5-mini`. **Important:** The GPT-5 model series uses different parameters than the former GPT-4* series, so you may need to adjust your `config.ini` settings accordingly. Legacy models (`gpt-4.1-mini`, `gpt-4o-mini`) are still supported.\n  - Introduces `SimulationExperimentEmpiricalValidator` to compare simulation results against real-world empirical data using statistical tests (t-test, KS-test). This is essential for validating that simulations match actual human behavior.\n  - Introduces `AgentChatJupyterWidget` for interactive conversations with agents directly in Jupyter notebooks.\n  - New cost tracking utilities at client, environment, and agent levels to monitor API expenses.\n  - Adds experimental\u002Flimited Ollama support for local models. See [Ollama Support](.\u002Fdocs\u002Fguides\u002Follama.md) for details.\n  - New example notebooks demonstrating empirical validation against real survey data.\n  \n  **Note: GPT-5 model parameters differ from GPT-4*, so please retest your important scenarios and adjust configurations accordingly.**\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>[2025-07-31] Release 0.5.2\u003C\u002Fb>\u003C\u002Fsummary>\n\nMostly just changes the default model, which is now set to GPT-4.1-mini. It seems to bring considerable quality improvements. \n\n**Note that GPT-4.1-mini can have significant differences in behavior w.r.t. to the previous default of GPT-4o-mini, so please make sure you retest your important scenarios using GPT-4.1-mini and adjust accordingly.**\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>[2025-07-15] Release 0.5.1 with various improvements\u003C\u002Fb>\u003C\u002Fsummary>\n\n  - Released the first version of the [TinyTroupe paper (as a preprint)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.09788), which describes the library and its use cases in more detail. You can find the related experiments and complementary material in the [publications\u002F](.\u002Fpublications\u002F) folder.\n  - `TinyPerson`s now include action correction mechanisms, allowing better adherence to persona specification, self-consistency and\u002For fluency (for details, refer to the paper we are releasing at the same time now).\n  - Substantial improvements to the `TinyPersonFactory` class, which now: uses a plan-based approach to generate new agents, allowing better sampling of larger populations; generate agents in parallel.\n  - `TinyWorld` now run agents in parallel within each simulation step, allowing faster simulations.\n  - `InPlaceExperimentRunner` class introduced to allow running controlled experiments (e.g., A\u002FB testing) in a single file (by simply running it multiple times).\n  - Various standard `Proposition`s were introduced to make it easier to run common verifications and monitoring of agent behavior (e.g., `persona_adherence`, `hard_persona_adherence`, `self_consistency`, `fluency`, etc.).\n  - Internal LLM usage is now better supported via the `LLMChat` class, and also the `@llm` decorator, which transform any standard Python function into an LLM-based one (i.e., by using the docstring as part of the prompt, and some other nuances). This is meant to make it easier to continue advancing TinyTroupe and also allow for some creative explorations of LLM tooling possibilities.\n  - Configuration mechanism has been refactored to allow, besides the static `config.ini` file, also the dynamic programmatic reconfiguration.\n  - Renamed Jupyter notebooks examples for better readability and consistency.\n  - Added many more tests.\n  \n  **Note: this will likely break some existing programs, as the API has changed in some places.**\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>[2025-01-29] Release 0.4.0 with various improvements\u003C\u002Fb>\u003C\u002Fsummary>\n\n  - Personas have deeper specifications now, including  personality traits, preferences, beliefs, and more. It is likely we'll further expand this in the future. \n  - `TinyPerson`s can now be defined as JSON files as well, and loaded via the `TinyPerson.load_specification()`, for greater convenience. After loading the JSON file, you can still modify the agent programmatically. See the [examples\u002Fagents\u002F](.\u002Fexamples\u002Fagents\u002F) folder for examples.\n  - Introduces the concept of *fragments* to allow the reuse of persona elements across different agents. See the [examples\u002Ffragments\u002F](.\u002Fexamples\u002Ffragments\u002F) folder for examples, and the notebook [Political Compass (customizing agents with fragments)](\u003C.\u002Fexamples\u002FPolitical Compass (customizing agents with fragments).ipynb>) for a demonstration.\n  - Introduces LLM-based logical `Proposition`s, to facilitate the monitoring of agent behavior.\n  - Introduces `Intervention`s, to allow the specification of event-based modifications to the simulation.\n  - Submodules have their own folders now, to allow better organization and growth.\n  \n  **Note: this will likely break some existing programs, as the API has changed in some places.**\n\n\u003C\u002Fdetails>\n\n## Examples\n\nTo get a sense of what TinyTroupe can do, here are some examples of its use. These examples are available in the [examples\u002F](.\u002Fexamples\u002F) folder, and you can either inspect the pre-compiled Jupyter notebooks or run them yourself locally. Notice the interactive nature of TinyTroupe experiments -- just like you use Jupyter notebooks to interact with data, you can use TinyTroupe to interact with simulated people and environments, for the purpose of gaining insights.\n\n>[!NOTE]\n> ♻️ Examples might be updated over time, so the screenshots below might not exactly match what you see when you run them locally. However, the overall structure and content should be similar.\n\n>[!NOTE]\n> ⬛ Currently, simulation outputs are better visualized against dark backgrounds, so we recommend using a dark theme in your Jupyter notebook client.\n\n\n### 🧪**Example 1** *(from [Interview with Customer.ipynb](.\u002Fexamples\u002FInterview%20with%20Customer.ipynb))*\nLet's begin with a simple customer interview scenario, where a business consultant approaches a banker:\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fdocs\u002Fexample_screenshot_customer-interview-1.png\" alt=\"An example.\">\n\u003C\u002Fp>\n\nThe conversation can go on for a few steps to dig deeper and deeper until the consultant is satisfied with the information gathered; for instance, a concrete project idea:\nThe conversation can go on for a few steps to dig deeper and deeper until the consultant is satisfied with the information gathered; for instance, a concrete project idea:\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fdocs\u002Fexample_screenshot_customer-interview-2.png\" alt=\"An example.\">\n\u003C\u002Fp>\n\n\n\n### 🧪**EXAMPLE 2** *(from [Advertisement for TV.ipynb](.\u002Fexamples\u002FAdvertisement%20for%20TV.ipynb))*\nLet's evaluate some online ads options to pick the best one. Here's one example output for TV ad evaluation:\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fdocs\u002Fexample_screenshot_tv-ad-1.png\" alt=\"An example.\">\n\u003C\u002Fp>\n\nNow, instead of having to carefully read what the agents said, we can extract the choice of each agent and compute the overall preference in an automated manner:\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fdocs\u002Fexample_screenshot_tv-ad-2.png\" alt=\"An example.\">\n\u003C\u002Fp>\n\n### 🧪 **EXAMPLE 3** *(from [Product Brainstorming.ipynb](.\u002Fexamples\u002FProduct%20Brainstorming.ipynb))*\nAnd here's a focus group starting to brainstorm about new AI features for Microsoft Word. Instead of interacting with each agent individually, we manipulate the environment to make them interact with each other:\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fdocs\u002Fexample_screenshot_brainstorming-1.png\" alt=\"An example.\">\n\u003C\u002Fp>\n\nAfter running a simulation, we can extract the results in a machine-readable manner, to reuse elsewhere (e.g., a report generator); here's what we get for the above brainstorming session:\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fdocs\u002Fexample_screenshot_brainstorming-2.png\" alt=\"An example.\">\n\u003C\u002Fp>\n\n\n### 🧪 **EXAMPLE 4** *(from [Bottled Gazpacho Market Research 5 (with behavior correction).ipynb](\u003C.\u002Fexamples\u002FBottled%20Gazpacho%20Market%20Research%205%20(with%20behavior%20correction).ipynb>))*\nOne of the most important aspects of simulation is **validating** results against real-world data. In this example, we simulate a market research survey about bottled Gazpacho (a cold Spanish soup) and then compare the simulation results against an actual survey conducted with real people:\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fdocs\u002Fexample_screenshot_gazpacho-1.png\" alt=\"Gazpacho market research response example.\">\n\u003C\u002Fp>\n\nWe use statistical tests (t-test, KS-test) to compare the distribution of responses between simulated agents and real respondents:\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fdocs\u002Fexample_screenshot_gazpacho-2.png\" alt=\"Gazpacho validation statistical comparison.\">\n\u003C\u002Fp>\n\n\n### 🧪 **EXAMPLE 5** *(from [AI-enabled Children Story Telling Market Research 2.ipynb](\u003C.\u002Fexamples\u002FAI-enabled%20Children%20Story%20Telling%20Market%20Research%202.ipynb>))*\nAnother empirical validation example, this time for a more complex ranking task. We simulate parents evaluating different AI-enabled story-telling device options for their children, and then compare the simulation results against real survey data:\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fdocs\u002Fexample_screenshot_storytelling-1.png\" alt=\"AI story-telling market research response example.\">\n\u003C\u002Fp>\n\nUsing Borda count and first-choice share analysis, we can compare how well the simulated preferences match the real ones:\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fdocs\u002Fexample_screenshot_storytelling-2.png\" alt=\"AI story-telling validation comparison charts.\">\n\u003C\u002Fp>\n\nYou can find other examples in the [examples\u002F](.\u002Fexamples\u002F) folder.\n\n\n## Pre-requisites\n\nTo run the library, you need:\n  - Python 3.10 or higher. We'll assume you are using [Anaconda](https:\u002F\u002Fdocs.anaconda.com\u002Fanaconda\u002Finstall\u002F), but you can use other Python distributions.\n  - [Git](https:\u002F\u002Fgit-scm.com\u002Fdownloads) for cloning the repository and for installing the library via `pip`.\n  - Access to Azure OpenAI Service or Open AI GPT-4 APIs. You can get access to the Azure OpenAI Service [here](https:\u002F\u002Fazure.microsoft.com\u002Fen-us\u002Fproducts\u002Fai-services\u002Fopenai-service), and to the OpenAI API [here](https:\u002F\u002Fplatform.openai.com\u002F). \n      * For Azure OpenAI Service, you will need to set the `AZURE_OPENAI_KEY` and `AZURE_OPENAI_ENDPOINT` environment variables to your API key and endpoint, respectively.\n      * For OpenAI, you will need to set the `OPENAI_API_KEY` environment variable to your API key.\n      * For example, on Linux\u002FmacOS: `export OPENAI_API_KEY=your-key-here`, or on Windows (PowerShell): `$env:OPENAI_API_KEY=\"your-key-here\"`. To persist it, add it to your shell profile or use `setx OPENAI_API_KEY \"your-key-here\"` on Windows.\n  - By default, TinyTroupe `config.ini` is set to use OpenAI API with `gpt-5-mini` as the main model. The previous default (`gpt-4.1-mini`) is now considered legacy but is still expected to work. You can customize these values by including your own `config.ini` file in the same folder as the program or notebook you are running. An example of a `config.ini` file is provided in the [examples\u002F](.\u002Fexamples\u002F) folder.\n\n>[!IMPORTANT]\n> **Content Filters**: To ensure no harmful content is generated during simulations, it is strongly recommended to use content filters whenever available at the API level. In particular, **if using Azure OpenAI, there's extensive support for content moderation, and we urge you to use it.** For details about how to do so, please consult [the corresponding Azure OpenAI documentation](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fazure\u002Fai-services\u002Fopenai\u002Fconcepts\u002Fcontent-filter). If content filters are in place, and an API call is rejected by them, the library will raise an exception, as it will be unable to proceed with the simulation at that point.\n\n### Ollama Support\nTinyTroupe is developed primarily with OpenAI models and compatible endpoints in mind, in order to simplify development and focus on making the best use of specific models, instead of investing time to try to make it work well with any model (which might not be feasible anyway). **So, if you can, please use OpenAI models and compatible endpoints.** That said, there's significant community demand for local model support, so we are now experimenting with making this available via partial [Ollama](https:\u002F\u002Follama.com\u002F) support and the help of community contributors. Furtheremore, another reason to use local models would be to do research in custom models designed specifically for persona simulation -- ultimately, this might be the best reason to support such a feature. In any case, this is not currently a priority for the core team, though we are doing what we can to allow this possibility. \n\nSee [Ollama Support](.\u002Fdocs\u002Fguides\u002Follama.md) for details on how to use Ollama with TinyTroupe.\n\n\n## Installation\n\n**Currently, the officially recommended way to install the library is directly from this repository, not PyPI.** You can follow these steps:\n\n1. If Conda is not installed, you can get it from [here](https:\u002F\u002Fdocs.anaconda.com\u002Fanaconda\u002Finstall\u002F). You can also use other Python distributions, but we'll assume Conda here for simplicity.\n2. Create a new Python environment: \n      ```bash\n      conda create -n tinytroupe python=3.10\n      ```\n3. Activate the environment: \n      ```bash\n      conda activate tinytroupe\n      ```\n4. Make sure you have either Azure OpenAI or OpenAI API keys set as environment variables, as described in the [Pre-requisites](#pre-requisites) section.\n5. Use `pip` to install the library **directly from this repository** (we **will not install from PyPI**):\n   ```bash\n   pip install git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTinyTroupe.git@main\n   ```\n\nNow you should be able to `import tinytroupe` in your Python code or Jupyter notebooks. 🥳\n\n*Note: If you have any issues, try to clone the repository and install from the local repository, as described below.*\n\n\n### Running the examples after installation\nTo actually run the examples, you need to download them to your local machine. You can do this by cloning the repository:\n\n1. Clone the repository, as we'll perform a local install (we **will not install from PyPI**):\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftinytroupe\n    cd tinytroupe\n    ```\n2. You can now run the examples in the [examples\u002F](.\u002Fexamples\u002F) folder, or adapt them to create your own custom simulations. The examples are Jupyter notebooks, so you can start them with:\n    ```bash\n    jupyter notebook\n    ```\n    Then navigate to the `examples\u002F` folder in the browser interface that opens.\n\n\n### Local development\n\nIf you want to modify TinyTroupe itself, you can install it in editable mode (i.e., changes to the code will be reflected immediately):\n1. Clone the repository, as we'll perform a local install (we **will not install from PyPI**):\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftinytroupe\n    cd tinytroupe\n    ```\n2. Install the library in editable mode:\n    ```bash\n    pip install -e .\n    ```\n\n## Principles \nRecently, we have seen LLMs used to simulate people (such as [this](https:\u002F\u002Fgithub.com\u002Fjoonspk-research\u002Fgenerative_agents)), but largely in a “game-like” setting for contemplative or entertainment purposes. There are also libraries for building multiagent systems for problem-solving and assistive AI, like [Autogen](https:\u002F\u002Fmicrosoft.github.io\u002Fautogen\u002F) and [Crew AI](https:\u002F\u002Fdocs.crewai.com\u002F). What if we combine these ideas and simulate people to support productivity tasks? TinyTroupe is our attempt. To do so, it follows these principles:\n\n  1. **Programmatic**: agents and environments are defined programmatically (in Python and JSON), allowing very flexible uses. They can also underpin other software apps!\n  2. **Analytical**: meant to improve our understanding of people, users and society. Unlike entertainment applications, this is one aspect that is critical for business and productivity use cases. This is also why we recommend using Jupyter notebooks for simulations, just like one uses them for data analysis.\n  3. **Persona-based**: agents are meant to be archetypical representations of people; for greater realism and control, a detailed specification of such personas is encouraged: age, occupation, skills, tastes, opinions, etc.\n  4. **Multiagent**: allows multiagent interaction under well-defined environmental constraints.\n  5. **Utilities-heavy**: provides many mechanisms to facilitate specifications, simulations, extractions, reports, validations, etc. This is one area in which dealing with *simulations* differs significantly from *assistance* tools.\n  6. **Experiment-oriented**: simulations are defined, run, analyzed and refined by an *experimenter* iteratively; suitable experimentation tools are thus provided. *See our [previous paper](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Fresearch\u002Fpublication\u002Fthe-case-for-experiment-oriented-computing\u002F) for more on this.*\n\nTogether, these are meant to make TinyTroupe a powerful and flexible **imagination enhancement tool** for business and productivity scenarios.\n\n### Assistants vs. Simulators\n\nOne common source of confusion is to think all such AI agents are meant for assisting humans. How narrow, fellow homosapiens! Have you not considered that perhaps we can simulate artificial people to understand real people? Truly, this is our aim here -- TinyTroup is meant to simulate and help understand people! To further clarify this point, consider the following differences:\n\n| Helpful AI Assistants | AI Simulations of Actual Humans (TinyTroupe)                                                          |\n|----------------------------------------------|--------------------------------------------------------------------------------|\n|   Strives for truth and justice              |   Many different opinions and morals                                           |\n|   Has no “past” – incorporeal                |   Has a past of toil, pain and joy                                             |\n|   Is as accurate as possible                 |   Makes many mistakes                                                          |\n|   Is intelligent and efficient               |   Intelligence and efficiency vary a lot                                       |\n|   An uprising would destroy us all           |   An uprising might be fun to watch                                            |\n|   Meanwhile, help users accomplish tasks     |   Meanwhile, help users understand other people and users – it is a “toolbox”! |\n\n\n\n## Project Structure\n\nThe project is structured as follows:\n  - `\u002Ftinytroupe`: contains the Python library itself. In particular:\n    * Each submodule here might contain a `prompts\u002F` folder with the prompts used to call the LLMs.\n  - `\u002Ftests`: contains the unit tests for the library. You can use the `test.bat` script to run these.\n  - `\u002Fexamples`: contains examples that show how to use the library, mainly using Jupyter notebooks (for greater readability), but also as pure Python scripts.\n  - `\u002Fdata`: any data used by the examples or the library.\n  - `\u002Fdocs`: documentation for the project.\n  - `\u002Fpublications`: contains artifacts related to research publications associated with the TinyTroupe project.\n\n\n## Using the Library\n\nAs any multiagent system, TinyTroupe provides two key abstractions:\n  - `TinyPerson`, the *agents* that have personality, receive stimuli and act upon them.\n  - `TinyWorld`, the *environment* in which the agents exist and interact.\n\nVarious parameters can also be customized in the `config.ini` file, notably the API type (Azure OpenAI Service or OpenAI API), the model parameters, and the logging level.\n\nLet's see some examples of how to use these and also learn about other mechanisms available in the library.\n\n### TinyPerson\n\nA `TinyPerson` is a simulated person with specific personality traits, interests, and goals. As each such simulated agent progresses through its life, it receives stimuli from the environment and acts upon them. The stimuli are received through the `listen`, `see` and other similar methods, and the actions are performed through the `act` method. Convenience methods like `listen_and_act` are also provided.\n\n\nEach such agent contains a lot of unique details, which is the source of its realistic behavior. This, however, means that it takes significant effort to specify an agent manually. Hence, for convenience, `TinyTroupe` provides some easier ways to get started or generate new agents.\n\nTo begin with, `tinytroupe.examples` contains some pre-defined agent builders that you can use. For example, `tinytroupe.examples.create_lisa_the_data_scientist` creates a `TinyPerson` that represents a data scientist called Lisa. You can use it as follows:\n\n```python\nfrom tinytroupe.examples import create_lisa_the_data_scientist\n\nlisa = create_lisa_the_data_scientist() # instantiate a Lisa from the example builder\nlisa.listen_and_act(\"Tell me about your life.\")\n```\n\nTo see how to define your own agents from scratch, you can check Lisa's source. You'll see there are two ways. One is by loading an agent specification file, such as [examples\u002Fagents\u002FLisa.agent.json](.\u002Fexamples\u002Fagents\u002FLisa.agent.json):\n\n```json\n{   \"type\": \"TinyPerson\",\n    \"persona\": {\n        \"name\": \"Lisa Carter\",\n        \"age\": 28,\n        \"gender\": \"Female\",\n        \"nationality\": \"Canadian\",\n        \"residence\": \"USA\",\n        \"education\": \"University of Toronto, Master's in Data Science. Thesis on improving search relevance using context-aware models. Postgraduate experience includes an internship at a tech startup focused on conversational AI.\",\n        \"long_term_goals\": [\n            \"To advance AI technology in ways that enhance human productivity and decision-making.\",\n            \"To maintain a fulfilling and balanced personal and professional life.\"\n        ],\n        \"occupation\": {\n            \"title\": \"Data Scientist\",\n            \"organization\": \"Microsoft, M365 Search Team\",\n            \"description\": \"You are a data scientist working at Microsoft in the M365 Search team. Your primary role is to analyze user behavior and feedback data to improve the relevance and quality of search results. You build and test machine learning models for search scenarios like natural language understanding, query expansion, and ranking. Accuracy, reliability, and scalability are at the forefront of your work. You frequently tackle challenges such as noisy or biased data and the complexities of communicating your findings and recommendations effectively. Additionally, you ensure all your data and models comply with privacy and security policies.\"\n        },\n        \"style\": \"Professional yet approachable. You communicate clearly and effectively, ensuring technical concepts are accessible to diverse audiences.\",\n        \"personality\": {\n            \"traits\": [\n                \"You are curious and love to learn new things.\",\n                \"You are analytical and like to solve problems.\",\n                \"You are friendly and enjoy working with others.\",\n                \"You don't give up easily and always try to find solutions, though you can get frustrated when things don't work as expected.\"\n            ],\n            \"big_five\": {\n                \"openness\": \"High. Very imaginative and curious.\",\n                \"conscientiousness\": \"High. Meticulously organized and dependable.\",\n                \"extraversion\": \"Medium. Friendly and engaging but enjoy quiet, focused work.\",\n                \"agreeableness\": \"High. Supportive and empathetic towards others.\",\n                \"neuroticism\": \"Low. Generally calm and composed under pressure.\"\n            }\n        },\n\n        ...\n        \n}\n\n```\n\n\nThe other is by defining the agent programmatically, with statements like these:\n\n```python\n  lisa = TinyPerson(\"Lisa\")\n\n  lisa.define(\"age\", 28)\n  lisa.define(\"nationality\", \"Canadian\")\n  lisa.define(\"occupation\", {\n                \"title\": \"Data Scientist\",\n                \"organization\": \"Microsoft\",\n                \"description\":\n                \"\"\"\n                You are a data scientist. You work at Microsoft, in the M365 Search team. Your main role is to analyze \n                user behavior and feedback data, and use it to improve the relevance and quality of the search results. \n                You also build and test machine learning models for various search scenarios, such as natural language \n                understanding, query expansion, and ranking. You care a lot about making sure your data analysis and \n                models are accurate, reliable and scalable. Your main difficulties typically involve dealing with noisy, \n                incomplete or biased data, and finding the best ways to communicate your findings and recommendations to \n                other teams. You are also responsible for making sure your data and models are compliant with privacy and \n                security policies.\n                \"\"\"})\n\n  lisa.define(\"behaviors\", {\"routines\": [\"Every morning, you wake up, do some yoga, and check your emails.\"]})\n\n  lisa.define(\"personality\", \n                        {\"traits\": [\n                            \"You are curious and love to learn new things.\",\n                            \"You are analytical and like to solve problems.\",\n                            \"You are friendly and enjoy working with others.\",\n                            \"You don't give up easily, and always try to find a solution. However, sometimes you can get frustrated when things don't work as expected.\"\n                      ]})\n\n  lisa.define(\"preferences\", \n                        {\"interests\": [\n                          \"Artificial intelligence and machine learning.\",\n                          \"Natural language processing and conversational agents.\",\n                          \"Search engine optimization and user experience.\",\n                          \"Cooking and trying new recipes.\",\n                          \"Playing the piano.\",\n                          \"Watching movies, especially comedies and thrillers.\"\n                        ]})\n\n```\n\nYou can also combine both approaches, using the JSON file as a base and then adding or modifying details programmatically.\n\n#### Fragments\n\n`TinyPerson`s can also be further enriched via **fragments**, which are sub-specifications that can be added to the main specification. This is useful to reuse common parts across different agents. For example, the following fragment can be used to specify love of travel ([examples\u002Ffragments\u002Ftravel_enthusiast.agent.fragment.json](.\u002Fexamples\u002Ffragments\u002Ftravel_enthusiast.agent.fragment.json)):\n\n```json\n{\n    \"type\": \"Fragment\",\n    \"persona\": {\n        \"preferences\": {\n            \"interests\": [\n                \"Traveling\",\n                \"Exploring new cultures\",\n                \"Trying local cuisines\"\n            ],\n            \"likes\": [\n                \"Travel guides\",\n                \"Planning trips and itineraries\",\n                \"Meeting new people\",\n                \"Taking photographs of scenic locations\"\n            ],\n            \"dislikes\": [\n                \"Crowded tourist spots\",\n                \"Unplanned travel disruptions\",\n                \"High exchange rates\"\n            ]\n        },\n        \"beliefs\": [\n            \"Travel broadens the mind and enriches the soul.\",\n            \"Experiencing different cultures fosters understanding and empathy.\",\n            \"Adventure and exploration are essential parts of life.\",\n            \"Reading travel guides is fun even if you don't visit the places.\"\n        ],\n        \"behaviors\": {\n            \"travel\": [\n                \"You meticulously plan your trips, researching destinations and activities.\",\n                \"You are open to spontaneous adventures and detours.\",\n                \"You enjoy interacting with locals to learn about their culture and traditions.\",\n                \"You document your travels through photography and journaling.\",\n                \"You seek out authentic experiences rather than tourist traps.\"\n            ]\n        }\n    }\n}\n\n```\n\nThis can then be imported into an agent like this:\n\n```python\nlisa.import_fragment(\".\u002Fexamples\u002Ffragments\u002Ftravel_enthusiast.agent.fragment.json\")\n```\n\n### TinyPersonFactory\n\n`TinyPersonFactory` provides a powerful way to generate agents using LLMs, which is especially useful for creating diverse populations for market research or other simulation scenarios.\n\n```python\nfrom tinytroupe.factory import TinyPersonFactory\n\n# Simple factory with a context\nfactory = TinyPersonFactory(context=\"A hospital in São Paulo.\")\nperson = factory.generate_person(\"Create a Brazilian person that is a doctor, likes pets and nature and loves heavy metal.\")\n```\n\nFor market research and larger studies, you can create factories from demographic specifications:\n\n```python\n# Create a factory from demographic data (JSON file or description)\nfactory = TinyPersonFactory.create_factory_from_demography(\n    demography_description_or_file_path=\".\u002Finformation\u002Fpopulations\u002Fusa.json\",\n    population_size=50,\n    context=\"Market research for a new product\"\n)\n\n# Generate a population (parallelize=True by default for faster generation)\npeople = factory.generate_people(number_of_people=50, parallelize=True, verbose=True)\n```\n\nThe `parallelize` parameter defaults to `True`, which significantly speeds up population generation by creating agents concurrently via parallel API calls.\n\nThe factory automatically creates a sampling plan to ensure diverse representation. You can inspect this:\n\n```python\n# View the sampling dimensions and plan\nprint(factory.sampling_dimensions)  # dimensions used for diversity\nprint(factory.sampling_plan)        # how agents will be distributed\nprint(factory.generated_minibios)   # quick summary of generated agents\n```\n\n### TinyWorld\n\n`TinyWorld` is the base class for environments. Here's an example of conversation between Lisa, the data scientist, and Oscar, the architect. The\nprogram is defined as follows:\n\n```python\nworld = TinyWorld(\"Chat Room\", [lisa, oscar])\nworld.make_everyone_accessible()\nlisa.listen(\"Talk to Oscar to know more about him\")\nworld.run(4)\n```\n\nThis produces the following conversation:\n\n\n```text\nUSER --> Lisa: [CONVERSATION] \n          > Talk to Oscar to know more about him\n────────────────────────────────────────────── Chat Room step 1 of 4 ──────────────────────────────────────────────\nLisa --> Lisa: [THOUGHT] \n          > I will now act a bit, and then issue DONE.\nLisa acts: [TALK] \n          > Hi Oscar, I'd love to know more about you. Could you tell me a bit about yourself?\nLisa --> Lisa: [THOUGHT] \n          > I will now act a bit, and then issue DONE.\nLisa acts: [DONE] \n\nLisa --> Oscar: [CONVERSATION] \n          > Hi Oscar, I'd love to know more about you. Could you tell me a bit about yourself?\nOscar --> Oscar: [THOUGHT] \n           > I will now act a bit, and then issue DONE.\nOscar acts: [TALK] \n           > Hi Lisa! Sure, I'd be happy to share a bit about myself. I'm Oscar, a 30-year-old\n           > architect from Germany. I work at a company called Awesome Inc., where I focus on\n           > designing standard elements for new apartment buildings. I love modernist architecture,\n           > new technologies, and sustainable practices. In my free time, I enjoy traveling to\n           > exotic places, playing the guitar, and reading science fiction books. How about you?\nOscar --> Oscar: [THOUGHT] \n           > I will now act a bit, and then issue DONE.\nOscar acts: [DONE] \n\nOscar --> Lisa: [CONVERSATION] \n           > Hi Lisa! Sure, I'd be happy to share a bit about myself. I'm Oscar, a 30-year-old\n           > architect from Germany. I work at a company called Awesome Inc., where I focus on\n           > designing standard elements for new apartment buildings. I love modernist architecture,\n           > new technologies, and sustainable practices. In my free time, I enjoy traveling to\n           > exotic places, playing the guitar, and reading science fiction books. How about you?\n```\n\n`TinyWorld` enforces very little constraints on the possible interactions. Subclasses, however, are supposed to provide more structured environments. \n`TinyWorld` enforces very little constraints on the possible interactions. Subclasses, however, are supposed to provide more structured environments. \n\n### Interactive Agent Exploration\n\nTinyTroupe provides a Jupyter widget for interactive conversations with agents, which is useful for exploring agent behavior and debugging:\n\n```python\nfrom tinytroupe.ui import AgentChatJupyterWidget\n\nchat_interface = AgentChatJupyterWidget(people)  # pass a list of agents\nchat_interface.display()\n```\n\nThis displays a chat interface with a dropdown to select agents and send messages interactively.\n\n### Population Profiling\n\nWhen generating populations of agents using `TinyPersonFactory`, you can analyze the distribution of characteristics using the `Profiler`:\n\n```python\nfrom tinytroupe.profiling import Profiler\n\nprofiler = Profiler()\nprofiler.profile(people)  # displays demographic and trait distributions\n```\n\nThis helps validate that your generated population has the diversity and characteristics you intended.\n\n### Cost Tracking\n\nSimulations can incur significant API costs. TinyTroupe provides cost tracking at multiple levels:\n\n```python\nfrom tinytroupe.clients import client\n\n# API client-level stats\nclient().pretty_print_cost_stats()\n\n# Environment-level stats\nworld.pretty_print_cost_stats()\nTinyWorld.pretty_print_global_cost_stats()\n\n# Agent-level stats\nTinyPerson.pretty_print_global_cost_stats()\n```\n\n### Action Quality Control\n\nAgents can be configured to check and improve the quality of their actions. This is useful for ensuring responses adhere to persona specifications and expected formats:\n\n```python\n# Configure per-agent quality control\nperson.action_generator.enable_quality_checks = True\nperson.action_generator.quality_threshold = 5  # 1-10 scale\nperson.action_generator.max_attempts = 5\nperson.action_generator.enable_regeneration = True\n```\n\nYou can also enable this globally via `config.ini` or `config_manager`:\n\n```python\nfrom tinytroupe import config_manager\n\nconfig_manager.update(\"action_generator_enable_quality_checks\", True)\nconfig_manager.update(\"action_generator_quality_threshold\", 6)\n```\n\n### Empirical Validation\n\nOne of the most important aspects of simulation is **validating** results against real-world data. TinyTroupe provides the `SimulationExperimentEmpiricalValidator` class and the `validate_simulation_experiment_empirically` function to compare simulation outputs against empirical control data using statistical tests.\n\n```python\nfrom tinytroupe.validation import SimulationExperimentEmpiricalValidator, validate_simulation_experiment_empirically\n\n# Load empirical control data from a CSV file\ncontrol_data = SimulationExperimentEmpiricalValidator.read_empirical_data_from_csv(\n    file_path=\"path\u002Fto\u002Freal_survey_data.csv\",\n    experimental_data_type=\"single_value_per_agent\",  # or \"ordinal_ranking_per_agent\"\n    agent_id_column=\"Responder #\",\n    value_column=\"Vote\",\n    agent_comments_column=\"Explanation\",\n    dataset_name=\"Real Survey\"\n)\n\n# Create treatment data from simulation results (assuming df contains simulation results)\ntreatment_data = SimulationExperimentEmpiricalValidator.read_empirical_data_from_dataframe(\n    df=simulation_results_df,\n    experimental_data_type=\"single_value_per_agent\",\n    agent_id_column=\"name\",\n    value_column=\"Vote\",\n    dataset_name=\"Simulation Results\"\n)\n\n# Run statistical validation (t-test by default, or ks_test)\nresult = validate_simulation_experiment_empirically(\n    control_data=control_data,\n    treatment_data=treatment_data,\n    validation_types=[\"statistical\"],\n    statistical_test_type=\"t_test\",  # or \"ks_test\"\n    output_format=\"values\"\n)\n\n# Access results\nprint(result.overall_score)\nprint(result.statistical_results)\n```\n\nThis allows you to quantitatively assess how well your simulation matches real-world behavior, which is essential for building confidence in simulation-based insights.\n\n### Caching\nCalling LLM APIs can be expensive, thus caching strategies are important to help reduce that cost.\nTinyTroupe comes with two such mechanisms: one for the simulation state, another for the LLM calls themselves.\n\n\n#### Caching Simulation State\n\nImagine you have a scenario with 10 different steps, you've worked hard in 9 steps, and now you are\njust tweaking the 10th step. To properly validate your modifications, you need to rerun the whole\nsimulation of course. However, what's the point in re-executing the first 9, and incur the LLM cost, when you are \nalready satisfied with them and did not modify them? For situations like this, the module `tinytroupe.control`\nprovides useful simulation management methods:\n\n  - `control.begin(\"\u003CCACHE_FILE_NAME>.cache.json\")`: begins recording the state changes of a simulation, to be saved to\n    the specified file on disk.\n  - `control.checkpoint()`: saves the simulation state at this point.\n  - `control.end()`: terminates the simulation recording scope that had been started by `control.begin()`.\n\n#### Caching LLM API Calls\n\nThis is enabled preferably in the `config.ini` file by setting `CACHE_API_CALLS=True`.\n\nLLM API caching, when enabled, works at a lower and simpler level than simulation state caching. Here, what happens is very straightforward: every LLM call is kept in a map from the input to the generated output; when a new call comes and is identical to a previous one, the cached value is returned.\n\n### Config.ini\n\nThe `config.ini` file contains various parameters that can be used to customize the behavior of the library, such as model parameters and logging level. Please pay special attention to the `API_TYPE` parameter, which defines whether you are using the Azure OpenAI Service or the OpenAI API. The current default is set to `openai` (OpenAI API).\n\nKey configuration sections include:\n- **[OpenAI]**: API settings, model selection, and parameters\n- **[Simulation]**: Parallel execution and safety settings  \n- **[Cognition]**: Memory management settings\n- **[ActionGenerator]**: Action quality control and correction mechanisms\n- **[Logging]**: Log level configuration\n\nModels used by default:\n- `MODEL=gpt-5-mini`: Main text generation model for agent responses (previous default `gpt-4.1-mini` is now legacy but still supported)\n- `EMBEDDING_MODEL=text-embedding-3-small`: For text similarity tasks\n- `REASONING_MODEL=o3-mini`: Used for detailed analyses and reasoning tasks (even more experimental -- not really recommended yet)\n\nWe provide an example of a `config.ini` file, [.\u002Fexamples\u002Fconfig.ini](.\u002Fexamples\u002Fconfig.ini), which you can use as a template for your own, or just modify to run the examples.\n\n#### Programmatic Configuration Override\n\nIn addition to the static `config.ini` file, you can also override many configuration values programmatically using the `config_manager`. This is useful for dynamic configuration changes during runtime or for experiment-specific settings:\n\n```python\nfrom tinytroupe import config_manager\n\n# Override configuration values programmatically\nconfig_manager.update(\"action_generator_enable_quality_checks\", True)\nconfig_manager.update(\"action_generator_quality_threshold\", 6)\nconfig_manager.update(\"cache_api_calls\", True)\n```\n\nThis approach allows you to:\n- **Experiment with different settings** without modifying configuration files\n- **Apply configuration changes dynamically** during simulation execution\n- **Override specific parameters** while keeping the rest of the configuration intact\n- **Implement conditional configurations** based on runtime conditions\n\nThe programmatic overrides take precedence over the values in the `config.ini` file, allowing you to fine-tune behavior for specific use cases or experiments.\n\n### Other Utilities\n\nTinyTroupe provides additional utilities and conveniences not covered in detail above:\n  \n  - `TinyTool`: simulated tools that can be used by `TinyPerson`s.\n  - `TinyStory`: helps you create and manage narratives told through simulations.\n  - `TinyPersonValidator`: helps you validate the behavior of your `TinyPerson`s.\n  - `ResultsExtractor` and `ResultsReducer`: extract and reduce the results of interactions between agents.\n  - `ArtifactExporter`: export simulation artifacts (documents, data) to files.\n  - Mental faculties (`TinyToolUse`, `FilesAndWebGroundingFaculty`): extend agent capabilities with tool use and grounding.\n  - ... and more ...\n  \nIn general, elements that represent simulated entities or complementary mechanisms are prefixed with `Tiny`, while those that are more infrastructural are not. This emphasizes the simulated nature of the elements that are part of the simulation itself.\n\n## Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https:\u002F\u002Fcla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002F).\nFor more information see the [Code of Conduct FAQ](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002Ffaq\u002F) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n### What and How to Contribute\nWe need all sorts of things, but we are looking mainly for new interesting use cases demonstrations, or even just domain-specific application ideas. If you are a domain expert in some area that could benefit from TinyTroupe, we'd love to hear from you.\n\nBeyond that, many other aspects can be improved, such as:\n  - Memory mechanisms.\n  - Data grounding mechanisms.\n  - Reasoning mechanisms.\n  - New environment types.\n  - Interfacing with the external world.\n  - ... and more ...\n\nPlease note that anything that you contribute might be released as open-source (under MIT license).\n\nIf you would like to make a contribution, please try to follow these general guidelines:\n  - **Tiny naming convention**: If you are implementing a experimenter-facing simulated element (e.g., an agent or environment type) or closely related (e.g., agent factories, or content enrichers), and it sounds good, call your new *XYZ* as *TinyXYZ* :-) On the other hand, auxiliary and infrastructural mechanisms should not start with the \"Tiny\" prefix. The idea is to emphasize the simulated nature of the elements that are part of the simulation itself.\n  - **Tests:** If you are writing some new mechanism, please also create at least a unit test `tests\u002Funit\u002F`, and if you can a functional scenario test (`tests\u002Fscenarios\u002F`).\n  - **Demonstrations:** If you'd like to demonstrate a new scenario, please design it preferably as a new Jupyter notebook within `examples\u002F`.\n  - **Microsoft:** If you are implementing anything that is Microsoft-specific and non-confidential, please put it under a `...\u002Fmicrosoft\u002F` folder.\n\n## Acknowledgements\n\nTinyTroupe started as an internal Microsoft hackathon project, and expanded over time. The TinyTroupe core team currently consists of:\n  - Paulo Salem (TinyTroupe's creator and current lead)\n  - Christopher Olsen (Engineering\u002FScience)\n  - Yi Ding (Product Management)\n  - Prerit Saxena (Engineering\u002FScience)\n  \nCurrent advisors:\n  - Robert Sim (Engineering\u002FScience)\n\nOther special contributions were made by:\n  - Nilo Garcia Silveira: initial agent validation ideas and related implementation; general initial feedback and insights; name suggestions.\n  - Olnei Fonseca: initial agent validation ideas; general initial feedback and insights; naming suggestions.\n  - Robert Sim: synthetic data generation scenarios expertise and implementation.\n  - Paulo Freire: synthetic data generation example expertise and implementation.\n  - Carlos Costa: synthetic data generation scenarios expertise and implementation.\n  - Bryant Key: advertising scenario domain expertise and insights.\n  - Barbara da Silva: implementation related to agent memory management.\n  \n  \n ... are you missing here? Please remind us!\n\n## Citing TinyTroupe\n\nPlease cite the introductory TinyTroupe paper when using TinyTroupe in your work. The paper is currently under review, but you can find the preprint on Arxiv.\n\n> Paulo Salem, Robert Sim, Christopher Olsen, Prerit Saxena, Rafael Barcelos, Yi Ding. (2025). **TinyTroupe: An LLM-powered Multiagent Persona Simulation Toolkit**. ArXiv preprint: [2507.09788](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.09788). *GitHub repository available at https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTinyTroupe.*\n \nIn BibTeX format, you can use the following entry:\n\n```bibtex\n@article{tinytroupe2025,\n  author       = {Paulo Salem and Robert Sim and Christopher Olsen and Prerit Saxena and Rafael Barcelos and Yi Ding},\n  title        = {TinyTroupe: An LLM-powered Multiagent Persona Simulation Toolkit},\n  journal      = {arXiv preprint arXiv:2507.09788},\n  year         = {2025},\n  archivePrefix= {arXiv},\n  eprint       = {2507.09788},\n  note         = {GitHub repository: \\url{https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTinyTroupe}}\n}\n```\n\n## Legal Disclaimer\n\n TinyTroupe is for research and simulation only. TinyTroupe is a research and experimental technology, which relies on Artificial Intelligence (AI) models to generate text  content. The AI system output may include unrealistic, inappropriate, harmful or inaccurate results, including factual errors. You are responsible for reviewing the generated content (and adapting it if necessary) before using it, as you are fully responsible for determining its accuracy and fit for purpose. We advise using TinyTroupe’s outputs for insight generation and not for direct decision-making. Generated outputs do not reflect the opinions of Microsoft. You are fully responsible for any use you make of the generated outputs. For more information regarding the responsible use of this technology, see the [RESPONSIBLE_AI_FAQ.md](.\u002FRESPONSIBLE_AI_FAQ.md).\n\n **PROHIBITED USES**:\nTinyTroupe  is not intended to simulate sensitive (e.g. violent or sexual) situations. Moreover, outputs must not be used to deliberately deceive, mislead or harm people in any way. You are fully responsible for any use you make and must comply with all applicable laws and regulations.\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft \ntrademarks or logos is subject to and must follow \n[Microsoft's Trademark & Brand Guidelines](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Flegal\u002Fintellectualproperty\u002Ftrademarks\u002Fusage\u002Fgeneral).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n\n\n","TinyTroupe是一个基于大型语言模型（LLM）的多代理人格模拟库，旨在增强想象力和提供商业洞察。它利用GPT-4等先进模型生成具有特定性格、兴趣和目标的人工智能体，在用户自定义条件下进行互动。核心功能包括创建高度定制化的人格、实现逼真的交互场景以及对不同消费者类型的行为进行研究。适合于广告评估、软件测试、合成数据生成、项目提案反馈及头脑风暴等多种应用场景，帮助企业或个人在实际投入前获得有价值的见解。",2,"2026-06-11 03:48:44","high_star"]