agentleFS
MicrosoftKnown publishermicrosoft/agent-framework/python/packages/azure-contentunderstanding/AGENTS.md

agent-framework / azure-contentunderstanding

AGENTS.md14k starsChanged 10 months agoMITView on GitHub

agent-framework-azure-contentunderstanding integrates Azure Content Understanding (CU) into the Agent Framework as a context provider. It automatically analyzes file attachments (documents, images, audio, video) and injects structured results into the LLM context. - _context_provider.py — Main provider implementation. Overrides before_run() to detect file attachments, call the CU API, manage session state with multi-document tracking, and auto-register retrieval tools for follow-up turns. - Analyzer auto-detection — When analyzer_id=None (default), _resolve_analyzer_id() selects the CU analyzer based on media type prefix: audio/ → prebuilt-audioSearch,…

Trending

More talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 3 mentionsApr 2026: 5 mentionsMay 2026: 3 mentionsJun 2026: 1 mentionJul 2026: 1 mentionAug 2026: 1 mentionSep 2026: 3 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/agent-framework repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/agent-framework

The biggest 5 of 31 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 31

Talked about on GitHub, Bluesky and Hacker News (31 times).

On GitHub · 17

12 more on GitHub

On Bluesky · 10

5 more on Bluesky

The file

Files
AGENTS.md

AGENTS.md — azure-contentunderstanding

Package Overview

agent-framework-azure-contentunderstanding integrates Azure Content Understanding (CU) into the Agent Framework as a context provider. It automatically analyzes file attachments (documents, images, audio, video) and injects structured results into the LLM context.

Public API

SymbolTypeDescription
ContentUnderstandingContextProviderclassMain context provider — extends ContextProvider
AnalysisSectionenumOutput section selector (MARKDOWN, FIELDS, etc.)
DocumentStatusenumDocument lifecycle state (ANALYZING, UPLOADING, READY, FAILED)
FileSearchBackendABCAbstract vector store file operations interface
FileSearchConfigdataclassConfiguration for CU + vector store RAG mode

Architecture

  • _context_provider.py — Main provider implementation. Overrides before_run() to detect file attachments, call the CU API, manage session state with multi-document tracking, and auto-register retrieval tools for follow-up turns.
    • Analyzer auto-detection — When analyzer_id=None (default), _resolve_analyzer_id() selects the CU analyzer based on media type prefix: audio/ → prebuilt-audioSearch, video/ → prebuilt-videoSearch, everything else → prebuilt-documentSearch.
    • Multi-segment output — CU splits long video/audio into multiple scene segments (each a separate contents[] entry with its own startTimeMs, endTimeMs, markdown, and fields). _extract_sections() produces:
      • segments: list of per-segment dicts, each with markdown, fields, start_time_s, end_time_s
      • markdown: concatenated at top level with --- separators (for file_search uploads)
      • duration_seconds: computed from global min(startTimeMs) → max(endTimeMs)
      • Metadata (kind, resolution): taken from the first segment
    • Speaker diarization (not identification) — CU transcripts label speakers as <Speaker 1>, <Speaker 2>, etc. CU does not identify speakers by name.
    • file_search RAG — When FileSearchConfig is provided, CU-extracted markdown is uploaded to an OpenAI vector store and a file_search tool is registered on the context instead of injecting the full document content. This enables token-efficient retrieval for large documents.
  • _models.py — AnalysisSection enum, DocumentStatus enum, DocumentEntry TypedDict, FileSearchConfig dataclass.
  • _file_search.py — FileSearchBackend ABC, OpenAIFileSearchBackend, FoundryFileSearchBackend.

Key Patterns

  • Follows the Azure AI Search context provider pattern (same lifecycle, config style).
  • Uses provider-scoped state dict for multi-document tracking across turns.
  • Auto-registers list_documents() tool via context.extend_tools().
  • Configurable timeout (max_wait) with asyncio.create_task() background fallback.
  • Strips supported binary attachments from input_messages to prevent LLM API errors.
  • Explicit analyzer_id always overrides auto-detection (user preference wins).
  • Vector store resources are cleaned up in close() / __aexit__.

Samples

SampleDescription
samples/02-agents/context_providers/azure_content_understanding/01_document_qa.pyUpload a PDF via URL, ask questions about it
samples/02-agents/context_providers/azure_content_understanding/02_multi_turn_session.pyAgentSession persistence across turns
samples/02-agents/context_providers/azure_content_understanding/03_multimodal_chat.pyPDF + audio + video parallel analysis
samples/02-agents/context_providers/azure_content_understanding/04_invoice_processing.pyStructured field extraction with prebuilt-invoice analyzer
samples/02-agents/context_providers/azure_content_understanding/05_large_doc_file_search.pyCU extraction + OpenAI vector store RAG
samples/02-agents/devui/agent_content_understanding/DevUI web UI for CU-powered chat
samples/02-agents/devui/agent_content_understanding_file_search_*/DevUI web UI combining CU + file_search RAG

Running Tests

uv run poe test -P azure-contentunderstanding

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.