"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-07 04:19:30.805773
"""

```python
from typing import List, Dict, Any

class KnowledgeBase:
    def __init__(self):
        self.knowledge = {}

    def add_fact(self, key: str, value: Any) -> None:
        """Add a fact to the knowledge base."""
        self.knowledge[key] = value

    def get_fact(self, key: str) -> Any:
        """Retrieve a fact from the knowledge base."""
        return self.knowledge.get(key)

class RuleBase:
    def __init__(self):
        self.rules = []

    def add_rule(self, rule: Dict[str, List[str]]) -> None:
        """Add a reasoning rule to the rule base."""
        self.rules.append(rule)

def create_reasoning_engine() -> Any:
    """
    Create and configure a basic reasoning engine with knowledge and rules.

    Returns:
        A tuple containing a KnowledgeBase and RuleBase instance.
    """
    kb = KnowledgeBase()
    rb = RuleBase()

    # Adding facts to the knowledge base
    kb.add_fact('weather', 'sunny')
    kb.add_fact('temperature', 25)
    kb.add_fact('humidity', 40)

    # Adding rules to the rule base
    rb.add_rule({'if': {'weather': 'sunny'}, 'then': {'action': 'go out'}})
    rb.add_rule({'if': {'temperature': lambda t: t > 30}, 'then': {'action': 'seek shelter'}})
    rb.add_rule({'if': {'humidity': lambda h: h < 25}, 'then': {'action': 'bring umbrella'}})

    return kb, rb

def apply_rules(engine: Any) -> None:
    """
    Apply rules to the knowledge base and update actions based on conditions.

    Args:
        engine (Tuple): A tuple containing a KnowledgeBase and RuleBase instance.
    """
    kb, rb = engine
    for rule in rb.rules:
        if all(kb.get_fact(condition) == value or condition_func(kb.get_fact(condition)) for condition, condition_func in rule['if'].items()):
            action = rule['then']['action']
            print(f'Action: {action}')

# Example usage
reasoning_engine = create_reasoning_engine()
apply_rules(reasoning_engine)
```