{"slug": "deploy-ai-agents-in-5-lines-of-code", "title": "Deploy AI agents in 5 lines of code.", "summary": "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.", "body_md": "Build AI-agents in 5 lines of code. Skip the set up & infrastructure. Live and running.\n\n``` python\nfrom custodian_labs import Custodian\n\napp = Custodian(\n    model=\"gpt-4o\",\n    system_prompt=\"You are a concise, helpful assistant.\",\n).deploy()\n\nprint(app.chat(\"Hello!\").response)\nprint(app.chat_url)  # ← live, shareable URL\n```\n\nRunnable [Colab notebook here](https://colab.research.google.com/gist/SherryCodes123/065d3b67eab16bdca416836e0d39475a/simple-ai-agents-rag-multi-agents.ipynb).\n\nDIYing 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.\n\nGrab a free API key from the [dashboard](https://dashboard.custodianlabs.io), then:\n\n```\n!pip install -q custodian-labs\npython\nimport os\nfrom getpass import getpass\nos.environ[\"CUSTODIAN_SDK_API_KEY\"] = getpass(\"API key: \")\npython\nfrom custodian_labs import Custodian\n\napp = Custodian(\n    model=\"gpt-4o\",\n    system_prompt=\"You are a concise, helpful assistant.\",\n).deploy()\n\nreply = app.chat(\"In one sentence, what can you help me with?\")\nprint(reply.response)\nprint(\"\\nShareable chat URL:\", app.chat_url)\n```\n\nWhat you get back:\n\n`app`\n\n— handle to a live hosted agent.`reply.response`\n\n— the text.`reply.session_id`\n\n— pass it to the next `.chat()`\n\nto continue the conversation.`app.chat_url`\n\n— live URL to a hosted chat UI. Paste in Slack, share with PMs, done.\n\n``` python\nfrom custodian_labs import Custodian\n\nagent = Custodian(\n    model=\"gpt-4o\",\n    system_prompt=(\n        \"You answer questions about the car dataset you've been given. \"\n        \"Be specific and cite the numbers.\"\n    ),\n)\nagent.add_data_source_file(\"data_examples/car_info.csv\")\napp = agent.deploy()\n\nreply = app.chat(\n    \"Which SUV has the best city MPG, and what is its annual maintenance cost?\"\n)\nprint(reply.response)\nprint(\"\\nShareable chat URL:\", app.chat_url)\n```\n\n`add_data_source_file`\n\nhandles 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.\n\nSame shape for all of them: write a system prompt, attach docs, deploy, share the URL.\n\nThe [Colab notebook](https://colab.research.google.com/gist/SherryCodes123/065d3b67eab16bdca416836e0d39475a/simple-ai-agents-rag-multi-agents.ipynb) runs end-to-end with sample data — bring no files, just a free key from the [dashboard](https://dashboard.custodianlabs.io). Should take ~1 min.\n\nI'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).\n\nNext posts coming on multi-agent teams with topic routing, and the PII / proprietary-data masking layer for legal and healthcare agents.", "url": "https://wpnews.pro/news/deploy-ai-agents-in-5-lines-of-code", "canonical_source": "https://dev.to/custodianlabs/deploy-ai-agents-in-5-lines-of-code-3fji", "published_at": "2026-06-29 23:28:53+00:00", "updated_at": "2026-06-29 23:48:32.348129+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "large-language-models", "generative-ai", "ai-infrastructure"], "entities": ["Custodian Labs", "Sherry", "OpenAI", "GPT-4o", "FastAPI", "Redis", "Colab"], "alternates": {"html": "https://wpnews.pro/news/deploy-ai-agents-in-5-lines-of-code", "markdown": "https://wpnews.pro/news/deploy-ai-agents-in-5-lines-of-code.md", "text": "https://wpnews.pro/news/deploy-ai-agents-in-5-lines-of-code.txt", "jsonld": "https://wpnews.pro/news/deploy-ai-agents-in-5-lines-of-code.jsonld"}}