AgentReply autogen.beta.agent.AgentReply # AgentReply(response, *, context, client, agent) Bases: Askable Source code in autogen/beta/agent.py 54 55 56 57 58 59 60 61 62 63 64 65def __init__( self, response: ModelResponse, *, context: "Context", client: "LLMClient", agent: "Agent", ) -> None: self.response = response self.context = context self.__client = client self.__agent = agent response instance-attribute # response = response context instance-attribute # context = context content property # content Text content of the model's response for this turn. history property # history ask async # ask(msg, *, dependencies=None, variables=None, prompt=(), config=None, tools=(), middleware=()) Source code in autogen/beta/agent.py 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105async def ask( self, msg: str, *, dependencies: dict[Any, Any] | None = None, variables: dict[Any, Any] | None = None, prompt: Iterable[str] = (), config: ModelConfig | None = None, tools: Iterable[Tool] = (), middleware: Iterable["MiddlewareFactory"] = (), ) -> "AgentReply": initial_event = ModelRequest(content=msg) context = self.context if dependencies: context.dependencies.update(dependencies) if variables: context.variables.update(variables) if prompt: context.prompt = list(prompt) client = config.create() if config else self.__client return await self.__agent._execute( initial_event, context=context, client=client, additional_tools=tools, additional_middleware=middleware, )