1
Set up environment
Create a virtual environment to isolate your project dependencies.
2
Install dependencies
Install Hypertic and the OpenAI package using pip or uv.
3
Set API key
Export your OpenAI API key as an environment variable.
4
Create tools
Define tool functions that your agent can use to interact with external systems.
5
Configure model
Initialize your language model with the desired parameters.
6
Add memory
Set up memory to store conversation history and maintain context across sessions. For this demo, we’ll use in-memory storage (use PostgreSQL/MongoDB in production).
7
Configure agent
Create your agent with the model, tools, and memory configuration.
8
Run the agent
Execute your agent with a query and get a response. You can use synchronous, asynchronous, or streaming methods.