cd /news/ai-agents/deploy-ai-agents-in-5-lines-of-code Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-44123] src=dev.to β†— pub= topic=ai-agents verified=true sentiment=↑ positive

Deploy AI agents in 5 lines of code.

Custodian Labs has launched a Python SDK that enables developers to deploy AI agents in five lines of code, handling infrastructure, hosting, and chat UI automatically. The tool supports adding data sources like CSV and PDF files for retrieval-augmented generation, and provides a shareable URL for each deployed agent. The company aims to eliminate the weeks of plumbing typically required for building and deploying AI agents.

read2 min views1 publishedJun 29, 2026

Build AI-agents in 5 lines of code. Skip the set up & infrastructure. Live and running.

from custodian_labs import Custodian

app = Custodian(
    model="gpt-4o",
    system_prompt="You are a concise, helpful assistant.",
).deploy()

print(app.chat("Hello!").response)
print(app.chat_url)  # ← live, shareable URL

Runnable Colab notebook here.

DIYing this: FastAPI behind a reverse proxy + Redis for sessions + a small frontend + an auth layer + a vector DB and ingestion pipeline. All of it is annoying. Most teams burn weeks on plumbing before the interesting work even starts.

Grab a free API key from the dashboard, then:

!pip install -q custodian-labs
python
import os
from getpass import getpass
os.environ["CUSTODIAN_SDK_API_KEY"] = getpass("API key: ")
python
from custodian_labs import Custodian

app = Custodian(
    model="gpt-4o",
    system_prompt="You are a concise, helpful assistant.",
).deploy()

reply = app.chat("In one sentence, what can you help me with?")
print(reply.response)
print("\nShareable chat URL:", app.chat_url)

What you get back:

app

β€” handle to a live hosted agent.reply.response

β€” the text.reply.session_id

β€” pass it to the next .chat()

to continue the conversation.app.chat_url

β€” live URL to a hosted chat UI. Paste in Slack, share with PMs, done.

from custodian_labs import Custodian

agent = Custodian(
    model="gpt-4o",
    system_prompt=(
        "You answer questions about the car dataset you've been given. "
        "Be specific and cite the numbers."
    ),
)
agent.add_data_source_file("data_examples/car_info.csv")
app = agent.deploy()

reply = app.chat(
    "Which SUV has the best city MPG, and what is its annual maintenance cost?"
)
print(reply.response)
print("\nShareable chat URL:", app.chat_url)

add_data_source_file

handles chunking, embedding, and retrieval at chat time. Works on CSVs, PDFs, and the usual suspects β€” calling code doesn't change whether you point it at a CSV or a folder of contracts.

Same shape for all of them: write a system prompt, attach docs, deploy, share the URL.

The Colab notebook runs end-to-end with sample data β€” bring no files, just a free key from the dashboard. Should take ~1 min.

I'd genuinely love feedback β€” what's missing, what's confusing, what would make you actually use it. Feature requests very welcome. Drop them in the comments, or email ** sherry@custodianlabs.io** if you build something with it (or break it in an interesting way).

Next posts coming on multi-agent teams with topic routing, and the PII / proprietary-data masking layer for legal and healthcare agents.

── more in #ai-agents 4 stories Β· sorted by recency
── more on @custodian labs 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/deploy-ai-agents-in-…] indexed:0 read:2min 2026-06-29 Β· β€”