fix(examples/langchain): add agent-control-telemetry workspace dep#219
Open
karansohi wants to merge 1 commit into
Open
fix(examples/langchain): add agent-control-telemetry workspace dep#219karansohi wants to merge 1 commit into
karansohi wants to merge 1 commit into
Conversation
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>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
examples/langchainfails to importagent_controlbecause the SDK's__init__.pyunconditionally importsagent_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.agent-control-telemetrytodependenciesand a matching[tool.uv.sources]entry pointing at../../telemetry, mirroring the pattern used for the other workspace packages (-models,-engine,-evaluators).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)
Test plan
cd examples/langchain && uv syncresolves cleanly (locally: 82 packages, telemetry built from../../telemetry)uv run python -c "from agent_control import Agent, AgentControlClient, agents, controls"succeedsuv run python setup_sql_controls.pyreaches the server and registers controlsuv run python sql_agent_protection.pyruns end-to-end against the Agent Control server🤖 Generated with Claude Code