# Import your .af file from any location agent_state = client.agents.import_agent_serialized(file=open("/path/to/agent/file.af", "rb")) **print(f"Imported agent: {agent.id}")** should be: **print(f"Imported agent: {agent_state.id}")**