Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs-v1.agno.com/llms.txt

Use this file to discover all available pages before exploring further.

HackerNews enables an Agent to search Hacker News website.

Example

The following agent will write an engaging summary of the users with the top 2 stories on hackernews along with the stories.
cookbook/tools/hackernews.py
from agno.agent import Agent
from agno.tools.hackernews import HackerNewsTools

agent = Agent(
    name="Hackernews Team",
    tools=[HackerNewsTools()],
    show_tool_calls=True,
    markdown=True,
)

agent.print_response(
    "Write an engaging summary of the "
    "users with the top 2 stories on hackernews. "
    "Please mention the stories as well.",
)

Toolkit Params

ParameterTypeDefaultDescription
get_top_storiesboolTrueEnables fetching top stories.
get_user_detailsboolTrueEnables fetching user details.

Toolkit Functions

FunctionDescription
get_top_hackernews_storiesRetrieves the top stories from Hacker News. Parameters include num_stories to specify the number of stories to return (default is 10). Returns the top stories in JSON format.
get_user_detailsRetrieves the details of a Hacker News user by their username. Parameters include username to specify the user. Returns the user details in JSON format.

Developer Resources