Skip to content

Open-source AI coworkers that each get a computer of their own: a browser, files and tools, with every action decided before it happens and recorded after. Bring any AG-UI agent.

387 B
Raw Blame
export function isHttpEndpointUrl(value: string): boolean {
  try {
    const url = new URL(value.trim());
    return (
      (url.protocol === "http:" || url.protocol === "https:") &&
      url.host.length > 0 &&
      // Some browser URL parsers preserve hostname spaces as percent escapes.
      !/\s/.test(decodeURIComponent(url.hostname))
    );
  } catch {
    return false;
  }
}