Documentation Index
Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
What is simulation?
Simulation runs AI-simulated multi-turn conversations. An AI user generates follow-up messages based on your scenario and persona; your prompt, workflow, or output function responds each turn. Usewith_simulation_config() to configure max_turns, persona or a custom simulator, and more. Your data must include a Scenario column (or map it via data_structure).
Simulation with prompts or workflows
Run simulation against a prompt or workflow on the Maxim platform. Usewith_prompt_version_id() when testing prompts, or with_workflow_id() when testing workflows:
Simulation with local evaluators
Local evaluators receiveLocalEvaluatorResultParameter with output and simulation_outputs. The simulation_outputs list contains the concatenated output from each turn—use it to validate that the simulation produced the expected number of steps:
Simulation with yields_output
When you combinewith_simulation_config() and yields_output(), the SDK runs your output function locally in a turn-by-turn loop. The simulator generates the next user input; your function produces the assistant response for that turn. No prompt version ID or workflow ID is required—this is SDK-only simulation.
yields_output with conversation history (for LLM calls)
Your output function receives a second argumentsim_ctx: SimulationContext which contains the full conversation history and current user input. Use this to pass the conversation to your LLM for context-aware responses:
SimulationContext provides:
conversation_history: List of turns (each hasturn,request,response)current_user_input: User message for the current turn (e.g.{"input": "..."})turn_number: Current turn index (1-based)total_cost: Cumulative cost across turns so fartotal_tokens: Cumulative token count across turns so far
conversation_history has request (user input) and response (assistant output). Use turn.response.get("output", "") for the assistant’s text.
Next Steps
- Local Prompt Testing - Test prompts with custom logic
- Maxim Prompt Testing - Use prompts on the platform
- Local Endpoint Testing - Test agents on your own endpoints
- Endpoint on Maxim - Use workflows on the platform
- CI/CD Integration - Automate prompt testing