Skip to content

instrument: agent framework adapters (M1.C part 2)#97

Merged
m-peko merged 1 commit into
feat/instrument-base-foundationfrom
feat/instrument-frameworks-agents
May 12, 2026
Merged

instrument: agent framework adapters (M1.C part 2)#97
m-peko merged 1 commit into
feat/instrument-base-foundationfrom
feat/instrument-frameworks-agents

Conversation

@mmercuri

Copy link
Copy Markdown
Contributor

Summary

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)
  • Reviewer (m-peko) verifies callback/lifecycle wiring

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.

Linear

LAY-3400 umbrella (M1.C part 2).

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).
@mmercuri mmercuri requested a review from m-peko April 26, 2026 02:33
@mmercuri

Copy link
Copy Markdown
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.

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.

2 participants