HackerNewsTools to fetch trending stories and user details.
1
Create a Python file
tools.py
2
Set up your virtual environment
3
Install dependencies
4
Export your Anthropic API key
5
Run Agent
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Give your agent tools to interact with external services.
HackerNewsTools to fetch trending stories and user details.
Create a Python file
from agno.agent import Agent
from agno.models.anthropic import Claude
from agno.tools.hackernews import HackerNewsTools
agent = Agent(
model=Claude(id="claude-sonnet-4-5"),
tools=[HackerNewsTools()],
instructions="Write a report on the topic.",
markdown=True,
)
agent.print_response("Trending AI startups on Hacker News", stream=True)
Set up your virtual environment
uv venv --python 3.12
source .venv/bin/activate
uv venv --python 3.12
.venv\Scripts\activate
Install dependencies
uv pip install -U agno anthropic
Export your Anthropic API key
export ANTHROPIC_API_KEY="your_anthropic_api_key_here"
$Env:ANTHROPIC_API_KEY="your_anthropic_api_key_here"
Run Agent
python tools.py
Was this page helpful?