Framework and Language Coverage
Framework and Language Coverage
Section titled “Framework and Language Coverage”agent_architecture detects common agent orchestration patterns and applies configurable language filtering.
Framework Detection Coverage
Section titled “Framework Detection Coverage”The detector family covers these framework patterns:
| Framework | Languages | Typical Anchors |
|---|---|---|
| LangGraph | Python, TypeScript | StateGraph(, CompiledGraph, .compile(), invoke( |
| CrewAI | Python, TypeScript | Agent(, Task(, Crew(, .kickoff( |
| LangChain Agents | Python, TypeScript | AgentExecutor, create_react_agent, createReactAgent, .run(, .call(, .invoke( |
| AutoGen | Python | AssistantAgent(, GroupChat(, GroupChatManager(, initiate_chat( |
| OpenAI Agents SDK | Python, TypeScript | Runner.run(, Runner.run_sync(, Runner.run_streamed(, @openai/agents |
| Pydantic AI | Python | pydantic_ai.Agent(, .run_sync(, .iter( |
| DSPy | Python | dspy.ChainOfThought, dspy.ReAct, dspy.Module |
| Semantic Kernel | Python | semantic_kernel, Kernel(, kernel.invoke( |
| LlamaIndex Agents | Python | ReActAgent(, AgentRunner( |
| Amazon Bedrock Agents | Python, TypeScript | bedrock-agent-runtime, invoke_agent(, InvokeAgentCommand |
| Google ADK | Python | LlmAgent(, google.adk.agents |
| Haystack Agents | Python | haystack.components.agents, PipelineTool, agent.run( |
| Vercel AI SDK | TypeScript | generateText(, streamText(, useChat(, tool( |
| Mastra | TypeScript | mastra/core, createTool(, Agent.stream( |
Call sites are deduplicated by (file, line) to avoid overcounting.
Generic invoke/compile patterns are counted only when a framework anchor exists in the same file.
Language Filtering Behavior
Section titled “Language Filtering Behavior”The optional metrics[].config.languages filter is extension-based.
- If
languagesis empty, no language filter is applied. - If set, only call sites in matching extensions are kept.
Supported language values and mapped extensions:
languages value | Extensions |
|---|---|
python | .py |
typescript, ts, javascript, js | .ts, .tsx, .js, .jsx, .mjs, .cjs |
Example:
metrics: - id: agent_architecture config: languages: ["python", "typescript"]AST vs Pattern Fallback
Section titled “AST vs Pattern Fallback”At a high level:
- Python and TypeScript call-site detection uses AST parsing when parse succeeds.
- If parsing fails, detection falls back to pattern-based matching.
For loop-guard checks, Python can use same-function AST context to improve guard detection confidence.
Known Limitations and FP/FN Caveats
Section titled “Known Limitations and FP/FN Caveats”- Heuristic pattern matching may produce false positives in unrelated helper code with similar naming.
- Framework wrappers and internal abstraction layers can hide call sites and cause false negatives.
- Extension-based filtering depends on file names; non-standard extensions can be excluded unintentionally.
- Schema validation detection focuses on common conventions (Pydantic/Zod/JSON-like patterns) and may miss custom validators.
- Confidence can vary by detector mode (AST-backed vs line/pattern heuristics).
Practical Recommendations
Section titled “Practical Recommendations”- Start without a
languagesfilter to establish baseline visibility. - Add
languagesonly if you need to scope CI runtime or ownership boundaries. - Pair policy thresholds with finding review before strict enforcement.