Build AI Agents
Hypertic is the fastest and easiest way to build AI agents that can use any large language model, tools, and knowledge bases, while maintaining context and handling complex tasks..
pip install hyperticexample.py
example.py×
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from hypertic.agent import Agent
from hypertic.tools import Calculator, FileReader
from hypertic.model.openai import OpenAIChat
# Define a custom tool
@tool
def get_weather(city: str) - > str:
"""Get weather for a city."""
return f"Sunny, 72°F in {city}"
# Create agent with tools
agent = Agent(
model=OpenAIChat(model="gpt-4"),
tools=[get_weather],
instructions="You are a weather assistant.",
)
# Use it
result = agent.run("What’s the weather in San Francisco?")
print(result)If you're new to Hypertic, follow the quickstart to build your first Agent or explore the examples to see the framework in action.