Skip to content

Elixirs

Bell Eapen edited this page Jan 17, 2026 · 2 revisions

Elixirs (LangServe Apps)

Elixirs provide backend GenAI capabilities as HTTP endpoints hosted by LangServe. Each elixir is a lightweight Python app that conforms to a base class and exposes chains/agents via /invoke.

Concepts

  • Input/Output schemas using Pydantic for clear contracts
  • Tool integrations via MCP server or direct SDKs
  • RAG using Redis vector store
  • Runtime bootstrap for models and hyperparameters

Manage Elixirs

Install

Install from a Git repository or local folder.

npx dhti-cli elixir install -g <git_url> -n <name>

Flags:

  • -g, --git: GitHub repository URL.
  • -n, --name: Name of the elixir (required).
  • -b, --branch: Branch to install from (default: develop).
  • -l, --local: Install from a local directory path instead of Git.
  • -s, --subdirectory: Install from a subdirectory in the repo/local path (for monorepos).
  • -d, --dev: Install in dev mode (links source to container).
  • -p, --pypi: Install a specific PyPi package (e.g., dhti-elixir-base>0.1.0).

Initialize

Create a new elixir project structure.

npx dhti-cli elixir init -n <name>

Development

Sync changes to a running container (hot-reload style).

npx dhti-cli elixir dev -d <local_src_path> -n <name> -c <container_name>

Flags:

  • -c, --container: Target container name (default: dhti-langserve-1).

Uninstall

Remove an installed elixir.

npx dhti-cli elixir uninstall -n <name>

Optionally edit ~/dhti/elixir/app/bootstrap.py to switch models (e.g., Ollama llama3, Gemini, etc.).

Develop with hot reload

See Hot Reload for the dev sync command.

Package as Docker image

npx dhti-cli docker -n yourdockerhandle/genai-test:1.0 -t elixir

Examples and roadmap

  • dhti-elixir-template: Echo and mock-LLM examples
  • Coming soon: dhti-elixir-fhire, dhti-elixir-fhirs, dhti-elixir-upload

Clone this wiki locally