1from kern.agent import Agent
2from kern.models.mistral import MistralChat
3from kern.tools.hackernews import HackerNewsTools
4from pydantic import BaseModel
5
6class Person(BaseModel):
7 name: str
8 description: str
9
10model = MistralChat(
11 id="mistral-medium-latest",
12 temperature=0.0,
13)
14
15researcher = Agent(
16 name="Researcher",
17 model=model,
18 role="You find people with a specific role at a provided company.",
19 instructions=[
20 "- Search the web for the person described"
21 "- Find out if they have public contact details"
22 "- Return the information in a structured format"
23 ],
24 tools=[HackerNewsTools()],
25 output_schema=Person,
26 add_datetime_to_context=True,
27)
28
29researcher.print_response("Find information about Elon Musk")