TinyTroupe  by microsoft

LLM-powered multiagent simulation for business insights and imagination

created 1 year ago
6,967 stars

Top 7.4% on sourcepulse

GitHubView on GitHub
Project Summary

TinyTroupe is an experimental Python library for simulating multi-agent personas powered by LLMs. It enables users to create and interact with artificial agents ("TinyPersons") possessing distinct personalities, goals, and backgrounds within simulated environments ("TinyWorlds"). The library is designed for researchers and business professionals seeking to gain insights into human behavior, test hypotheses, and enhance creativity in areas like advertising, software testing, and product development.

How It Works

TinyTroupe leverages Large Language Models (LLMs), primarily GPT-4, to imbue agents with realistic and nuanced behaviors. Agents are defined programmatically or via JSON specifications, allowing for detailed customization of personality traits, interests, education, and goals. The simulation engine facilitates agent-to-agent and agent-to-environment interactions, with mechanisms for state caching and LLM call caching to optimize performance and reduce costs. The core principle is to simulate human behavior for analytical purposes, rather than directly assisting users.

Quick Start & Requirements

  • Install via pip: pip install git+https://github.com/microsoft/TinyTroupe.git@main
  • Prerequisites: Python 3.10+, API access to Azure OpenAI Service or OpenAI GPT-4. Environment variables AZURE_OPENAI_KEY/AZURE_OPENAI_ENDPOINT or OPENAI_API_KEY must be set.
  • Recommended: Anaconda for environment management.
  • Further details and examples are available in the /examples folder of the repository.

Highlighted Details

  • Supports detailed persona specifications including personality traits, preferences, and beliefs.
  • Agents can be defined via JSON files or programmatically, with support for reusable "fragments."
  • Includes a TinyPersonFactory for LLM-driven agent generation.
  • Offers simulation state and LLM call caching for cost and performance optimization.
  • Designed for analytical insights and productivity enhancement, differentiating from typical AI assistants.

Maintenance & Community

TinyTroupe is an ongoing research project with frequent updates. The core team includes members from Microsoft. Contributions are welcomed, with a focus on new use cases and domain-specific applications. The project follows the Microsoft Open Source Code of Conduct.

Licensing & Compatibility

Contributions are released under the MIT license. The project itself is available for research and simulation purposes. Users are responsible for the generated outputs and must comply with applicable laws and regulations.

Limitations & Caveats

The library is experimental and under significant development, with APIs subject to frequent changes. Outputs may be unrealistic, inaccurate, or inappropriate, and are intended for insight generation, not direct decision-making. The legal disclaimer emphasizes that generated outputs do not reflect Microsoft's opinions and prohibits simulating sensitive situations or using outputs to deceive or harm.

Health Check
Last commit

2 days ago

Responsiveness

1 week

Pull Requests (30d)
4
Issues (30d)
1
Star History
857 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.