bulky-machine-37433
06/04/2025, 1:30 PMlivekit.rtc module (along with livekit.api) to connect to the server, create a Room, sending messages to that room and listening for answers.
The question is: is there any way to do this in a simpler way? It feels like it should exist, since the approach I'm currently following involves kind of unnecessary dealing with complicated communication protocols, and room management & stuff, when the only thing I want to do is to test whether my agent is working well or not, if its calling the tools it should call depending on the inputs, etc.tall-airline-16756
06/04/2025, 1:30 PMtall-airline-16756
06/04/2025, 1:30 PMclass SimpleEvaluationAgent(Agent):
def __init__(self):
super().__init__(
instructions="""
You are evaluating the performance of a user.
[evaluation instructions here]
""",
stt=deepgram.STT(),
llm=openai.LLM(),
tts=openai.TTS(),
vad=silero.VAD.load()
)
2. Implement a grading function to assess the responses programmatically: `@function_tool
async def grade_answer(self, context: RunContext, result: str, question: str):
"""
Give a result of PASS or FAIL for each question
"""
self.session.say(f"The grade for the question {question} is {result}")
return None, "I've graded the answer."`
3. Configure the evaluation agent to interact with your main agent by updating the `RoomInputOptions`: await session.start(
agent=SimpleEvaluationAgent(),
room=ctx.room,
room_input_options=RoomInputOptions(
participant_kinds=[
rtc.ParticipantKind.PARTICIPANT_KIND_AGENT,
]
),
)
This method simplifies the process by automating the testing and evaluation of your agent's responses without the need for complex communication protocols or room management. Let me know if you need further assistance!
Sources: How to test your agent using another agent