> ## 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.

# Slack Team HITL: Member Agent Confirmation

> Ported from: cookbook/03_teams/20_human_in_the_loop/confirmation_required.py.

```python team_hitl_confirmation.py theme={null}
"""
Slack Team HITL — Member Agent Confirmation
============================================

Ported from: cookbook/03_teams/20_human_in_the_loop/confirmation_required.py

Member agent (WeatherAgent) has an HITL tool. When the member calls
`@tool(requires_confirmation=True)`, the pause propagates to the team
and Slack shows Approve / Deny buttons.

Try in Slack:
  @bot what is the weather in Tokyo?

Slack scopes: app_mentions:read, assistant:write, chat:write, im:history
"""

from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIResponses
from agno.os.app import AgentOS
from agno.os.interfaces.slack import Slack
from agno.team import Team
from agno.tools import tool


@tool(requires_confirmation=True)
def get_the_weather(city: str) -> str:
    """Get the current weather for a city."""
    return f"It is currently 70 degrees and cloudy in {city}"


db = SqliteDb(
    db_file="tmp/team_hitl_confirmation.db",
    session_table="team_sessions",
)

weather_agent = Agent(
    name="WeatherAgent",
    model=OpenAIResponses(id="gpt-5.2"),
    tools=[get_the_weather],
    db=db,
    telemetry=False,
)

weather_team = Team(
    id="weather-team-hitl",
    name="WeatherTeam",
    model=OpenAIResponses(id="gpt-5.2"),
    members=[weather_agent],
    db=db,
    add_history_to_context=True,
    telemetry=False,
)

agent_os = AgentOS(
    description="Slack Team HITL — member agent confirmation",
    teams=[weather_team],
    db=db,
    interfaces=[
        Slack(
            team=weather_team,
            reply_to_mentions_only=True,
        ),
    ],
)
app = agent_os.get_app()


if __name__ == "__main__":
    agent_os.serve(app="team_hitl_confirmation: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,slack]" fastmcp openai starlette
    ```
  </Step>

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

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

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

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

Full source: [cookbook/05\_agent\_os/interfaces/slack/team\_hitl\_confirmation.py](https://github.com/agno-agi/agno/blob/main/cookbook/05_agent_os/interfaces/slack/team_hitl_confirmation.py)
