Skip to main content
unmute-core is on PyPI. It needs Python 3.12 or newer.
On this page:

Add it to a project

pyproject.toml
Write the newest version from the changelog in place of X.Y.Z. ~=X.Y.Z allows X.Y.Z and later patches, never the next minor version. Before 1.0, a new minor version can break your code. The library needs these versions: LiveKit 1.8.8 itself needs openai 3. A Pipecat app may keep openai 1 or 2. Extras combine: unmute-core[livekit,slng]. With pip:
To move to a new release, change the range and run:
Check the environment at startup too. check_settings(LangfuseSettings) names every missing variable in one error. Settings lists them.

Check the version at import

Generated code states the library version it was built for:
agent.py
Write the real version in place of X.Y.Z. require() fails at import, so a wrong version fails the deploy and never a call.
  1. It fails when the installed library is older than the required version.
  2. It fails when the installed library has another major version.
  3. While the version is 0.x, 0.MINOR counts as the major.
The error names both versions, the range to require in pyproject.toml, and the command that fixes it. A version that is not three numbers raises ValueError.

With the knowledge extra

unmute-core[knowledge] brings llama-index, which reads NLTK data files. NLTK refuses a file with more than one hardlink. On Linux, uv installs packages as hardlinks by default. So install with copies wherever the [knowledge] extra is used:
Without it, the first knowledge lookup fails with PermissionError: Security Violation [pathsec.open]: refusing multiply-linked file. import unmute_core.knowledge without the extra raises an ImportError that names the extra and the command to install it.

Where to go next

Quickstart

Run the smallest agent on LiveKit or Pipecat.

Settings

Every environment variable, and how to check them at startup.