{"slug": "how-i-built-a-databricks-ai-agent-with-no-custom-tables-openai-agents-sdk-gradio", "title": "How I Built a Databricks AI Agent with No Custom Tables (OpenAI Agents SDK + Gradio)", "summary": "A developer built a fully working conversational AI agent on Databricks without custom tables or Vector Search, using only the built-in samples.tpch dataset. The stack includes OpenAI Agents SDK, Databricks Model Serving with Llama 3.3 70B, Databricks SQL Connector, MLflow, and Gradio UI deployed via Databricks Apps. Key challenges included using AsyncOpenAI instead of OpenAI, applying nest_asyncio, and using SQL Connector instead of Spark.", "body_md": "Most Databricks agent tutorials start with \"set up Unity Catalog and Vector Search first.\"\n\nThis one doesn't. I built a fully working conversational agent using only samples.tpch — the dataset that ships in every Databricks workspace by default. No custom tables, no Vector Search index, no catalog setup.\n\nThe stack:\n\n- OpenAI Agents SDK (with AsyncOpenAI — important, sync breaks it)\n- Databricks Model Serving (Llama 3.3 70B via OpenAI-compatible endpoint)\n- Databricks SQL Connector (not Spark — Apps have no Spark context)\n- MLflow for experiment tracking\n- Gradio chat UI deployed via Databricks Apps\n- OAuth credentials injected automatically — no tokens in code\n\n**The pattern that made it work:**\n\nWrite an AGENTS.md instruction file with constraints, folder structure, SQL queries, and a validation checklist. Run one Codex prompt. Get a complete working codebase.\n\ncodex \"implement everything described in AGENTS.md\"\n\nThe three errors that will block you if you don't know:\n\n- AsyncOpenAI not OpenAI — the Agents SDK is async internally, sync client crashes at the model call.\n- nest_asyncio.apply() at module load — Databricks notebooks run a persistent event loop, Runner.run_sync() fails without this patch.\n- SQL Connector not Spark — Databricks Apps have no Spark context, spark.sql() crashes silently in the App runtime.\nFull walkthrough with all errors, architecture, deployment steps, and production caveats:\n👉 Read the full article on\n[Medium](https://medium.com/@dipayan-x-das/build-a-databricks-ai-agent-in-one-session-no-unity-catalog-or-vector-search-required-7b79f589d316?sharedUserId=dipayan-x-das)\nGitHub: [github.com/dipayanthedata/DatabricksAgentDemo](https://github.com/dipayanthedata/DatabricksAgentDemo)", "url": "https://wpnews.pro/news/how-i-built-a-databricks-ai-agent-with-no-custom-tables-openai-agents-sdk-gradio", "canonical_source": "https://dev.to/dipayan_das/how-i-built-a-databricks-ai-agent-with-no-custom-tables-openai-agents-sdk-gradio-351m", "published_at": "2026-06-26 22:27:02+00:00", "updated_at": "2026-06-26 23:04:09.931343+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-agents", "developer-tools"], "entities": ["Databricks", "OpenAI", "Llama 3.3 70B", "MLflow", "Gradio", "GitHub", "Medium"], "alternates": {"html": "https://wpnews.pro/news/how-i-built-a-databricks-ai-agent-with-no-custom-tables-openai-agents-sdk-gradio", "markdown": "https://wpnews.pro/news/how-i-built-a-databricks-ai-agent-with-no-custom-tables-openai-agents-sdk-gradio.md", "text": "https://wpnews.pro/news/how-i-built-a-databricks-ai-agent-with-no-custom-tables-openai-agents-sdk-gradio.txt", "jsonld": "https://wpnews.pro/news/how-i-built-a-databricks-ai-agent-with-no-custom-tables-openai-agents-sdk-gradio.jsonld"}}