def load_agent(_kb: UrlKnowledge) -> Agent:
        """Create an agent with reasoning capabilities"""
        return Agent(
            model=Claude(
                id="claude-sonnet-4-20250514", 
                api_key=anthropic_key
            ),
            knowledge=_kb,
            search_knowledge=True,  # Enable knowledge search
            tools=[ReasoningTools(add_instructions=True)],  # Add reasoning tools
            instructions=[
                "Include sources in your response.",
                "Always search your knowledge before answering the question.",
            ],
            markdown=True,  # Enable markdown formatting
        )
Create an agent with reasoning capabilities
rag_tutorials/agentic_rag_with_reasoning/rag_reasoning_agent.py