Chatnificent

Minimally complete
Maximally hackable

Python · AI / LLM Chat App Framework

Streaming UI, multi-user sessions, persistent history, and tool calling — out of the box. Swap any pillar (LLM, storage, auth, UI) when the defaults aren’t enough.

Minimally complete

$ pip install chatnificent
import chatnificent as chat

app = chat.Chatnificent()

app.run()

You only need to pip install openai and set OPENAI_API_KEY to immediately start talking to GPT.

Maximally hackable

$ pip install chatnificent[anthropic]
import chatnificent as chat

app = chat.Chatnificent(
    # OpenAI, Gemini, Ollama, OpenRouter, ...
    llm=chat.llm.Anthropic(
        model="claude-opus-4",
        system="You are a witty pirate.",
    ),
    # or File, InMemory, your own
    store=chat.store.SQLite("chats.db"),
    # or Anonymous, or your own
    auth=chat.auth.SingleUser("elias"),
    # plain Python functions become tools
    tools=chat.tools.PythonTool([get_weather, search_web]),
    layout=chat.layout.Default(
        brand="Acme",
        welcome_message="Ahoy, matey!",
        # bind UI widgets to LLM kwargs
        controls=[
            chat.layout.Control(
                id="temp",
                llm_param="temperature",
                cast=float, ...,
            ),
            chat.layout.Control(
                id="voice",
                llm_param="voice", ...,
            ),
        ],
    ),
)

if __name__ == "__main__":
    app.run()

Every pillar is a constructor argument — swap providers, persistence, auth, tools, or UI without writing a line of plumbing. Subclass any of them when config isn’t enough.

Examples

33 live apps

Every example is a single Python file you can run with uv run --script <file>.py — dependencies are declared inline, no project setup, no install steps. Each one runs standalone, and this site mounts the same unmodified scripts under /chat/<example>/ on one Starlette app.