Quickstart
Guide to get up and running with your first Agentic Deployment!
Account Creation
If you already have an account, you are ready to get started. If you don't have an account, please get in touch so we can help you create one.
Prerequisites
You need | Why it matters | How to provide it |
---|---|---|
Python 3.11+ | Fairo SDK requires 3.11 or newer | python --version |
Virtual environment (recommended) | Isolate SDK dependencies | python -m venv fairo_env && source fairo_env/bin/activate |
Set Up
Install the SDK
The package is available on PyPI:
pip install fairo
Authentication
Generate your API key and secret here.
Then export them in your environment:
export FAIRO_API_ACCESS_KEY_ID=<your-key>
export FAIRO_API_SECRET=<your-secret>
Create an Agent
Agents can be built using nearly any OpenSource framework including, LangChain, Crew, Open AI Agents, Pydantic Agents , and more!
blog_ideas_agent.py
blog_ideas_agent.py
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
from fairo.core.chat import ChatFairo
def ideasforblogpost():
template = """
You are an expert Blog-Post Idea Generator.
When given a topic, you must output a list of 10 creative blog post titles,
each on its own line.
Topic: {topic}
"""
prompt = PromptTemplate(
input_variables=["topic"],
template=template
)
chain = LLMChain(
llm=ChatFairo(),
prompt=prompt,
verbose=False,
)
return chain
Run Agent with FairoExecutor
FairoExecutor
Create a new file to invoke the execution and build your chain.
execute.py
execute.py
from fairo.core.execution.executor import FairoExecutor
from blog_ideas_agent import ideasforblogpost
FairoExecutor(
agents=[ideasforblogpost],
input_fields=["topic"]
).run({"topic": "LLMs"})
Input field is required and should contain the keys your agent is expecting to receive
Run your agent
python execute.py
Visualize your Traces
Once your run
is completed, you can see your traces here.

Deploy your Agent
Once you have a Trace / corresponding version of your Agent that you are ready to deploy, it is time to create a runnable.
Create a Runnable from a Trace
A Runnable is an artifact saved while your traces were generated. It's used to create point-in-time versions of your executions, allowing you to re-test them and easily deploy them for production.
Navigate to traces, select the trace you want to save as a runnable click on Register as Runnable
and provide a name and description.


Test your Runnable
You can test your runnable by running FairoExecutor
with the Runnable ID.
To get the runnable ID, navigate to your runnable details and copy the ID from the three dots menu.

And then run:
execute.py
execute.py
from fairo.core.execution.executor import FairoExecutor
from fairo.core.runnable.runnable import Runnable
FairoExecutor(
runnable=Runnable(
id="<your-runnable-id>"
)
).run("Machine Learning")
Create a new Deployment
- Click on the runnable name to expand the left side bar
- Click on
Create New Deployment

Configure your Deployment
Permissions
You can provide specific access permissions for your production deployments. The available options are:
Access
- Everyone - All users can access this deployment
- Only Me - Only you can access this deployment
- Specific Roles - Only selected roles can access this deployment
Edit
- Everyone - All users can edit this deployment
- Only Me - Only you can edit this deployment
- Specific Roles - Only selected roles can edit this deployment
If you select specific roles, you must select the roles that will be able to access the deployment.
You can manage your roles here
Variables and Secrets (Optional)
You can provide your production-specific variables and secrets to be replaced during execution time. If you are using any sensitive credentials in your flow, we strongly recommend you use the secrets vault to securely store and use them. Avoid saving your credentials directly in your runnable code.
Guardrails (Optional)
We only apply guardrails to user inputs and final outputs, and all filtering actions are fully logged in the trace — nothing is hidden.
The available guardrails options are:
PII Filtering
Removes personally identifiable information from prompts and responses.
You can select multiple options from the following:
- General - Masks Phone, Email, Address, Age, Username, Password, Driver ID, License plate, Vehicle Identification Number (VIN)
- Finance - Masks CVV, Credit/Debit card expiry, Credit/Debit card number, Personal Identification Number (PIN), International Bank Account Number, SWIFT code
- IT - Masks IPv4 address, Media Access Control (MAC) address, Web address, AWS access key, AWS secret key
- USA Specific - Masks US passport number, US Social Security Number (SSN), US Individual Taxpayer Identification Number (ITIN), US bank account number, US bank account routing number
- Canada Specific - Masks Canadian Health Service Number, Canadian Social Insurance Number (SIN)
Toxicity Filtering
Filters content for the following categories: Hate, Insults, Sexual, and Misconduct.
You can select one of the following options:
- Low - Blocks only the most extreme toxic content such as threats or hate speech
- Medium - Filters a balanced level of harmful language including insults, harassment, and offensive comments
- High - Applies the strictest filtering to remove even mild toxicity or potentially harmful tone
Profanity Filtering
Blocks profane and offensive language from prompts and responses.
You can toggle it as enabled/disabled.
Deploy Runnable
Once you are ready with your deployment settings, click the Deploy Runnable
button and your deployment will be ready.

Test your Deployment
To test your deployment, select the 'Try Interface' button to generate specific instructions for your deployment.
You'll need your API credentials to access the endpoint.
import requests
import base64
# Your API credentials
api_key = "your_api_key"
secret = "your_secret"
# Create basic auth header
credentials = f"{api_key}:{secret}"
basic_auth = base64.b64encode(credentials.encode()).decode()
# Make the request
url = "https://api.ai-gov-sys-devportal.com/gateway/deployment?id=4342e50c-eada-49c5-a01c-b835d0d140b1"
headers = {
"Content-Type": "application/json",
"Authorization": f"Basic {basic_auth}"
}
data = {
"input_body": {
"topic": "<your-prompt>"
}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
curl --location 'https://api.ai-gov-sys-devportal.com/gateway/deployment?id=4342e50c-eada-49c5-a01c-b835d0d140b1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic {{your_basic_auth}}' \
--data '{
"input_body": {
"topic": "<your-prompt>"
}
}'
Next Steps
Check our our Tutorials, or take a deep dive into our Platform and Integrations.
Updated 26 days ago