Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt

Use this file to discover all available pages before exploring further.

The Cognee Cloud UI can run entirely on your local machine using cognee.start_ui(). This gives you the same interface as Cognee Cloud without needing an account or any cloud infrastructure. Before you start:

Start the local UI

1

Install Cognee

pip install cognee
2

Add data and build a knowledge graph

Load some data into Cognee and run cognify to build the knowledge graph before launching the UI.
import asyncio
import cognee

async def main():
    await cognee.add("Natural language processing (NLP) is an interdisciplinary subfield of computer science.")
    await cognee.add("Machine learning (ML) is a subset of artificial intelligence.")
    await cognee.cognify()

asyncio.run(main())
3

Launch the UI server

Call cognee.start_ui() to start the local frontend server. Setting open_browser=True opens the interface in your default browser automatically.
import time
import cognee

server = cognee.start_ui(
    port=3000,
    open_browser=True,
)

if server:
    print("UI available at http://localhost:3000")
    try:
        while server.poll() is None:
            time.sleep(1)
    except KeyboardInterrupt:
        server.terminate()
        server.wait()
The UI is available at http://localhost:3000. Press Ctrl+C to stop the server when you are done.

Full example

The complete script below combines all three steps:
import asyncio
import time
import cognee


async def main():
    # Add sample data
    await cognee.add(
        "Natural language processing (NLP) is an interdisciplinary subfield of computer science and information retrieval."
    )
    await cognee.add(
        "Machine learning (ML) is a subset of artificial intelligence that focuses on algorithms and statistical models."
    )

    # Build the knowledge graph
    await cognee.cognify()

    # Start the UI
    server = cognee.start_ui(
        port=3000,
        open_browser=True,
    )

    if server:
        print("UI available at http://localhost:3000")
        print("Press Ctrl+C to stop...")
        try:
            while server.poll() is None:
                time.sleep(1)
        except KeyboardInterrupt:
            server.terminate()
            server.wait()
    else:
        print("Failed to start the UI server.")


if __name__ == "__main__":
    asyncio.run(main())
cognee.start_ui() launches the same frontend that powers Cognee Cloud. Data stays on your machine — nothing is sent to any external service.

Next steps

Cognee Cloud

Move to the hosted version for managed infrastructure and collaboration features.

Core Concepts

Learn about remember, recall, improve, and forget operations.