def get_agent_keys(): agent = Agent() keys = [KeyPair(_key=key) for key in agent.get_keys()] agent.close() return keys