{% extends "base.html" %}
{# Mode is "register" (default) or "complete" (filling in a LibreChat-synced agent). #}
{% set is_complete_mode = (mode is defined) and (mode == "complete") %}
{% set form_action = (base_path + "/agent-complete/" + agent._id|string) if is_complete_mode else (base_path + "/agent-register") %}
{% set page_heading = "Complete Agent Registration" if is_complete_mode else "Register AI Agent" %}
{% set page_subtitle = "Fill in the missing fields to complete this agent's registration." if is_complete_mode else "Add a new AI agent to the AgentHub registry" %}
{% set submit_label = "Complete Registration" if is_complete_mode else "Register Agent" %}
{% set a = agent if is_complete_mode else {} %}
{% block title %}{{ page_heading }} - AgentHub{% endblock %}
{% block style %}
{% endblock %}
{% block content %}
{{ page_heading }}
{{ page_subtitle }}
{% if is_complete_mode %}
This agent was synced from LibreChat.
Existing fields are pre-filled — please review them and complete the missing
governance fields (marked *). Saving will mark this
registration as complete and assign you as the owner.