Metadata-Version: 2.4
Name: kiln-registry-api
Version: 1.0.0
Summary: Self-evolving tool registry for AI agents — runtime, compiler, and HTTP server.
Project-URL: Homepage, https://github.com/aryabyte21/kiln
Project-URL: Documentation, https://github.com/aryabyte21/kiln#readme
Project-URL: Repository, https://github.com/aryabyte21/kiln
Project-URL: Issues, https://github.com/aryabyte21/kiln/issues
Author-email: Kiln <hello@kiln.dev>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: ag2,agents,ai,autogen,langchain,mcp,mistral,pydantic-ai,registry,tools
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: httpx>=0.27.0
Requires-Dist: jsonschema>=4.0
Requires-Dist: kiln-shared>=1.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: ag2
Requires-Dist: pyautogen>=0.3.0; extra == 'ag2'
Provides-Extra: all
Requires-Dist: aiosqlite>=0.20.0; extra == 'all'
Requires-Dist: alembic>=1.14.0; extra == 'all'
Requires-Dist: asyncpg>=0.30.0; extra == 'all'
Requires-Dist: fastapi>=0.115.0; extra == 'all'
Requires-Dist: kiln-shared[server]>=1.0.0; extra == 'all'
Requires-Dist: langchain-core>=0.3.0; extra == 'all'
Requires-Dist: mistralai>=1.0.0; extra == 'all'
Requires-Dist: pyautogen>=0.3.0; extra == 'all'
Requires-Dist: pydantic-ai>=0.0.13; extra == 'all'
Requires-Dist: python-multipart>=0.0.9; extra == 'all'
Requires-Dist: sqlalchemy[asyncio]>=2.0; extra == 'all'
Requires-Dist: uvicorn[standard]>=0.30.0; extra == 'all'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.3.0; extra == 'langchain'
Provides-Extra: mistral
Requires-Dist: mistralai>=1.0.0; extra == 'mistral'
Provides-Extra: pydantic-ai
Requires-Dist: pydantic-ai>=0.0.13; extra == 'pydantic-ai'
Provides-Extra: server
Requires-Dist: aiosqlite>=0.20.0; extra == 'server'
Requires-Dist: alembic>=1.14.0; extra == 'server'
Requires-Dist: asyncpg>=0.30.0; extra == 'server'
Requires-Dist: fastapi>=0.115.0; extra == 'server'
Requires-Dist: kiln-shared[server]>=1.0.0; extra == 'server'
Requires-Dist: python-multipart>=0.0.9; extra == 'server'
Requires-Dist: sqlalchemy[asyncio]>=2.0; extra == 'server'
Requires-Dist: uvicorn[standard]>=0.30.0; extra == 'server'
Description-Content-Type: text/markdown

# kiln-registry-api

[![PyPI](https://img.shields.io/pypi/v/kiln-registry-api.svg)](https://pypi.org/project/kiln-registry-api/)
[![License](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](https://github.com/aryabyte21/kiln/blob/main/LICENSE)

**Kiln** is a self-evolving tool registry for AI agents. Define a tool once
(spec + Python impl), then call it from any framework — AG2, LangChain,
Pydantic AI, Mistral, OpenAI tools, MCP, or plain HTTP. When a tool you need
doesn't exist, the synthesis pipeline writes it for you and hot-loads it.

This package ships:

- The Kiln **registry SDK** — load/register/compile tools to your chosen framework.
- The Kiln **HTTP server** — production-ready FastAPI app the [`server`] extra unlocks.

## Install

SDK only (a few small deps):

```bash
pip install kiln-registry-api
```

Plus a target framework — install just what you need:

```bash
pip install "kiln-registry-api[langchain]"     # LangChain StructuredTool
pip install "kiln-registry-api[ag2]"           # AG2 / AutoGen
pip install "kiln-registry-api[pydantic_ai]"   # Pydantic AI Tool
pip install "kiln-registry-api[mistral]"       # Mistral function schema
pip install "kiln-registry-api[server]"        # Run the FastAPI registry yourself
pip install "kiln-registry-api[all]"           # Everything
```

## Use a Kiln tool from your agent

```python
from kiln_registry.runtime import KilnRuntime

runtime = KilnRuntime(target="langchain")
weather = runtime.get("com.kiln.tools.weather_forecast")  # native StructuredTool

# Plug it into any LangChain agent:
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_openai import ChatOpenAI
agent = create_tool_calling_agent(ChatOpenAI(model="gpt-4o-mini"), [weather], prompt)
AgentExecutor(agent=agent, tools=[weather]).invoke({"input": "Will it rain in Singapore today?"})
```

The same one-liner works for AG2, Pydantic AI, and Mistral by switching the
`target=` argument. Or skip the SDK entirely and POST to `/tools/{id}/execute`
from any language.

## Or call any tool over plain HTTP

```bash
curl -X POST https://your-kiln-host/tools/com.kiln.tools.weather_forecast/execute \
  -H 'Authorization: Bearer YOUR_KILN_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"args": {"location": "Singapore"}}'
```

## Get the integration snippet for any tool

The registry exposes a `GET /tools/{id}/integrations` endpoint that returns a
copy-pasteable code block for every supported framework — plus the JSON Schema
for the tool's arguments. The Kiln UI uses this to power the **Integrations**
tab on every tool page.

## Run the registry yourself

```bash
pip install "kiln-registry-api[server]"
uvicorn kiln_registry.main:app --host 0.0.0.0 --port 8766
```

By default the registry loads every tool found under `./registry/tools/`. Drop
in a `spec.yaml` + impl file and they appear on the next process start.

## Repository

Source, examples, the synthesis pipeline, the chat console, and the MCP bridge
all live in the monorepo at <https://github.com/aryabyte21/kiln>.

## License

Apache 2.0.
