Metadata-Version: 2.5
Name: langchain-godaddy
Version: 0.0.4
Summary: GoDaddy provider for LangChain & LangGraph — Agent Identity (registration, discovery, verification)
Project-URL: Homepage, https://github.com/gdcorp-opensource/langchain-godaddy
Project-URL: Source, https://github.com/gdcorp-opensource/langchain-godaddy
Author: GoDaddy
License: MIT
License-File: LICENSE
Keywords: agent-identity,agent-name-service,ans,godaddy,langchain,langgraph
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: cryptography>=43.0
Requires-Dist: dnspython>=2.0
Requires-Dist: httpx>=0.24.1
Requires-Dist: langchain-core>=0.3.0
Requires-Dist: typing-extensions>=4.5.0
Provides-Extra: agent
Requires-Dist: langchain-anthropic>=0.3.0; extra == 'agent'
Requires-Dist: langgraph>=0.2.0; extra == 'agent'
Provides-Extra: dev
Requires-Dist: mypy>=1.10.0; extra == 'dev'
Requires-Dist: ruff>=0.6.0; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest-asyncio>=0.23; extra == 'test'
Requires-Dist: pytest-httpx>=0.30; extra == 'test'
Requires-Dist: pytest>=8.0; extra == 'test'
Description-Content-Type: text/markdown

# langchain-godaddy

GoDaddy integrations for [LangChain](https://python.langchain.com/) /
[LangGraph](https://langchain-ai.github.io/langgraph/).

## Install

```bash
pip install langchain-godaddy
# CSR generation and badge verification work out of the box.
# optional extra:
#   [agent]   run the bundled ReAct/LangGraph agent example
#             (langgraph + langchain-anthropic)
```

## Configuration

All configuration is via environment variables (or explicit kwargs):

| Env var | Required | Default | Purpose |
|---|---|---|---|
| `GODADDY_BASE_URL` | no | `https://api.godaddy.com` | GoDaddy API base URL |
| `GODADDY_API_KEY` | for writes | — | SSO `key:secret` (registration/verify + per-agent trust read) |
| `GODADDY_KEYS_DIR` | no | `./keys` | where the CSR helper writes keys |
| `GODADDY_TRUSTED_RA_DOMAINS` | no | — | comma-separated badge-fetch allow-list |
| `GODADDY_BADGE_FAILURE_POLICY` | no | `fail-closed` | `fail-closed` / `fail-open-with-cache` / `fail-open` |
| `GODADDY_AUTH_HEADER` | no | — | extra `Header: value` lines injected on every request |

Discovery reads need no credentials.

## Agent Identity

Register, discover, and verify AI agents through GoDaddy's Agent Identity API.
The feature lives at `langchain_godaddy.agent_identity`; its public API is
re-exported from `langchain_godaddy`.

See [`examples/chat_stream.py`](examples/chat_stream.py) for a runnable
end-to-end example — a streaming ReAct agent wired to the toolkit that can
discover, register, and verify agents.

## One-line agent setup — toolkit

```python
from langchain_godaddy import AgentIdentityToolkit
from langchain_anthropic import ChatAnthropic
from langgraph.prebuilt import create_react_agent

tools = AgentIdentityToolkit.from_env().get_tools()  # note: synchronous
agent = create_react_agent(ChatAnthropic(model="claude-opus-4-8"), tools=tools)
```

The toolkit adapts to your configuration. Tools it exposes:

**Always (no credentials required):**

- `agent_identity_search_registered_agents` — free-text search of the registry,
  with protocol / capability / tag / status filters and trust-aware ranking.
- `agent_identity_list_registered_agents` — paged listing with the same filters.
- `agent_identity_get_agent` — fetch an agent's registration record and lifecycle
  status by ID.
- `agent_identity_generate_csrs` — generate the identity + server CSRs (RSA-2048)
  locally, written under `GODADDY_KEYS_DIR`.
- `agent_identity_verify` — verify a peer agent's certificate against its published
  identity badge (fingerprint + SAN checks).

**Added when `GODADDY_API_KEY` is set:**

- `agent_identity_get_registered_agent` — one registered agent with full trust
  explainability.
- `agent_identity_register_agent` — register a new agent (returns the ACME challenge).
- `agent_identity_verify_acme` — trigger ACME domain-control validation.
- `agent_identity_verify_dns` — confirm the required DNS records are live (→ ACTIVE).
- `put_godaddy_txt_record` — write the GoDaddy DNS TXT records the registration flow
  needs.

## Agent registration flow

```
generate CSRs (local)          → csr.make_csr_tool / generate_agent_csrs
register_agent                 → returns agentId + ACME challenge
provision _acme-challenge TXT  → dns.put_godaddy_txt
verify_acme                    → PENDING_CERTS
poll get_agent                 → until PENDING_DNS (dnsRecords available)
provision _ans / _ans-badge TXT→ dns.put_godaddy_txt (×2)
verify_dns                     → ACTIVE
```

## License

MIT.
