{% extends "wagtailadmin/generic/base.html" %} {% load i18n wagtailadmin_tags %} {% block titletag %}{% trans "Wagtail MCP agent" %}{% endblock %} {% block main_header %} {% include "wagtailadmin/shared/header.html" with title="Wagtail MCP agent" subtitle="Experimental AI assistant for your Wagtail site (prototype)" icon_name="comment" %} {% endblock %} {% block main_content %} {% url 'wagtail_mcp_agent:endpoint' as agent_endpoint %} {% if agent_endpoint %} {% include "wagtail_mcp/admin/includes/agent_mount.html" %} {% else %} {# Opt-in setup instructions: shown until the project mounts wagtail_mcp.agent.urls. #} {% load static %}

{% trans "The admin agent is not mounted. Add the AG-UI endpoint to your project's URLconf to enable the chat: see the wagtail-mcp documentation." %}

{% filter force_escape %}urlpatterns = [
    path("admin/wagtail_mcp/agent/api/", include("wagtail_mcp.agent.urls")),
    # ... before the admin include
]{% endfilter %}
{% endif %} {% endblock %}