from agno.agent import Agent
from agno.tools.redshift import RedshiftTools
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
# Example 1: Standard username/password authentication
agent = Agent(
tools=[
RedshiftTools(
user="your-username",
password="your-password",
)
]
)
# Example 2: IAM authentication with environment variables (Serverless)
agent_iam = Agent(
tools=[
RedshiftTools(
iam=True,
)
]
)
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
agent.print_response(
"List the tables in the database and describe one of the tables", markdown=True
)
agent_iam.print_response("Run a query to select 1 + 1 as result", markdown=True)