Skip to main content
The Conversation Simulator is a feature for testing conversational AI systems. The SimulatorService in the Galtea SDK allows you to run these simulations programmatically. This service is exposed through the galtea.simulator object.
Remember that we will be using the galtea object. More information here.

Quick Example

First, initialize the Galtea SDK:
galtea = Galtea(api_key="YOUR_API_KEY")
Simulate a conversation with your agent:
class MyCustomAgent(Agent):
    def call(self, input_data: AgentInput) -> AgentResponse:
        # Implement your agent logic here, using input_data content
        return AgentResponse(
            content=f"Generated response for {input_data.last_user_message_str()}"
        )


simulation_result = galtea.simulator.simulate(
    session_id=scenarios_session.id,
    agent=MyCustomAgent(),
    max_turns=3,
    log_inference_results=True,
)

Service Methods

Conversation Simulator

Test your conversational AI by simulating realistic user interactions with a synthetic user