Agents¶
Agents, represented by Agent class, are the basic building blocks of the EDSL. They are the entities that stand-in for humans.
Agent class¶
AgentList class¶
They can also be grouped together in an AgentList
Invigilator class¶
The administration of Questions is managed by an Invigilator.
Module for creating Invigilators, which are objects to administer a question to an Agent.
- class edsl.agents.Invigilator.InvigilatorAI(agent, question, scenario, model, memory_plan, current_answers: dict, iteration: int = 1)¶
Bases:
InvigilatorBaseAn invigilator that uses an AI model to answer questions.
- answer_question(failed=False) AgentResponseDict¶
Answer a question using the AI model.
- async async_answer_question(failed=False) AgentResponseDict¶
Answer a question using the AI model.
- class edsl.agents.Invigilator.InvigilatorBase(agent, question, scenario, model, memory_plan, current_answers: dict, iteration: int = 1)¶
Bases:
ABCAn invigiator (someone who administers an exam) is a class that is responsible for administering a question to an agent.
- answer_question(**kwargs)¶
- abstract async async_answer_question()¶
Asnwer a question.
- create_memory_prompt(question_name)¶
Create a memory for the agent.
- classmethod example()¶
Return an example invigilator.
- get_failed_task_result() AgentResponseDict¶
Return an AgentResponseDict used in case the question-askinf fails.
- class edsl.agents.Invigilator.InvigilatorDebug(agent, question, scenario, model, memory_plan, current_answers: dict, iteration: int = 1)¶
Bases:
InvigilatorBaseAn invigilator class for debugging purposes.
- async async_answer_question(iteration: int = 0) AgentResponseDict¶
Return the answer to the question.
- class edsl.agents.Invigilator.InvigilatorFunctional(agent, question, scenario, model, memory_plan, current_answers: dict, iteration: int = 1)¶
Bases:
InvigilatorBaseA Invigilator for when the question has a answer_question_directly function.
- async async_answer_question(iteration: int = 0) AgentResponseDict¶
Return the answer to the question.
- class edsl.agents.Invigilator.InvigilatorHuman(agent, question, scenario, model, memory_plan, current_answers: dict, iteration: int = 1)¶
Bases:
InvigilatorBaseAn invigilator for when a human is answering the question.
- async async_answer_question(iteration: int = 0) AgentResponseDict¶
Return the answer to the question.