AgentSwift: Efficient LLM Agent Design via Value-guided Hierarchical Search