games.multi_player.config¶
Configuration for multi-player game agents.
This module provides the configuration class for multi-player game agents, supporting features like:
Role-based player configurations
LLM engine configurations per role
Game state schema definitions
Visualization settings
Game flow control
Example
>>> from haive.agents.agent_games.framework.multi_player.config import MultiPlayerGameConfig
>>> from haive.core.engine.aug_llm import AugLLMConfig
>>>
>>> # Create a game configuration
>>> config = MultiPlayerGameConfig(
... state_schema=MyGameState,
... engines={
... "player": {"move": player_llm_config},
... "narrator": {"narrate": narrator_llm_config}
... }
... )
Classes¶
Configuration for multi-player game agents. |
Module Contents¶
- class games.multi_player.config.MultiPlayerGameConfig¶
Bases:
haive.core.engine.agent.agent.AgentConfig
Configuration for multi-player game agents.
This class defines the configuration for multi-player game agents, including state management, player roles, and LLM configurations.
- state_schema¶
State schema for the game.
- Type:
Type[MultiPlayerGameState]
- engines¶
LLM configs by role.
- Type:
Dict[str, Dict[str, AugLLMConfig]]
Example
>>> config = MultiPlayerGameConfig( ... state_schema=MyGameState, ... engines={ ... "player": { ... "move": AugLLMConfig( ... name="player_move", ... llm_config=my_llm_config, ... prompt_template=move_prompt ... ) ... } ... }, ... initial_player_count=4 ... )
- class Config¶
Pydantic configuration.