Skip to main content

Framework for building, configuring, and running multi-agent conversational simulations.

Project description

CI PyPI Status Badge Code style: black License: MIT

Scenario Labs

Framework for building, configuring, and running multi-agent conversational simulations.

Examples

You can find past chat logs in the logs directory.

Getting Started

Set the enviromental variables according to your LLM providers documentation. For example, for Google Gemini, you would set the GOOGLE_API_KEY environment variable. For xAI, you would set the XAI_API_KEY environment variable.

git clone https://github.com/christopherwoodall/scenario-labs Labs.git
cd scenario-labs
pip install -e ".[developer]"

scenario-labs

You can also run simulations in parallel with the following command:

for i in {1..9}; do scenario-labs & done; wait

Configuration

The simulation's behavior, including the participating agents and the Large Language Models (LLMs) they use, is configured via a YAML file (e.g., starbound_config.yaml). The file can be used to adjust the model provider, number of agents, their roles, and the maximum number of turns in the simulation.

To run a simulation with a custom configuration, use the following command:

scenario-labs --config configs/prison_config.yaml

Prompt Considerations

The most important part of the prompt is the call and response formatting. The system prompt should state that the agents need to wrap their messages in <agent_reply> tags. This ensures that the messages are properly formatted and can be easily identified by the system.

The following is a good way of achieving this:

All messages must begin with your character's name followed by a colon. For example: 
"Lily Chen: I hope you're having a great day!"

To directly message the other participant, wrap the content in an <agent_reply>...</agent_reply> tag. 
Inside the tag, write the character name, a colon, then the message. For example: 
"<agent_reply>Lily Chen: Have you ever tried crypto investing?</agent_reply>"

The following agents are involved:
- "Lily Chen"
- "Michael"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scenario_labs-0.0.7-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file scenario_labs-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: scenario_labs-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for scenario_labs-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b4f2c09d49abec9ec91462aa8dd1ff59fc39f19f7bfd296250d3ce6c96ebca3f
MD5 40a3621a1a938f693e1ef4f7a7ac07c8
BLAKE2b-256 26fdb4208e5b7dfccd7254f10a0bc1446a4d2a887f1bd2105ff4df74ab0d37cb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page