Skip to main content

Getting Started

You can get started with therix.ai and build your first AI Agent in less than 5 minutes.

Install Therix

Therix is available as a python package and can be installed using popular python package managers. See more details on installation on the installation page

To add therix to your python project, just run

pip install therix

This will add therix and all the required dependencies to add AI to your project.

Set necessary ENV VARS for using SDK version

In order to get therix working, you will need to provide the details for a Postgres SQL instance with the pgvector plugin enabled.

export THERIX_DB_HOST = 
export THERIX_DB_PORT =
export THERIX_DB_USERNAME =
export THERIX_DB_PASSWORD =
export THERIX_DB_NAME =

Build your first AI Agent

To build a simple data extractor agent, create a extractor.py file within your code.

Add the necessary imports

from therix.core.agent import Agent
from therix.core.data_sources import PDFDataSource
from therix.core.embedding_models import BedrockTitanEmbedding
from therix.core.inference_models import GroqMixtral87bInferenceModel
from therix.core.system_prompt_config import SystemPromptConfig
from therix.core.output_parser import OutputParserWrapper
from therix.core.summarizer_config import SummarizerConfig

Create a summarizer agent

text  = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lacinia odio vitae vestibulum vestibulum. Cras venenatis euismod malesuada. Nulla facilisi. Proin facilisis arcu ac semper tristique. Duis vehicula, magna eget consectetur auctor, enim nibh tristique urna, et feugiat sapien arcu non turpis. Sed nec risus id erat venenatis lacinia ac id erat. Nam tincidunt sapien ac risus facilisis, et ultricies libero cursus.'

agent = Agent(name="Awesome AI Summarizer")
(agent
.add(GroqMixtral87bInferenceModel(config={"groq_api_key": GROQ_API_KEY}))
.add(SummarizerConfig(SummarizerTypeMaster.EXTRACTIVE,TopicModel))
.save())

Execute it

LLM_response = agent.invoke(text)
print(LLM_response)

What next?

Explore the type of Agent Configurations Available to use in your AI Agents.