MindReef Documentation
Learn how to integrate MindReef into your AI agent applications and get complete visibility into agent behavior, performance, and reliability.
Quick Links
Quickstart Guide
Get up and running with MindReef in under 5 minutes. Install the SDK, add a decorator, and start seeing traces.
Tracing Deep Dive
Learn how to instrument your agents with traces and spans to capture the full reasoning chain.
LLM Integrations
Auto-instrument OpenAI, Anthropic, and other LLM providers with a single function call.
Hallucination Detection
Catch factual errors and ungrounded claims automatically before they reach your users.
Installation
Install the MindReef SDK using pip:
pip install mindreef
Basic Usage
Add observability to your agent with just a few lines of code:
from mindreef import trace, patch_openai
# Auto-instrument OpenAI calls
patch_openai()
@trace
async def my_agent(query: str):
# Your agent code here
response = await openai.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": query}]
)
return response.choices[0].message.content
That's it. Every call to my_agent is now traced, including all nested LLM calls, tool invocations, and timing information.