Skip to content
STIRUP

TECHNOLOGY INTELLIGENCE

Understand what's next.

Cerea: Self-Hosted Chat Interface with OpenAI Compatibility and Local Coding Agents

Cerea is a self-hosted chat interface that works with any OpenAI-compatible endpoint and includes features like knowledge bases, artifacts, and local coding agents managed by galopin.

Share
AI-generated conceptual illustration accompanying: Cerea: Self-Hosted Chat Interface with OpenAI Compatibility and Local Coding Agents
AI-generated editorial illustration of the article topic; not a photograph, product screenshot or measured result.

Overview of Cerea's Functionality and Architecture

Cerea is a self-hosted chat interface designed to work with any OpenAI-compatible endpoint, offering features such as knowledge bases, artifacts, and the ability to run Python in the browser. It also supports coding agents that operate on a user's own machine. The system is composed of two main components: Cerea, which serves as the chat interface, and galopin, which manages coding agents locally. Cerea can function independently using a single shared key to connect to any OpenAI-compatible endpoint. When used together, Cerea communicates with Pystino's /v1 endpoint using a user-specific sign-in token, ensuring that spending, quotas, and model access are tied to the individual user. The gateway component enhances functionality by adding web search, a local document reader, and metered coding agents. Users can further customize their experience with global system prompts, private custom models, and visual themes through the Workspace and /chats interface.

Deployment and Configuration Options

Cerea offers multiple deployment and configuration options, allowing users to choose between running the full stack or just the chat interface. The deploy kit in the kit/ directory supports running both components together or the chat alone. The current stack signs the chat and console against a single identity provider, but users can federate multiple sources by integrating with their own IdP, such as Keycloak or Authentik. Installation is streamlined with a script that fetches the necessary files and sets up the environment using Docker Compose. Users can opt for a chat-only installation, either against a central Pystino instance with the --preset satellite option or any OpenAI-compatible endpoint using --preset generic. Further details on the trade-offs of each deployment shape are available in docs/deploy.md, and the chat can also be run independently of the kit. The Docker image also includes a fix for SvelteKit's base path at build time and builds the galopin component.

Development and Testing Process

The development and testing process for Cerea involves a series of well-defined steps to ensure quality and consistency. The project uses npm ci to install dependencies and set up git hooks via Husky. Developers must copy the .env file to .env.local and configure environment variables such as OPENAI_BASE_URL and OPENAI_API_KEY. The application runs in development mode with npm run dev, accessible at http://localhost:5173. Testing includes linting, checking, and running unit tests with npm run test, which covers server and SSR projects using Vitest. For E2E testing, npx playwright test is used, and specific configurations are required for CPU environments without AVX support. The project is a hard fork of huggingface/chat-ui, with no upstream merges, and its documentation is built using MkDocs from the docs/ directory. Cerea is licensed under the Apache License 2.0, with notices acknowledging its origins and third-party contributions.

Sources and reporting notes

Based on published source material. No independent hands-on testing is claimed.

Read more