Simulates bot conversations using LLM. No real API calls.
Simulate a conversation between a user and a bot. You are the agent running the simulation.
Ask user for:
Also ask for the bot API spec:
specs/petstore.json)specs/If user provides a spec path (e.g., specs/petstore.json):
specs/petstore_goals.json existsExample prompt:
Available goals (not yet simulated):
1. Adopt a pet
2. Sell a pet
...
Already simulated: Track order
Which goal? (enter number or describe new goal)
Repeat the goal back to the user. Ask: "Is this correct? Should I start?"
Wait for user to say yes.
If user gave a file path or URL, read it. If user gave a description, use that.
Write down what the bot can do.
For each turn:
User message: Something a real person would say to achieve the goal. Bot response: Based on what the bot can do from Step 3.
For each turn, also capture:
Stop when the goal is achieved. Do not use a fixed number of turns.
Generate timestamp using: date +%Y%m%d_%H%M%S
Save to: sessions/simulated_conversation_{timestamp}.json
Format:
{
"goal": "user goal here",
"goal_id": 7,
"mode": "simulation",
"api_spec_source": "URL or file path",
"turns": [
{
"turn": 1,
"user_message": "what the user says",
"bot_response": "what the bot says",
"bot_reasoning": "why the bot responded this way",
"apis_called": ["GET /store/order/{orderId}"],
"evidence": {
"orderId": "User provided: 5",
"status": "From API response: placed",
"petId": "From API response: 1"
}
}
]
}
If a goals file exists for this spec:
Example update:
{
"spec": "specs/petstore.json",
...
"simulated": [2, 7], // added goal ID 7
...
}