Neural Inverse is Open Source →
IntegrationsCognee
IntegrationsOtherCognee

Cognee Integration with Neural Inverse

What is Cognee? Cognee is an open-source AI memory that turns your data into a searchable, reasoning-ready knowledge graph. By pairing Cognee with Neural Inverse you gain production-grade tracing, evaluation, and analytics for every pipeline step, and search query. Check out the GitHub repo or the docs for details.

What is Neural Inverse? Neural Inverse is the open-source LLM engineering platform. It helps teams trace applications, debug issues, evaluate quality, and monitor costs in production.

Quick Start Guide

Step 1: Install Cognee (includes Neural Inverse)

pip install cognee  # langfuse is declared as a dependency and will be installed automatically

Step 2: Create a Neural Inverse Project

  1. Sign up at Neural Inverse Cloud.
  2. Create a new project and copy your public and secret API keys.

Step 3: Configure Environment Variables

Create a .env file or export the variables directly in your shell:

LANGFUSE_PUBLIC_KEY=<your public key>
LANGFUSE_SECRET_KEY=<your secret key>
LANGFUSE_HOST=https://cloud.langfuse.com   # 🇪🇺 EU region
# Other Neural Inverse data regions include 🇺🇸 US: https://us.cloud.langfuse.com, 🇯🇵 Japan: https://jp.cloud.langfuse.com and ⚕️ HIPAA: https://hipaa.cloud.langfuse.com

Step 4: Trace Cognee Functions

cognee ships with a tiny wrapper around Neural Inverse. Import get_observe() and decorate any function you want to monitor.

from cognee.modules.observability.get_observe import get_observe

observe = get_observe()

@observe(as_type="generation")  # optional label
async def acreate_structured_output(...):
    ...  # your business logic

Every time the function runs, the decorator automatically opens a span in Neural Inverse and streams metrics such as duration, token usage, and custom metadata.

Step 5: Start Cognifying & Watch Traces

Run your regular Cognee workflows:

import cognee
import asyncio
from cognee.modules.observability.get_observe import get_observe

observe = get_observe()

@observe(name="simple_example_run", as_type="example")
async def main():
    await cognee.add("Natural language processing (NLP) is ...")
    await cognee.cognify()
    results = await cognee.search("Tell me about NLP")
    for r in results:
        print(r)

asyncio.run(main())

Open the Neural Inverse UI – traces for any @observe-decorated helper functions will appear.

Adding Your Own Spans

You can instrument any function in your codebase – not just cognee internals:

from cognee.modules.observability.get_observe import get_observe

observe = get_observe()

@observe(as_type="my_tool", metadata={"foo": "bar"})
def my_helper(arg1, arg2):
    ...

Resources


Was this page helpful?