<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Issues with Custom Agents on Free Edition in Databricks Free Edition Help</title>
    <link>https://community.databricks.com/t5/databricks-free-edition-help/issues-with-custom-agents-on-free-edition/m-p/165724#M867</link>
    <description>&lt;P&gt;I have ran into a few issues while learning how to use Custom Agents in Databricks Apps that I would like to call out - both to help others and hopefully motivate platform improvements.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The only model that seems to work is &lt;EM&gt;databricks-meta-llama-3-3-70b-instruct&lt;/EM&gt;, but I only found that out through a DataExpert.io YouTube video. It would be nice if the app templates would default to this or at least provide some guidance on the Free Edition limitations page.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Recent changes to MCP have caused issues with the default OpenAI Agents SDK app template. You have to manually add&amp;nbsp;"mcp&amp;lt;2.0.0" to the dependencies in pyproject.toml to get it up and running.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The second message from the user starts to cause errors. I haven't figured out how to solve this, but it is something related to the format of the message chain. For example:&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="markup"&gt;{
  "detail": "Unhandled item type or structure: {'status': None, 'content': [{'text': \"Hello, it's nice to meet you. Is there something I can help you with or would you like to chat?\", 'type': 'output_text'}], 'role': 'assistant', 'type': 'message'}"
}​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 15 Aug 2026 19:03:59 GMT</pubDate>
    <dc:creator>taniumalloy</dc:creator>
    <dc:date>2026-08-15T19:03:59Z</dc:date>
    <item>
      <title>Issues with Custom Agents on Free Edition</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/issues-with-custom-agents-on-free-edition/m-p/165724#M867</link>
      <description>&lt;P&gt;I have ran into a few issues while learning how to use Custom Agents in Databricks Apps that I would like to call out - both to help others and hopefully motivate platform improvements.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The only model that seems to work is &lt;EM&gt;databricks-meta-llama-3-3-70b-instruct&lt;/EM&gt;, but I only found that out through a DataExpert.io YouTube video. It would be nice if the app templates would default to this or at least provide some guidance on the Free Edition limitations page.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Recent changes to MCP have caused issues with the default OpenAI Agents SDK app template. You have to manually add&amp;nbsp;"mcp&amp;lt;2.0.0" to the dependencies in pyproject.toml to get it up and running.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The second message from the user starts to cause errors. I haven't figured out how to solve this, but it is something related to the format of the message chain. For example:&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="markup"&gt;{
  "detail": "Unhandled item type or structure: {'status': None, 'content': [{'text': \"Hello, it's nice to meet you. Is there something I can help you with or would you like to chat?\", 'type': 'output_text'}], 'role': 'assistant', 'type': 'message'}"
}​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Aug 2026 19:03:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/issues-with-custom-agents-on-free-edition/m-p/165724#M867</guid>
      <dc:creator>taniumalloy</dc:creator>
      <dc:date>2026-08-15T19:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Custom Agents on Free Edition</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/issues-with-custom-agents-on-free-edition/m-p/166143#M874</link>
      <description>&lt;P&gt;On the third issue (errors starting from the second user message) - this looks like it's coming from how the app's own conversation-history handling deals with items from the OpenAI Agents SDK's output, rather than from the model or MCP layer itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The payload in your error - {'status': None, 'content': [{'text': ..., 'type': 'output_text'}], 'role': 'assistant', 'type': 'message'} - is a standard "message" item shape from the Agents SDK / Responses API (roughly what you'd see from a run's output items, or from to_input_list()). If the app template keeps its own conversation state by appending previous turns and only handles a subset of item shapes (e.g. assumes content is a flat string, or only expects tool-call/tool-output items), a "message" item where content is a list of output_text objects can trip up whatever code path builds the next request - which would explain why it works on the first turn (no history yet) and breaks as soon as a prior assistant message has to be folded back in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Worth checking wherever the template reconstructs the input/message history between turns for a type or role check that doesn't have a branch for type == "message" with a list-shaped content. If you're passing to_input_list() straight from the SDK, that should normalize this correctly already, so the bug is more likely in custom glue code the template layers on top of it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the other two - the model limitation and the mcp&amp;lt;2.0.0 pin both sound like genuine doc/template maintenance gaps rather than expected behavior, so worth filing them as explicit feedback (in-product feedback widget or docs feedback link) so they get tracked rather than staying tribal knowledge from a YouTube video.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2026 13:13:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/issues-with-custom-agents-on-free-edition/m-p/166143#M874</guid>
      <dc:creator>DoTA</dc:creator>
      <dc:date>2026-08-21T13:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Custom Agents on Free Edition</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/issues-with-custom-agents-on-free-edition/m-p/166349#M875</link>
      <description>&lt;P&gt;For the issue I described above, it may be related to the model I am using: "&lt;SPAN&gt;databricks-meta-llama-3-3-70b-instruct". I got it to work by using this on the agent input:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        # messages = [i.model_dump() for i in request.input]
        messages = to_chat_completions_input([i.model_dump() for i in request.input])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2026 19:50:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/issues-with-custom-agents-on-free-edition/m-p/166349#M875</guid>
      <dc:creator>taniumalloy</dc:creator>
      <dc:date>2026-08-24T19:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Custom Agents on Free Edition</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/issues-with-custom-agents-on-free-edition/m-p/166493#M880</link>
      <description>&lt;P&gt;Following up on this, there is an open PR for this issue that details what is going on:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/databricks/app-templates/pull/256" target="_blank"&gt;https://github.com/databricks/app-templates/pull/256&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I added this code to utils.py&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;def to_runner_input(request: ResponsesAgentRequest) -&amp;gt; list[dict]:
    """Normalize Responses history into items Runner.items_to_messages accepts.

    Chat UIs echo prior assistant messages as type=message with output_text parts
    and no id (and Pydantic dump adds status=None). The Agents SDK Chat Completions
    converter rejects that shape. Keep function_call / function_call_output as-is so
    tool history still round-trips; do not run to_chat_completions_input here.
    """
    messages: list[dict] = []
    for item in request.input:
        dumped = item.model_dump(exclude_none=True)
        if (
            dumped.get("type") == "message"
            and dumped.get("role") == "assistant"
            and "id" not in dumped
        ):
            dumped["id"] = str(uuid4())
        messages.append(dumped)
    return messages&lt;/LI-CODE&gt;&lt;P&gt;Then use the function to normalize messages to Chat Completions API schema with an id attribute for assistant messages:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# messages = [i.model_dump() for i in request.input]
messages = to_runner_input(request)
result = Runner.run_streamed(agent, input=messages)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2026 01:44:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/issues-with-custom-agents-on-free-edition/m-p/166493#M880</guid>
      <dc:creator>taniumalloy</dc:creator>
      <dc:date>2026-08-26T01:44:28Z</dc:date>
    </item>
  </channel>
</rss>

