import argparse
import asyncio

from strands import Agent, tool
from strands.models import BedrockModel
from strands_tools import calculator

@tool
def weather():
    """Get weather"""
    return "sunny"

model_id = "openai.gpt-oss-120b-1:0"
model = BedrockModel(
    model_id=model_id,
)
agent = Agent(
    model=model,
    # tools=[calculator],
    tools=[weather],
    system_prompt="You're a helpful assistant.",
)

# Async function that iterators over streamed agent events
async def process_streaming_response():
    agent_stream = agent.stream_async("Calculate 2+2 using a tool")
    async for event in agent_stream:
        print(event)

# Run the agent
asyncio.run(process_streaming_response())