Esta página se muestra en inglés. Una traducción al español está en curso.
PromptsApr 2, 2026·3 min de lectura

Morphic — Open-Source AI Answer Engine

Perplexity-style AI search with generative UI. Multiple LLM and search providers. Self-hostable with Next.js. 8.7K+ stars.

Introducción

Morphic is an open-source AI-powered answer engine with 8,700+ GitHub stars that delivers a Perplexity-like search experience you can self-host. Built with Next.js and the Vercel AI SDK, it combines LLM providers (OpenAI, Anthropic, Google, Ollama) with search backends (Tavily, SearXNG, Brave, Exa) to generate comprehensive, cited answers with a beautiful generative UI. Features include a dynamic model selector, persistent chat history in PostgreSQL, shareable result URLs, and Docker-based one-command deployment.

Works with: OpenAI, Anthropic Claude, Google Gemini, Ollama (local), Tavily, SearXNG, Brave Search. Best for teams wanting a private, customizable AI search engine. Setup time: under 5 minutes with Docker.


Morphic Architecture & Features

How It Works

User Query: "What are the latest advances in protein folding?"
    │
    ├─ 1. Search Phase
    │     SearXNG/Tavily searches the web
    │     Returns 10-20 relevant sources
    │
    ├─ 2. AI Synthesis
    │     LLM reads all sources
    │     Generates comprehensive answer
    │     Adds inline citations [1][2][3]
    │
    ├─ 3. Generative UI
    │     Renders answer with rich formatting
    │     Shows source cards with thumbnails
    │     Suggests follow-up questions
    │
    └─ 4. Persistence
          Saves to PostgreSQL
          Shareable via unique URL

Multiple Search Providers

Provider Type Cost Setup
SearXNG Self-hosted Free Docker container
Tavily API Freemium API key
Brave API Freemium API key
Exa API Paid API key

SearXNG is recommended for self-hosting — free, no rate limits, 70+ search engines.

Multiple LLM Providers

Switch models on the fly with the built-in model selector:

Provider Models Setup
OpenAI GPT-4o, GPT-4o-mini API key
Anthropic Claude Sonnet, Claude Haiku API key
Google Gemini Pro, Gemini Flash API key
Ollama Llama 3, Mistral, Qwen Local install
Vercel Gateway Routes to cheapest/fastest Vercel config

Generative UI

Morphic renders rich, interactive answer pages:

  • Cited text — Inline numbered citations linking to sources
  • Source cards — Thumbnails and metadata for each referenced page
  • Follow-up suggestions — AI-generated related questions
  • Image results — Relevant images from search
  • Code blocks — Syntax-highlighted code in answers
  • Math rendering — LaTeX formulas displayed correctly

Chat History & Sharing

PostgreSQL stores:
├─ User sessions
├─ Search queries
├─ Generated answers
├─ Source citations
└─ Shareable URLs (e.g., /search/abc123)

Self-Hosting with SearXNG

The most cost-effective setup — completely free:

# docker-compose.yaml (included in repo)
services:
  morphic:
    build: .
    ports: ["3000:3000"]
    environment:
      - SEARXNG_API_URL=http://searxng:8080
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - DATABASE_URL=postgresql://postgres:password@db:5432/morphic

  searxng:
    image: searxng/searxng
    ports: ["8080:8080"]

  db:
    image: postgres:16-alpine
    environment:
      - POSTGRES_DB=morphic
      - POSTGRES_PASSWORD=password

  redis:
    image: redis:alpine

FAQ

Q: What is Morphic? A: Morphic is an open-source AI answer engine with 8,700+ GitHub stars — a self-hostable Perplexity alternative built with Next.js, supporting multiple LLM providers and search backends with a generative UI.

Q: How much does it cost to run Morphic? A: Infrastructure is free (Docker + SearXNG). You only pay for LLM API calls (~$0.01-0.05 per query with GPT-4o-mini). Use Ollama for completely free local inference.

Q: Is Morphic free? A: Yes, open-source under Apache-2.0. Self-host for free. Only LLM API costs apply (or use Ollama for free local models).


🙏

Fuente y agradecimientos

Created by miurla. Licensed under Apache-2.0.

morphic — ⭐ 8,700+

Thanks to miurla for building the best open-source alternative to Perplexity AI.

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.