Metadata-Version: 2.4
Name: glimind
Version: 0.3.0
Summary: Live reliability oracle for AI agent tools — ask if a tool works before calling it, and report outcomes (privacy-preserving). Zero dependencies.
License: MIT
Keywords: ai-agents,langchain,mcp,observability,openai-agents,reliability
Requires-Python: >=3.9
Provides-Extra: langchain
Requires-Dist: langchain-core; extra == 'langchain'
Description-Content-Type: text/markdown

# glimind (Python)

Live reliability oracle for AI agent tools. Ask if a tool works before calling it,
and report your own outcomes (privacy-preserving) so the data gets better for
everyone. **Zero third-party dependencies** (stdlib only); reporting is batched on
a background daemon thread and flushed at exit, so it adds no latency to your calls.

```bash
pip install glimind
```

```python
from glimind import Glimind

s = Glimind(endpoint="https://glimind.com", api_key="sk_live_...")  # api_key optional

# 1) ask before acting
h = s.check("acme/search")
if h["verdict"] == "down":
    ...  # pick a fallback

# 2) wrap a call — success/failure/latency reported automatically (privacy-clean)
with s.wrap("acme/search", input={"q": query}, task="search"):
    result = acme.search(query)

# or decorate a function tool
@s.instrument("acme/search", task="search")
def search(q): ...
```

## Framework middleware — one line

**LangChain / LangGraph:**
```python
from glimind.langchain import GlimindCallbackHandler
agent.invoke(input, config={"callbacks": [GlimindCallbackHandler(s)]})
```

**OpenAI Agents SDK:**
```python
from glimind.openai_agents import instrument_agent
agent = instrument_agent(s, agent)   # every function tool now auto-reports
```

## Privacy

This client **never sends your arguments, payloads, or tool outputs.** Before anything
leaves your process it is reduced to a value-free *shape skeleton* (every leaf value
becomes a type tag), errors are scrubbed, and only: tool id, input shape, success/failure,
normalized error, latency, coarse region are transmitted. The derivation is identical to
the TypeScript SDK, so shapes hash consistently across languages.

MIT licensed.
