Skip to content

[Enhancement]: add lightweight iframe embed option for LibreChat agents #16357

Description

@peeeteeer

What features would you like to see added?

Add a lightweight iframe integration option for LibreChat agents so organizations can embed a specific agent inside existing products, portals, intranets, support pages, dashboards, or documentation sites.

The goal is to make agents usable where users already work, without sending them into the full LibreChat application shell.

Ideally, the embed could support two simple modes:

  1. New conversation mode

    • Opens the selected agent in a fresh conversation.
    • Useful for contextual help, support widgets, documentation pages, or one-off task assistants.
  2. Conversation history mode

    • Lets the embedded agent experience preserve or resume chat history for the authenticated user.
    • Useful for internal portals, customer dashboards, account workspaces, or workflows where users return to the same assistant over time.

More details

This would help teams deploy LibreChat agents as embedded assistants in business workflows, not only as a standalone chat application.

Example use cases:

  • Embed a support agent inside a customer portal.
  • Embed a documentation assistant inside product docs.
  • Embed an operations agent inside an internal dashboard.
  • Embed a sales or onboarding agent inside a CRM or partner portal.
  • Embed department-specific agents in intranet pages.

A possible user-facing model could be an embeddable URL such as:

/embed/agents/:agentId?mode=new
/embed/agents/:agentId?mode=history

or another equivalent route/query format.

For a first version, it would be completely acceptable for this to remain authenticated and permission-bound. The iframe could rely on the user’s existing LibreChat session, and all normal LibreChat permissions should still apply. This request is not for public anonymous agent execution.

Suggested behavior:

  • Render a compact chat-only agent experience.
  • Hide the normal LibreChat sidebar, marketplace navigation, settings, and other full-app chrome.
  • Keep normal authentication and authorization checks.
  • Respect existing agent/tool/model permissions.
  • Allow the host page to embed only deployments that explicitly opt in through configuration.
  • Optionally support existing URL prompt behavior, such as opening with a prefilled prompt or auto-submitting a prompt.

Possible implementation hints:

  • LibreChat already supports selecting an agent through agent_id query parameters.
  • Existing shared links are useful for read-only conversation sharing, but this feature would be for interactive embedded agent use.
  • A dedicated embed route may be cleaner than overloading the normal /c/new route, since it gives the UI, layout, permissions, and frame behavior a clear boundary.
  • Deployments may need documented configuration for frame embedding, such as allowed frame ancestors and related security headers.

Which components are impacted by your request?

No response

Pictures

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions