1from kern.agent import Agent
2from kern.media import Image
3from kern.models.openai import OpenAIResponses
4from kern.tools.hackernews import HackerNewsTools
5
6agent = Agent(
7 model=OpenAIResponses(id="gpt-5-mini"),
8 tools=[HackerNewsTools()],
9 markdown=True,
10 add_history_to_context=True,
11 num_history_runs=3,
12)
13
14agent.print_response(
15 "Tell me about this image and give me the latest news about it.",
16 images=[
17 Image(
18 url="https://upload.wikimedia.org/wikipedia/commons/0/0c/GoldenGateBridge-001.jpg"
19 )
20 ],
21)
22
23agent.print_response("Tell me where I can get more images?")