edsl is a free, open source ai development platforms project written in Python and released under MIT. It has 502 GitHub stars, 85 forks and 62 open issues, and was last pushed 14 hours ago. On this registry it ranks #145 of 145 tracked projects in AI Development Platforms, with 5 head-to-head comparisons available.

What is edsl?

EDSL is a Python domain-specific language for designing, running and analysing AI-powered surveys and experiments with many agents and language models at once, aimed at computational social scientists, market researchers and teams doing LLM-based data labelling.

What it is

EDSL stands for Expected Parrot Domain-Specific Language. It is an MIT-licensed Python package supporting Python 3.9 to 3.13, distributed on PyPI with documentation at docs.expectedparrot.com. It gives researchers a declarative vocabulary for surveys and experiments: questions are written as typed objects such as QuestionMultipleChoice or QuestionLinearScale, prompts are parameterised with scenarios of data, and respondents are defined as agents with traits, so a single instrument can be run across many models and many agents at the same time.

The concrete problem it solves is the plumbing between a research question and a result. Without it, running an LLM survey means writing loops over model APIs, prompt templating and JSON schemas to force structured output, then storing responses ad hoc. EDSL replaces that glue with question types that return consistent answer formats without requiring a JSON schema, with ScenarioList for importing parameters from sources such as CSV, PDF and PNG, and with results held as specified datasets that carry built-in methods for analysis, visualisation and collaboration. It lives in the Python and LLM tooling ecosystem and is catalogued under AI & Machine Learning / AI Development Platforms.

Key capabilities

  • Declarative question types including QuestionMultipleChoice, QuestionLinearScale, QuestionFreeText and QuestionList, which return consistent results without requiring a JSON schema.
  • Parameterised prompts driven by ScenarioList, importing scenario data from sources such as CSV, PDF and PNG files.
  • Agent personas built with Agent and AgentList, assigning traits such as "botanist" or "detective" so the same questions are answered from different perspectives.
  • Multi-model runs through Model and ModelList, for example comparing gpt-4o and gemini-1.5-flash responses at a single interface.
  • A choice between your own API keys for each language model or one Expected Parrot key that reaches all available models, with keys, expenses and usage managed for a team from one account.
  • Results as specified datasets with built-in analysis, visualisation and collaboration methods, plus a universal remote cache of stored responses that lets results be replicated at no cost.
  • Sharing and human validation through Coop, a free platform for creating, storing and sharing AI-based research and validating it with human respondents.

Who uses it and how

  • Computational social science and market research groups that run one instrument across many agents and many models rather than one prompt at a time.
  • Teams performing complex data labelling and other structured research tasks where consistent output formats matter more than free-form text.
  • Groups that need reproducibility, using the remote cache and the Expected Parrot server so a stored response set can be re-run without new model spend.
  • Projects that prototype with AI-simulated responses and then validate with real human respondents through Coop, treating simulated answers as statistical patterns rather than the actual opinions of any demographic group.

Getting started

Install the package with pip install edsl in a Python 3.9 to 3.13 environment, then create an Expected Parrot account to run surveys on the Expected Parrot server and use the remote cache. Supply your own language model API keys or obtain an Expected Parrot key, and follow the starter tutorial and demo notebooks.

How it compares

The facts provided name no paid products that EDSL replaces and no competing tools in the same category, so it stands alone in this registry as a domain-specific language for AI-based survey and experiment work. It is catalogued under AI & Machine Learning / AI Development Platforms, but its vocabulary is built around questions, scenarios, agents and models rather than general orchestration.

When to use it — and when not to

Expect to supply language model API keys, or to rely on an Expected Parrot key, and to accept that running surveys on the Expected Parrot server and using the remote response cache depends on that hosted account. Anyone who needs measured human attitudes rather than simulated ones should not treat agent responses as a substitute for respondents, since the README states they reflect statistical patterns and require human validation. The README excerpt supplied here is also truncated mid-example, so a prospective self-hoster should read the full documentation before committing.

project readme (upstream, from github) — read inline

edsl.png

Expected Parrot Domain-Specific Language (EDSL)

EDSL makes it easy to conduct computational social science and market research with AI. Use it to design and run surveys and experiments with many AI agents and large language models at once, or to perform complex data labeling and other research tasks. Results are formatted as specified datasets that can be replicated at no cost, and come with built-in methods for analysis, visualization and collaboration.

Getting started

  1. Run pip install edsl to install the package. See instructions.

  2. Create an account to run surveys at the Expected Parrot server and access a universal remote cache of stored responses for reproducing results.

  3. Choose whether to use your own keys for language models or get an Expected Parrot key to access all available models at once. Securely manage keys, expenses and usage for your team from your account.

  4. Run the starter tutorial and explore other demo notebooks for a variety of use cases.

  5. Share workflows and survey results at Coop: a free platform for creating and sharing AI research.

  6. Join our Discord for updates and discussions!

Code & Docs

Requirements

  • Python 3.9 - 3.13
  • API keys for language models. You can use your own keys or an Expected Parrot key that provides access to all available models. See instructions on managing keys and model pricing and performance information.

Coop

Expected Parrot provides a free platform for creating, storing and sharing AI-based research, and validating it with human respondents.

Community

Contact

Features

Declarative design: Specified question types ensure consistent results without requiring a JSON schema (view at Coop):

from edsl import QuestionMultipleChoice

q = QuestionMultipleChoice(
  question_name = "example",
  question_text = "How do you feel today?",
  question_options = ["Bad", "OK", "Good"]
)

results = q.run()

results.select("example")
answer.example
Good

Parameterized prompts: Easily parameterize and control prompts with "scenarios" of data automatically imported from many sources (CSV, PDF, PNG, etc.) (view at Coop):

from edsl import ScenarioList, QuestionLinearScale

q = QuestionLinearScale(
  question_name = "example",
  question_text = "How much do you enjoy {{ scenario.activity }}?",
  question_options = [1,2,3,4,5,],
  option_labels = {1:"Not at all", 5:"Very much"}
)

sl = ScenarioList.from_list("activity", ["coding", "sleeping"])

results = q.by(sl).run()

results.select("activity", "example")
scenario.activity answer.example
Coding 5
Sleeping 5

Design AI agent personas to answer questions: Construct agents with relevant traits to provide diverse responses to your surveys. Note that agent responses are generated by language models based on their training data — they reflect statistical patterns, not the actual opinions of any demographic group. Use AI-simulated responses for prototyping and pre-testing, and validate with real human data when measuring actual attitudes or behaviors. (view at Coop)

from edsl import Agent, AgentList, QuestionList

al = AgentList(Agent(traits = {"persona":p}) for p in ["botanist", "detective"])

q = QuestionList(
  question_name = "example",
  question_text = "What are your favorite colors?",
  max_list_items = 3
)

results = q.by(al).run()

results.select("persona", "example")
agent.persona answer.example
botanist ['Green', 'Earthy Brown', 'Sunset Orange']
detective ['Gray', 'Black', 'Navy Blue']

Simplified access to LLMs: Choose whether to use your own API keys for LLMs, or access all available models with an Expected Parrot key. Run surveys with many models at once and compare responses at a convenient interface (view at Coop)

from edsl import Model, ModelList, QuestionFreeText

ml = ModelList(Model(m) for m in ["gpt-4o", "gemini-1.5-flash"])

q = QuestionFreeText(
  question_name = "example",
  question_text = "What is your top tip for using LLMs to answer surveys?"
)

results = q.by(ml).run()

results.select("model", "example")
model.model answer.example
gpt-4o When using large language models (LLMs) to answer surveys, my top tip is to ensure that the ...
gemini-1.5-flash My top tip for using LLMs to answer surveys is to **treat the LLM as a sophisticated brainst...

Piping & skip-logic: Build rich data labeling flows with features for piping answers and adding survey logic such as skip and stop rules (view at Coop):

from edsl import QuestionMultipleChoice, QuestionFreeText, Survey

q1 = QuestionMultipleChoice(
  question_name = "color",
  question_text = "What is your favorite primary color?",
  question_options = ["red", "yellow", "blue"]
)

q2 = QuestionFreeText(
  question_name = "flower",
  question_text = "Name a flower that is {{ color.answer }}."
)

survey = Survey(questions = [q1, q2])

results = survey.run()

results.select("color", "flower")
answer.color answer.flower
blue A commonly known blue flower is the bluebell. Another example is the cornflower.

Caching & reproducibility: API calls to LLMs are cached automatically. When you run a survey remotely, results are stored at the Expected Parrot server with verified prompts and timestamps. Share your code and anyone can retrieve your exact outputs at no cost, with no setup or API keys required. Learn more about how the universal remote cache works.

Flexibility: Choose whether to run surveys on your own computer or at the Expected Parrot server.

Tools for collaboration: Easily share workflows and projects privately or publicly at Coop: an integrated platform for AI-based research. Your account comes with free credits for running surveys, and lets you securely share keys, track expenses and usage for your team.

Built-in tools for analysis: Analyze results as specified datasets from your account or workspace. Easily import data to use with your surveys and export results

Frequently asked questions

Is edsl free to use?

edsl is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does edsl do?

Design, conduct and analyze results of AI-powered surveys and experiments. Simulate social science and market research with large numbers of AI agents and LLMs.

What is edsl written in?

edsl is primarily written in Python. Its source is publicly available at https://github.com/expectedparrot/edsl, and it has 502 GitHub stars.