> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-codex-docs-audit-20260719-0149.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Automatic Cultural Management

> Automatically update cultural knowledge based on Agent interactions.

```python automatic_cultural_management.py theme={null}
"""
03 Automatic Cultural Management
=============================

Automatically update cultural knowledge based on Agent interactions.
"""

from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIResponses

# ---------------------------------------------------------------------------
# Step 1. Initialize the database (same one used in 01_create_cultural_knowledge.py)
# ---------------------------------------------------------------------------
db = SqliteDb(db_file="tmp/demo.db")

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
# The Agent will automatically add or update cultural knowledge after each run.
agent = Agent(
    db=db,
    model=OpenAIResponses(id="gpt-5.2"),
    update_cultural_knowledge=True,  # enables automatic cultural updates
)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    # ---------------------------------------------------------------------------
    # Step 3. Ask the Agent to generate a response
    # ---------------------------------------------------------------------------
    agent.print_response(
        "What would be the best way to cook ramen? Detailed and specific instructions generally work better than general advice.",
        stream=True,
        markdown=True,
    )
```

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno openai sqlalchemy
    ```
  </Step>

  <Step title="Export your OpenAI API key">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export OPENAI_API_KEY="your_openai_api_key_here"
      ```

      ```bash Windows theme={null}
      $Env:OPENAI_API_KEY="your_openai_api_key_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Run the example">
    Save the code above as `automatic_cultural_management.py`, then run:

    ```bash theme={null}
    python automatic_cultural_management.py
    ```
  </Step>
</Steps>

Full source: [cookbook/02\_agents/14\_advanced/03\_automatic\_cultural\_management.py](https://github.com/agno-agi/agno/blob/v2.7.4/cookbook/02_agents/14_advanced/03_automatic_cultural_management.py)
