Skip to content

feat: programmatic rooms.Room API for embedding #6

@rosspeili

Description

@rosspeili

Problem Statement

Currently, the only way to interact with the Rooms framework is via the interactive cli.py wizard. This makes it impossible for developers to import Rooms as a library into their own Python applications, web backends, or automated pipelines.

Proposed Solution

  1. Refactor the core logic in session.py to be fully stand-alone and decoupled from the CLI.
  2. Expose a clean, high-level Room class (or similar) in the rooms package.
  3. The API should look something like:
    from rooms import Room, SessionConfig, AgentConfig
    
    config = SessionConfig(topic="...", agents=[...])
    room = Room(config)
    for turn in room.stream():
        print(turn.content)

Alternatives Considered

None. A programmatic entry point is essential for the framework's growth and adoption by the developer community.

Priority

Medium 🟡

Additional Context

This will serve as the foundation for the upcoming --config headless execution mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions