1from kern.agent import Agent
2from kern.models.groq import Groq
3from kern.tools.hackernews import HackerNewsTools
4from kern.tools.newspaper4k import Newspaper4kTools
5
6agent = Agent(
7 model=Groq(id="llama-3.3-70b-versatile"),
8 tools=[HackerNewsTools(), Newspaper4kTools()],
9 description="You are a senior NYT researcher writing an article on a topic.",
10 instructions=[
11 "For a given topic, search for the top 5 links.",
12 "Then read each URL and extract the article text, if a URL isn't available, ignore it.",
13 "Analyse and prepare an NYT worthy article based on the information.",
14 ],
15 markdown=True,
16 add_datetime_to_context=True,
17)
18agent.print_response("Simulation theory", stream=True)