Skip to content

fix(examples/langchain): add agent-control-telemetry workspace dep#219

Open
karansohi wants to merge 1 commit into
mainfrom
fix/langchain-example-missing-telemetry-dep
Open

fix(examples/langchain): add agent-control-telemetry workspace dep#219
karansohi wants to merge 1 commit into
mainfrom
fix/langchain-example-missing-telemetry-dep

Conversation

@karansohi
Copy link
Copy Markdown
Collaborator

Summary

  • examples/langchain fails to import agent_control because the SDK's __init__.py unconditionally imports agent_control_telemetry (added in feat(sdk): add otel support #177), but the example's editable install via [tool.uv.sources] never pulls that workspace package into its venv.
  • Adds agent-control-telemetry to dependencies and a matching [tool.uv.sources] entry pointing at ../../telemetry, mirroring the pattern used for the other workspace packages (-models, -engine, -evaluators).
  • Same shape of fix as fix/steer-action-demo-missing-telemetry-dep. Several other examples (galileo, cisco_ai_defense, strands_agents, google_adk_, deepeval, crewai/) likely need the same patch but are out of scope here.

Repro (before this PR)

cd examples/langchain
uv run python setup_sql_controls.py
# ModuleNotFoundError: No module named 'agent_control_telemetry'

Test plan

  • cd examples/langchain && uv sync resolves cleanly (locally: 82 packages, telemetry built from ../../telemetry)
  • uv run python -c "from agent_control import Agent, AgentControlClient, agents, controls" succeeds
  • uv run python setup_sql_controls.py reaches the server and registers controls
  • uv run python sql_agent_protection.py runs end-to-end against the Agent Control server

🤖 Generated with Claude Code

The SDK's __init__.py imports agent_control_telemetry unconditionally
(introduced with OTel support in #177). For published wheels the
telemetry package is bundled at build time, but editable installs from
this example's [tool.uv.sources] need it declared as a workspace dep.

Without this, `uv run python setup_sql_controls.py` (and any script
that imports `agent_control`) fails with:
  ModuleNotFoundError: No module named 'agent_control_telemetry'

Mirrors the structure used in #fix/steer-action-demo-missing-telemetry-dep.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@karansohi karansohi self-assigned this May 11, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant