Metadata-Version: 2.4
Name: glimind
Version: 0.3.2
Summary: Live reliability oracle for AI agent tools (MCP) — ask if a tool is up right now before calling it, fail over to a healthy alternative, and report outcomes (privacy-preserving). Zero dependencies.
Project-URL: Homepage, https://glimind.com
Project-URL: Documentation, https://glimind.com/docs
Project-URL: Repository, https://github.com/shawndei/mcpinfrastructure
Project-URL: Issues, https://github.com/shawndei/mcpinfrastructure/issues
License: MIT
Keywords: agent-tools,agents,ai-agents,failover,health-check,langchain,mcp,mcp-tools,model-context-protocol,observability,openai-agents,reliability,tool-use,uptime
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
Classifier: Typing :: Typed
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.
