{"id":53640,"date":"2025-08-18T16:47:45","date_gmt":"2025-08-18T06:47:45","guid":{"rendered":"https:\/\/www.cloudproinc.com.au\/?p=53640"},"modified":"2025-08-20T15:29:45","modified_gmt":"2025-08-20T05:29:45","slug":"build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk","status":"publish","type":"post","link":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/","title":{"rendered":"Build a Multi-Agent Assistant in Python with the OpenAI Agents SDK"},"content":{"rendered":"\n<p>This post &#8220;Build a Multi-Agent Assistant in Python with the OpenAI Agents SDK&#8221; shows how to build an AI agent that can (a) generate secure passwords, (b) tell the current time, and (c) hand off coding questions to a Python-tutor sub-agent. Along the way, we\u2019ll cover what the Agents SDK is, how to install it, and how the code works.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Agentic apps are everywhere now\u2014but what <em>is<\/em> an AI agent? In short, an agent is an LLM wrapped with goals (\u201cinstructions\u201d) and the ability to take actions (\u201ctools\u201d), loop on its own, and\u2014when it hits the edge of its expertise\u2014delegate to a specialist. The OpenAI Agents SDK gives you just enough primitives to build those systems without a framework learning curve: <strong>agents<\/strong>, <strong>tools<\/strong>, <strong>sessions<\/strong>, <strong>guardrails<\/strong>, and <strong>handoffs<\/strong> for delegation.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-audio\"><audio controls src=\"https:\/\/cloudproin-e5ddd09d0f1b51fcfd2f-endpoint.azureedge.net\/blobcloudproinf8788b00c9\/wp-content\/uploads\/2025\/08\/build-a-multi-agent-assistant-in-python-with-the-openai-agen.mp3\"><\/audio><\/figure>\n\n\n\n<div class=\"wp-block-yoast-seo-table-of-contents yoast-table-of-contents\"><h2>Table of contents<\/h2><ul><li><a href=\"#h-what-is-the-openai-agents-sdk\" data-level=\"2\">What is the OpenAI Agents SDK?<\/a><\/li><li><a href=\"#h-install-amp-prerequisites\" data-level=\"2\">Install &amp; prerequisites<\/a><\/li><li><a href=\"#h-the-building-blocks-in-your-code\" data-level=\"2\">The building blocks in your code<\/a><ul><li><a href=\"#h-1-environment-loading\" data-level=\"3\">1) Environment loading<\/a><\/li><li><a href=\"#h-2-tools-function-calling\" data-level=\"3\">2) Tools (function calling)<\/a><\/li><li><a href=\"#h-3-a-specialist-sub-agent\" data-level=\"3\">3) A specialist sub-agent<\/a><\/li><li><a href=\"#h-4-the-primary-triage-agent\" data-level=\"3\">4) The primary triage agent<\/a><\/li><li><a href=\"#h-5-running-the-agent\" data-level=\"3\">5) Running the agent<\/a><\/li><li><a href=\"#h-output\" data-level=\"3\">Output<\/a><\/li><\/ul><\/li><li><a href=\"#h-why-this-pattern-works\" data-level=\"2\">Why this pattern works<\/a><\/li><li><a href=\"#h-optional-enhancements\" data-level=\"2\">Optional enhancements<\/a><\/li><li><a href=\"#h-putting-it-all-together\" data-level=\"2\">Putting it all together<\/a><\/li><\/ul><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-the-openai-agents-sdk\">What is the OpenAI Agents SDK?<\/h2>\n\n\n\n<p>The<a href=\"https:\/\/openai.github.io\/openai-agents-python\/\" target=\"_blank\" rel=\"noreferrer noopener\"> Agents SDK<\/a> is a lightweight, Python-first framework for building multi-agent workflows. It ships with a built-in agent loop (so the model can call tools, get results, and continue), Pydantic-validated function tools (any Python function can be a tool), sessions for conversation history, tracing for debugging\/evals, and <strong>handoffs<\/strong> so one agent can delegate to another. It\u2019s designed to be ergonomic while staying close to plain Python.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-install-amp-prerequisites\">Install &amp; prerequisites<\/h2>\n\n\n\n<p>You\u2019ll need a recent Python (3.9+ is fine), <code>pip<\/code>, and an OpenAI API key.<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Install the SDK (per the docs):<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-70fdb7a0aeafb01d4b39921ef7e676e4\"><code>pip install openai-agents<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Optionally install helpers used by the example:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-66e0e9210c6fb1def49e4f669955859a\"><code>pip install python-dotenv<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Set your API key (shell or <code>.env<\/code>):<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-fb1de756568c1fe2885ebe95b56d3a6f\"><code>export OPENAI_API_KEY=sk-...\n# or .env:\n# OPENAI_API_KEY=sk-...<\/code><\/pre>\n\n\n\n<p>The official documentation\u2019s <em>Installation<\/em> section shows the current package name and the quickstart snippet. Always prefer what PyPI\/docs list for the latest command.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Tip: The SDK docs include a \u201cHello world\u201d that mirrors the same <code>Agent<\/code> + <code>Runner<\/code> shape you\u2019ll see in your script.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-building-blocks-in-your-code\">The building blocks in your code<\/h2>\n\n\n\n<p>Let\u2019s walk through the important parts of your script and relate them to the SDK\u2019s primitives.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-environment-loading\">1) Environment loading<\/h3>\n\n\n\n<p>You load environment variables early with <code>python-dotenv<\/code> if present, and fall back to a tiny parser that reads <code>KEY=VALUE<\/code> lines from <code>.env<\/code>. That ensures <code>OPENAI_API_KEY<\/code> is available by the time the SDK initializes\u2014matching the docs\u2019 guidance to export the key before running agents.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-tools-function-calling\">2) Tools (function calling)<\/h3>\n\n\n\n<p>You define two tools with the <code>@function_tool<\/code> decorator:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>generate_password(...)<\/code>: uses <code>secrets<\/code> and <code>string<\/code> to build a cryptographically strong password, ensuring category coverage (digits\/symbols\/upper\/lower) and shuffling via <code>SystemRandom<\/code>.<\/li>\n\n\n\n<li><code>get_time()<\/code>: returns the current timestamp in ISO 8601.<\/li>\n<\/ul>\n\n\n\n<p>The <strong>Function Tools<\/strong> concept is a first-class part of the SDK\u2014your plain Python functions become invokable tools with auto-generated JSON schemas and Pydantic validation. The LLM chooses when to call them during the agent loop.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-a-specialist-sub-agent\">3) A specialist sub-agent<\/h3>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-18c5ae2a83a42be4b56a170f10dd8892\"><code>python_tutor_agent = Agent(\n    name=\"Python Tutor\",\n    handoff_description=\"Specialist agent for Python coding questions\",\n    instructions=\"You provide assistance with Python code queries...\"\n)<\/code><\/pre>\n\n\n\n<p>This is a focused agent whose entire purpose is explaining Python code. It doesn\u2019t define its own tools; it\u2019s a domain expert you can delegate to.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-the-primary-triage-agent\">4) The primary triage agent<\/h3>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-79fa169f67ddf14256568b19e8b5340b\"><code>triage_agent = Agent(\n    name=\"My Agent\",\n    instructions=(\"You are a helpful agent. You can generate passwords, provide the current time, \"\n                  \"and hand off to a Python tutor agent for code-related queries.\"),\n    tools=&#91;generate_password, get_time],\n    handoffs=&#91;python_tutor_agent],\n)<\/code><\/pre>\n\n\n\n<p>This agent can call your two tools and, crucially, <em>handoff<\/em> to the Python Tutor. In the Agents SDK, <strong>handoffs<\/strong> are modeled so that one agent can delegate to another when the LLM decides a specialist is better suited\u2014an essential pattern for multi-agent apps.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-5-running-the-agent\">5) Running the agent<\/h3>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-74719aad0da0f93115e719c01cb11658\"><code>result = await Runner.run(triage_agent, input=\"generate a password, explain what is a class and tell me the current time\")\nprint(result.final_output)<\/code><\/pre>\n\n\n\n<p><code>Runner.run(...)<\/code> executes the agent loop: the LLM reads the prompt, decides which tool(s) to call (e.g., <code>generate_password<\/code>, <code>get_time<\/code>), and when it hits \u201cexplain what is a class,\u201d it can <strong>handoff<\/strong> to the Python Tutor agent to generate a clear explanation. The SDK\u2019s <code>Runner<\/code> is the orchestrator for these steps, and <code>result.final_output<\/code> yields the composed answer after the loop finishes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-output\">Output <\/h3>\n\n\n\n<p>Below is the output after running the agent.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"203\" data-src=\"\/wp-content\/uploads\/2025\/08\/image-11-1024x203.png\" alt=\"\" class=\"wp-image-53642 lazyload\" data-srcset=\"\/wp-content\/uploads\/2025\/08\/image-11-1024x203.png 1024w, \/wp-content\/uploads\/2025\/08\/image-11-300x59.png 300w, \/wp-content\/uploads\/2025\/08\/image-11-768x152.png 768w, \/wp-content\/uploads\/2025\/08\/image-11-1080x214.png 1080w, \/wp-content\/uploads\/2025\/08\/image-11-980x194.png 980w, \/wp-content\/uploads\/2025\/08\/image-11-480x95.png 480w, \/wp-content\/uploads\/2025\/08\/image-11.png 1217w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/203;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-why-this-pattern-works\">Why this pattern works<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Separation of concerns:<\/strong> The triage agent is a generalist; the tutor is a specialist. This mirrors production setups (support, sales, operations) where domain agents own their slices.<\/li>\n\n\n\n<li><strong>Deterministic actions:<\/strong> Security-sensitive work (like password generation) stays in trusted Python code, not in the model\u2019s text output. That\u2019s exactly what tools are for.&nbsp;<\/li>\n\n\n\n<li><strong>Extensibility:<\/strong> You can add more tools (e.g., \u201ccreate Jira issue\u201d) or more specialists (e.g., \u201cBilling Agent\u201d). The same handoff mechanism scales across domains.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-optional-enhancements\">Optional enhancements<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Guardrails:<\/strong> Validate inputs\/outputs (e.g., enforce a minimum password length) and short-circuit bad requests before they reach the LLM.<\/li>\n\n\n\n<li><strong>Sessions &amp; memory:<\/strong> Keep conversation context across turns so the agent remembers prior choices.<\/li>\n\n\n\n<li><strong>Tracing:<\/strong> Turn on tracing to visualize each tool call and handoff while you test. It\u2019s built in.&nbsp;<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-putting-it-all-together\">Putting it all together<\/h2>\n\n\n\n<p>This tiny program demonstrates the whole agentic arc: a prompt comes in, the agent autonomously chooses tools, delegates a slice to a sub-agent via handoff, and returns a neat, unified answer. Thanks to the Agents SDK\u2019s minimal primitives\u2014and Python functions as tools\u2014you can evolve this into a real application without swapping frameworks or rewriting your mental model. If you want to go deeper, the docs include sections for <strong>Agents<\/strong>, <strong>Tools<\/strong>, and <strong>Handoffs<\/strong> with more patterns and examples.&nbsp;<\/p>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>This post &#8220;Build a Multi-Agent Assistant in Python with the OpenAI Agents SDK&#8221; shows how to build an AI agent that can (a) generate secure passwords, (b) tell the current time, and (c) hand off coding questions to a Python-tutor sub-agent. Along the way, we\u2019ll cover what the Agents SDK is, how to install it, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":53663,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"Build a Multi-Agent Assistant in Python with the OpenAI Agents SDK","_yoast_wpseo_title":"Build a Multi-Agent Assistant in Python Step by Step %%page%% %%sep%% %%sitename%%","_yoast_wpseo_metadesc":"Learn to build a Multi-Agent Assistant in Python with the OpenAI Agents SDK. Generate passwords and solve coding questions.","_yoast_wpseo_opengraph-title":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_twitter-title":"","_yoast_wpseo_twitter-description":"","_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[80,13,53,79],"tags":[],"class_list":["post-53640","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-agents","category-blog","category-openai","category-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Build a Multi-Agent Assistant in Python Step by Step - CPI Consulting<\/title>\n<meta name=\"description\" content=\"Learn to build a Multi-Agent Assistant in Python with the OpenAI Agents SDK. Generate passwords and solve coding questions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Build a Multi-Agent Assistant in Python with the OpenAI Agents SDK\" \/>\n<meta property=\"og:description\" content=\"Learn to build a Multi-Agent Assistant in Python with the OpenAI Agents SDK. Generate passwords and solve coding questions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/\" \/>\n<meta property=\"og:site_name\" content=\"CPI Consulting\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-18T06:47:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-20T05:29:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudproinc.com.au\/wp-content\/uploads\/2025\/08\/build-a-multi-agent-assistant-in-python-with-the-openai-agen-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CPI Staff\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CPI Staff\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/\"},\"author\":{\"name\":\"CPI Staff\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#\\\/schema\\\/person\\\/192eeeb0ce91062126ce3822ae88fe6e\"},\"headline\":\"Build a Multi-Agent Assistant in Python with the OpenAI Agents SDK\",\"datePublished\":\"2025-08-18T06:47:45+00:00\",\"dateModified\":\"2025-08-20T05:29:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/\"},\"wordCount\":850,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/#primaryimage\"},\"thumbnailUrl\":\"\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agen-1.png\",\"articleSection\":[\"AI Agents\",\"Blog\",\"OpenAI\",\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/#respond\"]}],\"accessibilityFeature\":[\"tableOfContents\"]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/\",\"url\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/\",\"name\":\"Build a Multi-Agent Assistant in Python Step by Step - CPI Consulting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/#primaryimage\"},\"thumbnailUrl\":\"\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agen-1.png\",\"datePublished\":\"2025-08-18T06:47:45+00:00\",\"dateModified\":\"2025-08-20T05:29:45+00:00\",\"description\":\"Learn to build a Multi-Agent Assistant in Python with the OpenAI Agents SDK. Generate passwords and solve coding questions.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/#primaryimage\",\"url\":\"\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agen-1.png\",\"contentUrl\":\"\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agen-1.png\",\"width\":1536,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2025\\\/08\\\/18\\\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/cloudproinc.com.au\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Build a Multi-Agent Assistant in Python with the OpenAI Agents SDK\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#website\",\"url\":\"https:\\\/\\\/cloudproinc.com.au\\\/\",\"name\":\"Cloud Pro Inc - CPI Consulting Pty Ltd\",\"description\":\"Cloud, AI &amp; Cybersecurity Consulting | Melbourne\",\"publisher\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/cloudproinc.com.au\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#organization\",\"name\":\"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd\",\"url\":\"https:\\\/\\\/cloudproinc.com.au\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/favfinalfile.png\",\"contentUrl\":\"\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/favfinalfile.png\",\"width\":500,\"height\":500,\"caption\":\"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd\"},\"image\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/#\\\/schema\\\/person\\\/192eeeb0ce91062126ce3822ae88fe6e\",\"name\":\"CPI Staff\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g\",\"caption\":\"CPI Staff\"},\"sameAs\":[\"http:\\\/\\\/www.cloudproinc.com.au\"],\"url\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/author\\\/cpiadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Build a Multi-Agent Assistant in Python Step by Step - CPI Consulting","description":"Learn to build a Multi-Agent Assistant in Python with the OpenAI Agents SDK. Generate passwords and solve coding questions.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/","og_locale":"en_US","og_type":"article","og_title":"Build a Multi-Agent Assistant in Python with the OpenAI Agents SDK","og_description":"Learn to build a Multi-Agent Assistant in Python with the OpenAI Agents SDK. Generate passwords and solve coding questions.","og_url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/","og_site_name":"CPI Consulting","article_published_time":"2025-08-18T06:47:45+00:00","article_modified_time":"2025-08-20T05:29:45+00:00","og_image":[{"width":1536,"height":1024,"url":"https:\/\/cloudproinc.com.au\/wp-content\/uploads\/2025\/08\/build-a-multi-agent-assistant-in-python-with-the-openai-agen-1.png","type":"image\/png"}],"author":"CPI Staff","twitter_card":"summary_large_image","twitter_misc":{"Written by":"CPI Staff","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/#article","isPartOf":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/"},"author":{"name":"CPI Staff","@id":"https:\/\/cloudproinc.com.au\/#\/schema\/person\/192eeeb0ce91062126ce3822ae88fe6e"},"headline":"Build a Multi-Agent Assistant in Python with the OpenAI Agents SDK","datePublished":"2025-08-18T06:47:45+00:00","dateModified":"2025-08-20T05:29:45+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/"},"wordCount":850,"commentCount":0,"publisher":{"@id":"https:\/\/cloudproinc.com.au\/#organization"},"image":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2025\/08\/build-a-multi-agent-assistant-in-python-with-the-openai-agen-1.png","articleSection":["AI Agents","Blog","OpenAI","Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/#respond"]}],"accessibilityFeature":["tableOfContents"]},{"@type":"WebPage","@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/","url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/","name":"Build a Multi-Agent Assistant in Python Step by Step - CPI Consulting","isPartOf":{"@id":"https:\/\/cloudproinc.com.au\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/#primaryimage"},"image":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2025\/08\/build-a-multi-agent-assistant-in-python-with-the-openai-agen-1.png","datePublished":"2025-08-18T06:47:45+00:00","dateModified":"2025-08-20T05:29:45+00:00","description":"Learn to build a Multi-Agent Assistant in Python with the OpenAI Agents SDK. Generate passwords and solve coding questions.","breadcrumb":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/#primaryimage","url":"\/wp-content\/uploads\/2025\/08\/build-a-multi-agent-assistant-in-python-with-the-openai-agen-1.png","contentUrl":"\/wp-content\/uploads\/2025\/08\/build-a-multi-agent-assistant-in-python-with-the-openai-agen-1.png","width":1536,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/18\/build-a-multi-agent-assistant-in-python-with-the-openai-agents-sdk\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudproinc.com.au\/"},{"@type":"ListItem","position":2,"name":"Build a Multi-Agent Assistant in Python with the OpenAI Agents SDK"}]},{"@type":"WebSite","@id":"https:\/\/cloudproinc.com.au\/#website","url":"https:\/\/cloudproinc.com.au\/","name":"Cloud Pro Inc - CPI Consulting Pty Ltd","description":"Cloud, AI &amp; Cybersecurity Consulting | Melbourne","publisher":{"@id":"https:\/\/cloudproinc.com.au\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudproinc.com.au\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudproinc.com.au\/#organization","name":"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd","url":"https:\/\/cloudproinc.com.au\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudproinc.com.au\/#\/schema\/logo\/image\/","url":"\/wp-content\/uploads\/2022\/01\/favfinalfile.png","contentUrl":"\/wp-content\/uploads\/2022\/01\/favfinalfile.png","width":500,"height":500,"caption":"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd"},"image":{"@id":"https:\/\/cloudproinc.com.au\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/cloudproinc.com.au\/#\/schema\/person\/192eeeb0ce91062126ce3822ae88fe6e","name":"CPI Staff","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g","caption":"CPI Staff"},"sameAs":["http:\/\/www.cloudproinc.com.au"],"url":"https:\/\/cloudproinc.com.au\/index.php\/author\/cpiadmin\/"}]}},"jetpack_featured_media_url":"\/wp-content\/uploads\/2025\/08\/build-a-multi-agent-assistant-in-python-with-the-openai-agen-1.png","jetpack-related-posts":[{"id":53658,"url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/20\/building-guardrails-in-the-openai-agent-sdk\/","url_meta":{"origin":53640,"position":0},"title":"Building Guardrails in the OpenAI Agent SDK","author":"CPI Staff","date":"August 20, 2025","format":false,"excerpt":"This OpenAI Agent post \"Building Guardrails in the OpenAI Agent SDK\" will explain how to implement a gurdrail system that protact the Agent from misuse. Table of contentsWhat Are Guardrails?Example: A Python-Only GuardrailIntegrating Guardrails Into the Main AgentTesting the GuardrailWhy Guardrails MatterGuardrails as Part of a Larger Agent DesignConclusion In\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.com.au\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/08\/Guardrails.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/08\/Guardrails.png 1x, \/wp-content\/uploads\/2025\/08\/Guardrails.png 1.5x, \/wp-content\/uploads\/2025\/08\/Guardrails.png 2x, \/wp-content\/uploads\/2025\/08\/Guardrails.png 3x, \/wp-content\/uploads\/2025\/08\/Guardrails.png 4x"},"classes":[]},{"id":53667,"url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/08\/21\/build-git-mcp-server-with-the-openai-agents-sdk\/","url_meta":{"origin":53640,"position":1},"title":"Build Git MCP Server with the OpenAI Agents SDK","author":"CPI Staff","date":"August 21, 2025","format":false,"excerpt":"This OpenAI post \"Build Git MCP Server with the OpenAI Agents SDK\" shows how to implement an MCP Server into an agent. Table of contentsWhat\u2019s the Git MCP server?Why MCP with the Agents SDK?Packages you needComponents in the codeTypes of MCP servers (transports)How the run worksScoping Git operations to a\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.com.au\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/08\/build-git-mcp-server-with-the-openai-agents-sdk.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/08\/build-git-mcp-server-with-the-openai-agents-sdk.png 1x, \/wp-content\/uploads\/2025\/08\/build-git-mcp-server-with-the-openai-agents-sdk.png 1.5x, \/wp-content\/uploads\/2025\/08\/build-git-mcp-server-with-the-openai-agents-sdk.png 2x, \/wp-content\/uploads\/2025\/08\/build-git-mcp-server-with-the-openai-agents-sdk.png 3x, \/wp-content\/uploads\/2025\/08\/build-git-mcp-server-with-the-openai-agents-sdk.png 4x"},"classes":[]},{"id":57238,"url":"https:\/\/cloudproinc.com.au\/index.php\/2026\/03\/16\/what-microsoft-agent-framework-means-for-real-world-ai-delivery\/","url_meta":{"origin":53640,"position":2},"title":"What Microsoft Agent Framework Means for Real-World AI Delivery","author":"CPI Staff","date":"March 16, 2026","format":false,"excerpt":"Microsoft Agent Framework gives businesses a more practical path from AI demo to secure, usable workflow with better control, integration, and governance.","rel":"","context":"In &quot;AI Agents&quot;","block_context":{"text":"AI Agents","link":"https:\/\/cloudproinc.com.au\/index.php\/category\/ai-agents\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2026\/03\/post-18.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2026\/03\/post-18.png 1x, \/wp-content\/uploads\/2026\/03\/post-18.png 1.5x, \/wp-content\/uploads\/2026\/03\/post-18.png 2x, \/wp-content\/uploads\/2026\/03\/post-18.png 3x, \/wp-content\/uploads\/2026\/03\/post-18.png 4x"},"classes":[]},{"id":53555,"url":"https:\/\/cloudproinc.com.au\/index.php\/2025\/07\/29\/counting-tokens-using-the-openai-python-sdk\/","url_meta":{"origin":53640,"position":3},"title":"Counting Tokens Using the OpenAI Python SDK","author":"CPI Staff","date":"July 29, 2025","format":false,"excerpt":"This post provides a comprehensive guide on counting tokens using the OpenAI Python SDK, covering Python virtual environments, managing your OpenAI API key securely, and the role of the requirements.txt file. In the world of Large Language Models (LLMs) and Artificial Intelligence (AI), the term \"token\" frequently arises. Tokens are\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.com.au\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/07\/image-23.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/07\/image-23.png 1x, \/wp-content\/uploads\/2025\/07\/image-23.png 1.5x, \/wp-content\/uploads\/2025\/07\/image-23.png 2x"},"classes":[]},{"id":57294,"url":"https:\/\/cloudproinc.com.au\/index.php\/2026\/03\/18\/microsoft-ai-foundry-hq-closes-the-gap-between-ai-experimentation-and-enterprise-grade-deployment\/","url_meta":{"origin":53640,"position":4},"title":"Microsoft AI Foundry HQ Closes the Gap Between AI Experimentation and Enterprise-Grade Deployment","author":"CPI Staff","date":"March 18, 2026","format":false,"excerpt":"Most Australian organisations have the same AI problem right now. The proof of concept worked. Leadership approved the budget. And then everything stalled. The gap between a successful AI experiment and a production-grade enterprise deployment is wider than anyone expected. Models need governance. Agents need monitoring. Compliance teams need audit\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/cloudproinc.com.au\/index.php\/category\/ai\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2026\/03\/microsoft-ai-foundry-hq-closes-gap-ai-experimentation-enterprise-deployment-cover.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2026\/03\/microsoft-ai-foundry-hq-closes-gap-ai-experimentation-enterprise-deployment-cover.png 1x, \/wp-content\/uploads\/2026\/03\/microsoft-ai-foundry-hq-closes-gap-ai-experimentation-enterprise-deployment-cover.png 1.5x, \/wp-content\/uploads\/2026\/03\/microsoft-ai-foundry-hq-closes-gap-ai-experimentation-enterprise-deployment-cover.png 2x, \/wp-content\/uploads\/2026\/03\/microsoft-ai-foundry-hq-closes-gap-ai-experimentation-enterprise-deployment-cover.png 3x, \/wp-content\/uploads\/2026\/03\/microsoft-ai-foundry-hq-closes-gap-ai-experimentation-enterprise-deployment-cover.png 4x"},"classes":[]},{"id":57265,"url":"https:\/\/cloudproinc.com.au\/index.php\/2026\/03\/16\/how-ai-agents-will-reshape-the-modern-workplace-for-business\/","url_meta":{"origin":53640,"position":5},"title":"How AI Agents Will Reshape the Modern Workplace for Business","author":"CPI Staff","date":"March 16, 2026","format":false,"excerpt":"AI agents can cut admin work, speed decisions, and improve service without adding headcount. Here is what they are, how they work, and where mid-sized businesses should start.","rel":"","context":"In &quot;AI Agents&quot;","block_context":{"text":"AI Agents","link":"https:\/\/cloudproinc.com.au\/index.php\/category\/ai-agents\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2026\/03\/post-26.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2026\/03\/post-26.png 1x, \/wp-content\/uploads\/2026\/03\/post-26.png 1.5x, \/wp-content\/uploads\/2026\/03\/post-26.png 2x, \/wp-content\/uploads\/2026\/03\/post-26.png 3x, \/wp-content\/uploads\/2026\/03\/post-26.png 4x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/posts\/53640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=53640"}],"version-history":[{"count":4,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/posts\/53640\/revisions"}],"predecessor-version":[{"id":53664,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/posts\/53640\/revisions\/53664"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/media\/53663"}],"wp:attachment":[{"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=53640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/categories?post=53640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudproinc.com.au\/index.php\/wp-json\/wp\/v2\/tags?post=53640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}