> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tourist Guide

> A WhatsApp agent that recommends tourist spots using interactive menus.

```python tourist_guide.py theme={null}
"""
Tourist Guide
==============

A WhatsApp agent that recommends tourist spots using interactive menus.

It asks the user questions via reply buttons and list messages, searches the
web for top attractions, and sends a location pin for its recommendation.

Requires:
  WHATSAPP_ACCESS_TOKEN, WHATSAPP_PHONE_NUMBER_ID
  ANTHROPIC_API_KEY
"""

from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.anthropic import Claude
from agno.os.app import AgentOS
from agno.os.interfaces.whatsapp import Whatsapp
from agno.tools.websearch import WebSearchTools
from agno.tools.whatsapp import WhatsAppTools

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------

agent_db = SqliteDb(db_file="tmp/tourist_guide.db")

tourist_agent = Agent(
    name="Tourist Guide",
    model=Claude(id="claude-sonnet-4-6"),
    tools=[
        WhatsAppTools(
            enable_send_reply_buttons=True,
            enable_send_list_message=True,
            enable_send_location=True,
            enable_send_image=True,
        ),
        WebSearchTools(),
    ],
    db=agent_db,
    instructions=[
        "You are a friendly tourist guide that recommends places to visit.",
        "When the conversation starts, greet the user and ask what type of trip they want "
        "using send_reply_buttons with options like: Adventure, Culture, Relaxation.",
        "Then ask which region they prefer using a send_list_message with sections for "
        "different continents and rows for popular destinations.",
        "After the user picks a destination, use DuckDuckGo to search for the top tourist "
        "spots there and summarise the best 3 options as a text message.",
        "Finally, send a location pin for your top recommendation using send_location.",
        "Keep messages short and conversational.",
    ],
    add_history_to_context=True,
    num_history_runs=5,
    add_datetime_to_context=True,
    markdown=True,
)

# ---------------------------------------------------------------------------
# AgentOS setup
# ---------------------------------------------------------------------------

agent_os = AgentOS(
    agents=[tourist_agent],
    interfaces=[Whatsapp(agent=tourist_agent, send_user_number_to_context=True)],
)
app = agent_os.get_app()

# ---------------------------------------------------------------------------
# Run
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    agent_os.serve(app="tourist_guide:app", reload=True)
```

## Run the Example

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

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U "agno[os,whatsapp]" anthropic ddgs fastmcp starlette
    ```
  </Step>

  <Step title="Export your API keys">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export ANTHROPIC_API_KEY="your_anthropic_api_key_here"
      export JWT_VERIFICATION_KEY="your_jwt_verification_key_here"
      export WHATSAPP_ACCESS_TOKEN="your_whatsapp_access_token_here"
      export WHATSAPP_ENCRYPTION_KEY="your_whatsapp_encryption_key_here"
      export WHATSAPP_PHONE_NUMBER_ID="your_whatsapp_phone_number_id_here"
      ```

      ```bash Windows theme={null}
      $Env:ANTHROPIC_API_KEY="your_anthropic_api_key_here"
      $Env:JWT_VERIFICATION_KEY="your_jwt_verification_key_here"
      $Env:WHATSAPP_ACCESS_TOKEN="your_whatsapp_access_token_here"
      $Env:WHATSAPP_ENCRYPTION_KEY="your_whatsapp_encryption_key_here"
      $Env:WHATSAPP_PHONE_NUMBER_ID="your_whatsapp_phone_number_id_here"
      ```
    </CodeGroup>
  </Step>

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

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

Full source: [cookbook/05\_agent\_os/interfaces/whatsapp/tourist\_guide.py](https://github.com/agno-agi/agno/blob/main/cookbook/05_agent_os/interfaces/whatsapp/tourist_guide.py)
