diff --git a/AGENTS.md b/AGENTS.md index 4485e398..932189eb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -90,7 +90,7 @@ graph TD newHandler["launchdarkly-ai-new-provider\n(future)"] end subgraph tier0 ["Tier 0 — Core"] - ai["launchdarkly-ai\n(convenience barrel)"] + ai["launchdarkly-ai-python\n(convenience barrel)"] client["launchdarkly-ai-server"] end @@ -109,9 +109,9 @@ graph TD ### Tiers - **Tier 0 — Core** (`launchdarkly-ai-server`): The foundation. Owns all LaunchDarkly integration, telemetry orchestration, shared data types, and the primary entry points (`config()`, `graph()`, `resolve_graph()`). Has no dependency on any other `launchdarkly-ai-*` package. -- **Tier 0 — Convenience barrel** (`launchdarkly-ai`): A pure re-export package that makes all of `launchdarkly-ai-server` available under a shorter install name. No new logic — intended as the default install for most Python applications. +- **Tier 0 — Convenience barrel** (`launchdarkly-ai-python`): A pure re-export package that makes all of `launchdarkly-ai-server` available under a shorter install name. No new logic — intended as the default install for most Python applications. - **Tier 1 — Handler packages** (`launchdarkly-ai-claude-agents`, `launchdarkly-ai-claude-messages`, `launchdarkly-ai-openai-agents`, `launchdarkly-ai-openai-messages`, `launchdarkly-ai-langchain-agents`, `launchdarkly-ai-langchain-messages`, …): Each wraps a specific AI provider SDK. Depends on `launchdarkly-ai-server` for shared types and utilities. Must not depend on other Tier 1 packages. -- **Tier 2 — Consumer applications** (e.g. `main.py`, downstream projects): Imports from one or more handler packages and either `launchdarkly-ai` or `launchdarkly-ai-server`. Owns tool implementations and orchestration logic. No `launchdarkly-ai-*` package should ever depend on Tier 2 code. +- **Tier 2 — Consumer applications** (e.g. `main.py`, downstream projects): Imports from one or more handler packages and either `launchdarkly-ai-python` or `launchdarkly-ai-server`. Owns tool implementations and orchestration logic. No `launchdarkly-ai-*` package should ever depend on Tier 2 code. ### Rules diff --git a/packages/ai/agents.md b/packages/ai/agents.md index 6bdc0d13..b962edc2 100644 --- a/packages/ai/agents.md +++ b/packages/ai/agents.md @@ -1,6 +1,6 @@ -# Agent Guide — `launchdarkly-ai` (Convenience Wrapper) +# Agent Guide — `launchdarkly-ai-python` (Convenience Wrapper) -This document describes the role, structure, and constraints of the `launchdarkly-ai` package for AI agents and contributors. +This document describes the role, structure, and constraints of the `launchdarkly-ai-python` package for AI agents and contributors. --- @@ -18,7 +18,7 @@ Its purpose: Python application developers install this single package and get b | File | Responsibility | |---|---| -| `src/launchdarkly_ai/__init__.py` | Single `from launchdarkly_ai_server import *` — the entire public barrel | +| `src/launchdarkly_ai_python/__init__.py` | Single `from launchdarkly_ai_server import *` — the entire public barrel | --- @@ -30,7 +30,7 @@ This package re-exports everything from `launchdarkly-ai-server` and nothing els from launchdarkly_ai_server import * ``` -Every symbol available from `launchdarkly-ai-server` is available from `launchdarkly-ai` under the same name. No additional symbols are added. When `launchdarkly-ai-server` gains a new export, this package automatically picks it up. +Every symbol available from `launchdarkly-ai-server` is available from `launchdarkly-ai-python` under the same name. No additional symbols are added. When `launchdarkly-ai-server` gains a new export, this package automatically picks it up. --- @@ -49,7 +49,7 @@ This package itself emits no spans. OTel is initialized and configured by `launc Install the OTel packages alongside this package: ```sh -pip install "launchdarkly-ai[otel]" +pip install "launchdarkly-ai-python[otel]" # or: pip install launchdarkly-ai-python opentelemetry-sdk opentelemetry-exporter-otlp-proto-http ``` @@ -84,4 +84,4 @@ This package must remain a pure re-export barrel. Any new utility, type, or help ### 2. Do not import from both packages in the same application -Importing from both `launchdarkly-ai` and `launchdarkly-ai-server` in the same app can produce subtle issues if the dependency graph deduplication fails. Pick one: use `launchdarkly-ai` for standard Python apps, `launchdarkly-ai-server` for custom runtimes where you manage the SDK client yourself. The `get_client()` singleton is process-wide and shared regardless of which package path you import through. +Importing from both `launchdarkly-ai-python` and `launchdarkly-ai-server` in the same app can produce subtle issues if the dependency graph deduplication fails. Pick one: use `launchdarkly-ai-python` for standard Python apps, `launchdarkly-ai-server` for custom runtimes where you manage the SDK client yourself. The `get_client()` singleton is process-wide and shared regardless of which package path you import through. diff --git a/packages/claude-agents/agents.md b/packages/claude-agents/agents.md index 8c4ff71c..c7202e2e 100644 --- a/packages/claude-agents/agents.md +++ b/packages/claude-agents/agents.md @@ -145,11 +145,11 @@ conversation id, or each turn becomes its own conversation. ## OTel Setup -This package emits one span per invocation using `opentelemetry-api`. **No OTel configuration is needed in this package** — the tracer provider is registered by `init_client()` in `launchdarkly-ai-server` (or `launchdarkly-ai`). +This package emits one span per invocation using `opentelemetry-api`. **No OTel configuration is needed in this package** — the tracer provider is registered by `init_client()` in `launchdarkly-ai-server` (or `launchdarkly-ai-python`). To receive spans, install the OTel SDK in your application: ```sh -pip install "launchdarkly-ai[otel]" +pip install "launchdarkly-ai-python[otel]" # or: pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http ``` diff --git a/packages/claude-messages/agents.md b/packages/claude-messages/agents.md index 0e43ef08..908d8f26 100644 --- a/packages/claude-messages/agents.md +++ b/packages/claude-messages/agents.md @@ -122,11 +122,11 @@ On error: `span.record_exception(exc)`, status ERROR, span ended, error re-raise ## OTel Setup -This package emits one span per invocation using `opentelemetry-api`. **No OTel configuration is needed in this package** — the tracer provider is registered by `init_client()` in `launchdarkly-ai-server` (or `launchdarkly-ai`). +This package emits one span per invocation using `opentelemetry-api`. **No OTel configuration is needed in this package** — the tracer provider is registered by `init_client()` in `launchdarkly-ai-server` (or `launchdarkly-ai-python`). To receive spans, install the OTel SDK in your application: ```sh -pip install "launchdarkly-ai[otel]" +pip install "launchdarkly-ai-python[otel]" # or: pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http ``` diff --git a/packages/client/README.md b/packages/client/README.md index 0c5c4b26..1e50a5ec 100644 --- a/packages/client/README.md +++ b/packages/client/README.md @@ -4,7 +4,7 @@ The core package for the LaunchDarkly AI Python SDK. It owns the LaunchDarkly cl All handler packages (`launchdarkly-ai-*`) depend on this package. -> **Tip:** for the simplest install, use [`launchdarkly-ai`](../ai/README.md) instead. It re-exports this package's full API and is the recommended default for most applications. +> **Tip:** for the simplest install, use [`launchdarkly-ai-python`](../ai/README.md) instead. It re-exports this package's full API and is the recommended default for most applications. ## Installation diff --git a/packages/client/agents.md b/packages/client/agents.md index 381adcbf..cb117045 100644 --- a/packages/client/agents.md +++ b/packages/client/agents.md @@ -175,7 +175,7 @@ The core client owns all OTel initialization. `init_client()` configures a `Trac pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http \ opentelemetry-propagator-b3 # or via the extras: -pip install "launchdarkly-ai[otel]" +pip install "launchdarkly-ai-python[otel]" ``` **OTLP endpoint configuration** — the exporter uses the standard `OTEL_EXPORTER_OTLP_ENDPOINT` env var. The default (when not set) points to LaunchDarkly's hosted OTel collector. diff --git a/packages/langchain-agents/agents.md b/packages/langchain-agents/agents.md index 4ca0e154..37a5bdbf 100644 --- a/packages/langchain-agents/agents.md +++ b/packages/langchain-agents/agents.md @@ -145,11 +145,11 @@ Key implementation detail: `WorkflowState` is a `TypedDict` with an `Annotated[l ## OTel Setup -This package emits one span per invocation using `opentelemetry-api`. **No OTel configuration is needed in this package** — the tracer provider is registered by `init_client()` in `launchdarkly-ai-server` (or `launchdarkly-ai`). +This package emits one span per invocation using `opentelemetry-api`. **No OTel configuration is needed in this package** — the tracer provider is registered by `init_client()` in `launchdarkly-ai-server` (or `launchdarkly-ai-python`). To receive spans, install the OTel SDK in your application: ```sh -pip install "launchdarkly-ai[otel]" +pip install "launchdarkly-ai-python[otel]" # or: pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http ``` diff --git a/packages/langchain-messages/agents.md b/packages/langchain-messages/agents.md index aa649a49..78314502 100644 --- a/packages/langchain-messages/agents.md +++ b/packages/langchain-messages/agents.md @@ -132,11 +132,11 @@ On error: `span.record_exception(exc)`, status ERROR, span ended, error re-raise ## OTel Setup -This package emits one span per invocation using `opentelemetry-api`. **No OTel configuration is needed in this package** — the tracer provider is registered by `init_client()` in `launchdarkly-ai-server` (or `launchdarkly-ai`). +This package emits one span per invocation using `opentelemetry-api`. **No OTel configuration is needed in this package** — the tracer provider is registered by `init_client()` in `launchdarkly-ai-server` (or `launchdarkly-ai-python`). To receive spans, install the OTel SDK in your application: ```sh -pip install "launchdarkly-ai[otel]" +pip install "launchdarkly-ai-python[otel]" # or: pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http ``` diff --git a/packages/openai-agents/agents.md b/packages/openai-agents/agents.md index 88305cdf..f86aee58 100644 --- a/packages/openai-agents/agents.md +++ b/packages/openai-agents/agents.md @@ -132,11 +132,11 @@ On error: `span.record_exception(exc)`, status ERROR, span ended, error re-raise ## OTel Setup -This package emits one span per invocation using `opentelemetry-api`. **No OTel configuration is needed in this package** — the tracer provider is registered by `init_client()` in `launchdarkly-ai-server` (or `launchdarkly-ai`). +This package emits one span per invocation using `opentelemetry-api`. **No OTel configuration is needed in this package** — the tracer provider is registered by `init_client()` in `launchdarkly-ai-server` (or `launchdarkly-ai-python`). To receive spans, install the OTel SDK in your application: ```sh -pip install "launchdarkly-ai[otel]" +pip install "launchdarkly-ai-python[otel]" # or: pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http ``` diff --git a/packages/openai-messages/agents.md b/packages/openai-messages/agents.md index f5c73725..15a858c1 100644 --- a/packages/openai-messages/agents.md +++ b/packages/openai-messages/agents.md @@ -120,11 +120,11 @@ On error: `span.record_exception(exc)`, status ERROR, span ended, error re-raise ## OTel Setup -This package emits one span per invocation using `opentelemetry-api`. **No OTel configuration is needed in this package** — the tracer provider is registered by `init_client()` in `launchdarkly-ai-server` (or `launchdarkly-ai`). +This package emits one span per invocation using `opentelemetry-api`. **No OTel configuration is needed in this package** — the tracer provider is registered by `init_client()` in `launchdarkly-ai-server` (or `launchdarkly-ai-python`). To receive spans, install the OTel SDK in your application: ```sh -pip install "launchdarkly-ai[otel]" +pip install "launchdarkly-ai-python[otel]" # or: pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http ```