instrument: agent framework adapters (M1.C part 2)#97
Merged
m-peko merged 1 commit intoMay 12, 2026
Merged
Conversation
Ports the twelve agent-tier framework adapters from the ateam
reference implementation onto the new layerlens.instrument base layer:
Semantic Kernel, LlamaIndex, OpenAI Agents, Pydantic-AI, Agno,
Strands, SmolAgents, MS Agent Framework, Google ADK,
Bedrock Agents, Embedding (vector store hooks), Benchmark Import
Pairs with feat/instrument-frameworks-orchestration (M1.C part 1)
which lands LangChain, LangGraph, CrewAI, AutoGen, Langfuse, and
Agentforce. Together they complete M1.C.
Scope
-----
- src/layerlens/instrument/adapters/frameworks/{semantic_kernel,
llama_index,openai_agents,pydantic_ai,agno,strands,smolagents,
ms_agent_framework,google_adk,bedrock_agents,embedding,
benchmark_import}/: per-framework packages
- tests/instrument/adapters/frameworks/test_*_adapter.py + the
test_bulk_ported_smoke.py harness (which exercises every ported
adapter against canned trace fixtures so partial framework SDKs
on a given runner don't drop coverage to zero)
- samples/instrument/<framework>/: runnable per-framework samples
- docs/adapters/frameworks-<framework>.md: per-framework integration
guide
- pyproject.toml: twelve new optional extras
(semantic-kernel, llama-index, openai-agents, pydantic-ai, agno,
strands, smolagents, ms-agent-framework, google-adk,
bedrock-agents, embedding, benchmark-import) with python_version
markers; pyright/ruff exclusions for the dynamic monkey-patching
framework code
Blast radius
------------
- Default `pip install layerlens` install set is unchanged. Each
framework's heavy deps are gated behind their own extra.
- No changes to existing public API surface.
- Importing layerlens.instrument still does NOT pull in any framework
module (lazy registry lookup).
Test plan
---------
- uv run pytest tests/instrument/adapters/frameworks/ -x ->
184 passed, 1 skipped (test_bulk_ported_smoke.py covers all 12
agent-tier adapters plus the orchestration-tier ones from part 1
via the same harness)
Stacks on
---------
- feat/instrument-base-foundation (M1.A) — required for the
BaseAdapter surface this PR consumes.
Sibling of
----------
- feat/instrument-frameworks-orchestration (M1.C part 1) — both
branches stack on the base foundation independently and don't
conflict; they can land in either order.
LAY-3400 umbrella (M1.C part 2).
Contributor
Author
|
Linear: https://linear.app/layerlens/issue/LAY-3400 (Framework adapters part 2 — agent tier: Semantic Kernel, LlamaIndex, OpenAI Agents, Pydantic-AI, Agno, Strands, SmolAgents, MS Agent Framework, Google ADK, Bedrock Agents, Embedding, Benchmark Import). Stacked on PR #93. Under Apollo M1 epic LAY-3423. |
6 tasks
This was referenced May 10, 2026
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
Ports the twelve agent-tier framework adapters from the ateam
reference implementation onto the new
layerlens.instrumentbaselayer:
Semantic Kernel, LlamaIndex, OpenAI Agents, Pydantic-AI, Agno,
Strands, SmolAgents, MS Agent Framework, Google ADK,
Bedrock Agents, Embedding (vector store hooks), Benchmark Import
Pairs with
feat/instrument-frameworks-orchestration(M1.C part 1)which lands LangChain, LangGraph, CrewAI, AutoGen, Langfuse, and
Agentforce. Together they complete M1.C.
Scope
src/layerlens/instrument/adapters/frameworks/{semantic_kernel,llama_index,openai_agents,pydantic_ai,agno,strands,smolagents,ms_agent_framework,google_adk,bedrock_agents,embedding,benchmark_import}/— per-framework packages
tests/instrument/adapters/frameworks/test_*_adapter.py+ thetest_bulk_ported_smoke.pyharness (which exercises every portedadapter against canned trace fixtures so partial framework SDKs on
a given runner don't drop coverage to zero)
samples/instrument/<framework>/— runnable per-framework samplesdocs/adapters/frameworks-<framework>.md— per-frameworkintegration guide
pyproject.toml— twelve new optional extras (semantic-kernel,llama-index,openai-agents,pydantic-ai,agno,strands,smolagents,ms-agent-framework,google-adk,bedrock-agents,embedding,benchmark-import) withpython_versionmarkers;pyright/ruff exclusions for the dynamic monkey-patching framework
code
Blast radius
pip install layerlensinstall set is unchanged. Eachframework's heavy deps are gated behind their own extra.
layerlens.instrumentstill does NOT pull in anyframework module (lazy registry lookup).
Test plan
uv run pytest tests/instrument/adapters/frameworks/ -x—184 passed, 1 skipped (
test_bulk_ported_smoke.pycovers all 12agent-tier adapters plus the orchestration-tier ones from part 1
via the same harness)
m-peko) verifies callback/lifecycle wiringStacks on
feat/instrument-base-foundation(M1.A) — required for theBaseAdaptersurface this PR consumes.Sibling of
feat/instrument-frameworks-orchestration(M1.C part 1) — bothbranches stack on the base foundation independently and don't
conflict; they can land in either order.
Linear
LAY-3400 umbrella (M1.C part 2).