Skip to content
Arxo Arxo

Framework and Language Coverage

agent_architecture detects common agent orchestration patterns and applies configurable language filtering.

The detector family covers these framework patterns:

FrameworkTypical Anchors
LangGraphStateGraph, .compile()
CrewAIAgent(, Crew(
LangChain AgentsAgentExecutor, .run(, .call(, .invoke(
AutoGenAssistantAgent(, GroupChat(, GroupChatManager(, initiate_chat(
OpenAI Agents SDKRunner.run(, Runner.run_sync(, Runner.run_streamed(
Pydantic AIpydantic_ai.Agent(, .run_sync(, .iter(

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.

The optional metrics[].config.languages filter is extension-based.

  • If languages is empty, no language filter is applied.
  • If set, only call sites in matching extensions are kept.

Supported language values and mapped extensions:

languages valueExtensions
python.py
typescript, ts, javascript, js.ts, .tsx, .js, .jsx, .mjs, .cjs
rust.rs

Example:

metrics:
- id: agent_architecture
config:
languages: ["python", "typescript"]

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.
  • Rust is currently pattern-based for these agent patterns.

For loop-guard checks, Python can use same-function AST context to improve guard detection confidence.

  • 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).
  1. Start without a languages filter to establish baseline visibility.
  2. Add languages only if you need to scope CI runtime or ownership boundaries.
  3. Pair policy thresholds with finding review before strict enforcement.