Metadata-Version: 2.4
Name: linghub
Version: 1.0.0
Summary: LingHub Python SDK — AI Routing OS + Agent Marketplace
Project-URL: Homepage, https://nexus.linghub.ai
Project-URL: Documentation, https://nexus.linghub.ai/docs/sdk
Project-URL: Repository, https://github.com/onsitechain/linghub-platform
Author-email: "ONSITECHAIN Inc." <dev@onsitechain.com>
License: MIT
Keywords: agents,ai,anthropic,llm,openai,routing,workflow
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: httpx>=0.24.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: all
Requires-Dist: anthropic>=0.20.0; extra == 'all'
Requires-Dist: langchain>=0.2.0; extra == 'all'
Requires-Dist: openai>=1.0.0; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.20.0; extra == 'anthropic'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.2.0; extra == 'langchain'
Requires-Dist: langchain>=0.2.0; extra == 'langchain'
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == 'openai'
Description-Content-Type: text/markdown

# linghub — LingHub Python SDK

AI Routing OS + Agent Marketplace の公式 Python クライアントライブラリ。

## インストール

```bash
pip install linghub
```

OpenAI / Anthropic / LangChain 統合を含む場合:

```bash
pip install "linghub[openai]"
pip install "linghub[anthropic]"
pip install "linghub[all]"
```

## クイックスタート

```python
from linghub import LingHubClient

client = LingHubClient(api_key="pk_xxx")

# ワークフロー実行
result = client.workflows.run("workflow-id", input="テキスト入力")
print(result.output)

# チャット (OpenAI 互換)
response = client.chat.complete(
    model="auto",
    messages=[{"role": "user", "content": "Hello"}]
)
print(response.content)
```

## OpenAI との統合

```python
import openai
tools = client.workflows.to_openai_tools("workflow-id")
response = openai.chat.completions.create(model="gpt-4o", tools=tools, ...)
```

## Anthropic との統合

```python
import anthropic
tools = client.workflows.to_anthropic_tools("workflow-id")
response = anthropic.messages.create(tools=tools, ...)
```

## LangChain との統合

```python
chain = client.workflows.to_langchain_runnable("workflow-id")
result = chain.invoke({"input": "テキスト"})
```

## ドキュメント

https://nexus.linghub.ai/docs/sdk
