Getting Started
Get up and running with Morphik
Installation Options
Sign Up
On a new tab, navigate to the Morphik website and click the sign up button on the top right.
Create a Project
Once you have signed up, you will be redirected to the Morphik Cloud dashboard. Click the “Create Application” button to create a new application. Enter your app name and click “Create Application”. You should now see that application in your dashboard.
Obtain your URI
Click on the “Copy” icon on the top right of the application card to copy your application URI.
That’s it! You’re ready to use Morphik now :)
Sign Up
On a new tab, navigate to the Morphik website and click the sign up button on the top right.
Create a Project
Once you have signed up, you will be redirected to the Morphik Cloud dashboard. Click the “Create Application” button to create a new application. Enter your app name and click “Create Application”. You should now see that application in your dashboard.
Obtain your URI
Click on the “Copy” icon on the top right of the application card to copy your application URI.
That’s it! You’re ready to use Morphik now :)
Direct Installation
Prerequisites
Cloning the Repository
To get started with Morphik, we need to first setup the server. This involves cloning the repository, installing the dependencies, and the running the server. You are just a few steps away from accurate, agentic RAG over your multi-modal data!
First, let’s clone the repository from GitHub.
After cloning the repository, you will notice a morphik-core
folder in your current directory.
If you see an error like ls: morphik-core: No such file or directory
, it means that the repository is not cloned properly. Please try again.
Once you have cloned the repository, navigate into the morphik-core
folder.
Setting Up the Environment
Installing Python Dependencies
While it is not required, we highly recommend using a virtual environment to ensure dependencies from other projects do not conflict with Morphik. You may use managers like uv
or poetry
, but for this guide, we will use the built-in venv
module.
Morphik currently supports Python 3.12 as the latest version. We recommend using Python 3.12 for optimal compatibility.
You don’t need to create a virtual-env or run uv sync
yourself—the
installer script will handle everything, including installing uv if
it’s missing. If you prefer a manual setup at some point, install uv
globally (pip install --upgrade uv
) and run uv sync
to recreate the
environment, but this is entirely optional.
uv reads the pyproject.toml
/ uv.lock
files, so all dependencies
(including optional ones like unstructured
) are declared in one place.
If you need additional NLTK data you can still download it afterwards:
Run the Installer Script
From the project root, run the one-liner below – it auto-detects your platform (macOS or Linux), sets any required build flags, installs dependencies, and starts the server:
The script will:
- Create & activate a
.venv
with uv - Install
colpali-engine
(knowledge-graph generation) - Build
llama-cpp-python
(Metal acceleration on Apple Silicon) - Launch the server via
uv run start_server.py
You only need to run ./install_and_start.sh
the first time to set up
the environment. For future sessions, activate your project directory
and simply start the server with:
Setting up the Server Parameters
At this point, you may want to customize the server - such as use a different model, enable or disable certain features, etc. - you can do so by editing the morphik.toml
file.
Morphik now uses a registered models approach, which allows you to define hundreds of different models in one place and reference them throughout your configuration. This makes it easy to mix and match models based on your needs (e.g., smaller models for simpler tasks). You can find more details about configuration here.
The installer copies .env.example
to .env
automatically if it’s
missing. After the script finishes, open .env
to add any API keys (e.g.
OPENAI_API_KEY
) or secrets you need. You can tweak morphik.toml
anytime to switch completion/embedding models, adjust chunking, or enable
advanced features.
Launching the Server
You are now ready to launch the Morphik server! Just run the following command to start the server.
You should see the following output:
This means that the server is running on http://localhost:8000
. You can now interact with the server using the API or the Python SDK.
Using Docker
Morphik provides a streamlined Docker-based setup that includes all necessary components: the core API, PostgreSQL with pgvector, and Ollama for AI models.
Prerequisites
- Docker and Docker Compose installed on your system
- At least 10GB of free disk space (for models and data)
- 8GB+ RAM recommended
Quick Start
- Clone the repository and navigate to the project directory:
- Before first-time setup, check the configuration:
Ensure your morphik.toml
file has the correct settings for running in Docker:
(If using local models with Ollama) Also ensure the Ollama configuration matches your deployment setup by modifying the api_base
in your morphik.toml
:
For example, if running both Morphik and Ollama in Docker, change all api_base
values to "http://ollama:11434"
.
If you want to use Ollama for AI capabilities:
This will build docker with an Ollama container.
Or if you’re using OpenAI, Anthropic, or other models (configure the API key in .env):
This will build docker without the Ollama container.
These commands will:
- Build all required containers
- Download necessary AI models (nomic-embed-text and qwen2.5vl if using Ollama)
- Initialize the PostgreSQL database with pgvector
- Start all services
The initial setup may take 5-10 minutes depending on your internet speed, as it needs to download the AI models.
Note: When using Ollama, ensure your system has sufficient memory. The qwen2.5vl model requires at least 4GB of available RAM. If you encounter memory issues, you can increase Docker’s memory allocation in Docker Desktop settings (Resources > Advanced > Memory), modify the
morphik.toml
file to use a smaller model, or switch to using OpenAI API.
- To completely reset (will delete all data and models):
Configuration
The default configuration works out of the box and includes:
- PostgreSQL with pgvector for document storage
- Ollama for AI models (embeddings and completions)
- Local file storage
- Basic authentication
You can customize your setup by creating a .env
file:
Accessing Services
- Morphik API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Health Check: http://localhost:8000/health
Troubleshooting
-
Service Won’t Start
-
Database Issues
- Check PostgreSQL is healthy:
docker compose ps
- Verify database connection:
docker compose exec postgres psql -U morphik -d morphik
- Check PostgreSQL is healthy:
-
Model Download Issues
- Check Ollama logs:
docker compose logs ollama
- Ensure enough disk space for models
- Try restarting Ollama:
docker compose restart ollama
- Verify that your Redis and Ollama configuration in
morphik.toml
matches your deployment:- For Redis in Docker, use
host = "redis"
(not “localhost”) - If running Ollama in Docker, use
http://ollama:11434
endpoint - If running Ollama locally but Morphik in Docker, use
http://host.docker.internal:11434
- For Redis in Docker, use
- Check Ollama logs:
-
Ollama Memory Issues
-
If you see errors like “model requires more system memory than is available” in the logs:
- Increase Docker memory allocation in Docker Desktop:
- Open Docker Desktop application
- Click on Settings (gear icon)
- Go to “Resources” section
- Increase memory allocation to at least 6GB (8GB recommended)
- Click “Apply & Restart”
- Alternatively, modify
morphik.toml
to use a smaller model - Or switch to OpenAI API by uncommenting the OpenAI sections in
morphik.toml
- Increase Docker memory allocation in Docker Desktop:
-
For knowledge graph creation specifically, you can switch from Ollama to OpenAI:
-
-
Performance Issues
- Monitor resources:
docker stats
- Ensure sufficient RAM (8GB+ recommended)
- Check disk space:
df -h
- Monitor resources:
Using Morphik
You can use Morphik via our Python SDK, our Rest API, via Morphik Console, or via MCP.
Create a virtual environment
Activate the virtual environment
Install the SDK
Ingest and Query your first file
You can find our entire SDK documentation here.
Create a virtual environment
Activate the virtual environment
Install the SDK
Ingest and Query your first file
You can find our entire SDK documentation here.
Extract your bearer token
The bearer token can be extracted directly from your Morphik URI. The URI has the following format:
morphik://<app_name>:<bearer_token>@<host>
The middle part between the colon and the @ symbol is your bearer token.
Make API requests
When making requests to the Morphik API, include your bearer token in the Authorization
header:
You can find our complete API reference here.
Open Morphik Console for your App
Click on the card with your app name on it. This should open the Morphik Console for your app.
Ingest a file
To ingest a file, click the “Upload Document” button and select the file you want to ingest. You can choose to batch ingest files or also ingest text if you prefer. Once ingested, you can see the status of your document ingestion in the console. (If you didn’t not put in a folder, you’ll find it in the “All Documents” section.)
Using Morphk Agent
Once your documents are ingested, you can navigate to the “Agent” tab in the sidebar, and start asking questions about your documents! The agent will show you the tool calls that it makes, alongside the results and a final response. You can use for long-lived tasks, or for more complex queries that require multiple steps to complete.
You can find more information about MCP here.
Community Support
We have an open community with lots of discussion where you can get help, report bugs, and share your experiences with Morphik. If you need assistance or want to contribute, please join our community!
Join our Discord
Get help, report bugs, and connect with other Morphik users.
Next Steps
Now that you have the server running, you can explore the different ways to interact with the server.