agent-framework / ag-ui
AGENTS.md14k starsChanged 10 months agoMITView on GitHub
AG-UI protocol integration for building agent UIs with the AG-UI standard. - AgentFrameworkAgent - Wraps agents for AG-UI compatibility - AgentFrameworkWorkflow - Wraps native Workflow objects, or accepts workflow_factory(thread_id) for thread-scoped workflow instances without subclassing - AGUIChatClient - Chat client that speaks AG-UI protocol - AGUIHttpService - HTTP service for AG-UI endpoints - agent_framework_messages_to_agui_host_history() - Converts persisted Agent Framework messages to bounded AG-UI Host history while retaining MCP widget payloads and model replay metadata - AGUIEventConverter - Converts between Agent…
Trending
More talk lately.about the whole repository
Who's talking about microsoft/agent-framework
- microsoft/vscode-dotnettools“Project system data flow 'CapabilitiesScope Aggregating Publishing: 46625485' closed because of an exception.”GitHub · Nov 4, 2025 · 9 reactions
- @aymericw.bsky.social“Hyperlight codeact disponible en #dotnet et en #python dans Microsoft agent framework #opensource #ai …”Bluesky · May 12, 2026 · 5 likes
- @jeremymorgan.com“Microsoft made multi-agent workflows boring in the best way. Graph orchestration, OpenTelemetry, …”Bluesky · May 1, 2026 · 5 likes
- A Hacker News story“Microsoft's new framework for building and orchestrating AI agents”Hacker News · Apr 4, 2026 · 4 points
- microsoft/AgentSchema“Add headers to McpTool spec”GitHub · Mar 23, 2026 · 4 reactions
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
- Nov 4, 2025Project system data flow 'CapabilitiesScope Aggregating Publishing: 46625485' closed because of an exception. — microsoft/vscode-dotnettools9 reactions · 13 comments
- Mar 23, 2026Add headers to McpTool spec — microsoft/AgentSchema4 reactions
- Mar 19, 2026Foundry Hosted Agent from_agent_framework removes Authorization Header disabling OBO possibilities — Azure/azure-sdk-for-python4 reactions · 14 comments
- Mar 19, 2026Tool Search Tool feature similar to anthropic — google/adk-python3 reactions · 6 comments
- Dec 4, 2025Add Agent Framework DevUI Integration — microsoft/aspire2 reactions · 4 comments
12 more on GitHub
- Oct 3, 2025Built-in Agent Framework integration — microsoft/prompty2 reactions · 2 comments
- Oct 4, 2026[AgentServer] Resilient Responses turn hangs `in_progress` after graceful shutdown: deferral task update returns 400 and the task is left `suspended` — Azure/azure-sdk-for-net1 reaction · 3 comments
- Sep 23, 2026[azure-search-documents] Enable HTTPX async transport for AnyIO/Trio callers — Azure/azure-sdk-for-python1 reaction · 3 comments
- Sep 18, 2026[Bug]: Background Responses calls on gpt-5.4 return reasoning_tokens equal to output_tokens — Azure/azure-sdk-for-python1 reaction
- Sep 8, 2026[azure-ai-agentserver-responses] Failed response inputs are replayed in conversation history — Azure/azure-sdk-for-python1 reaction · 1 comment
- Aug 18, 2026.NET: Published packages are still built from `microsoft/agent-framework`, so fixes merged here don't reach NuGet — microsoft/agent-framework-durable-extension1 reaction · 2 comments
- Jun 11, 2026Align All Samples with Official Microsoft Agent Framework Samples and Remove Shared Dependencies — punitkshah/FoundryFeatures1 reaction
- May 1, 2026Microsoft Agent Framework 의 기능을 이용한 Multi-Turn Functionality — MSFT-AI-BUILD-INTERNAL/agentic-devops-starter1 reaction
- Apr 16, 2026Add Aspire DevUI Integration — leslierichardson95/aspire-agent-template1 reaction · 1 comment
- Oct 16, 2025[feat] Add TypeScript SDK — manekinekko/agent-framework1 reaction
- Oct 2, 2025Add Agent Framework Scenario: Shopping Assistant — Azure-Samples/eShopLite1 reaction · 1 comment
- Feb 27, 2026NuGet: Bump the microsoftagents group with 2 updates — foxminchan/BookWorm0 reactions · 2 comments
On Bluesky · 10
- May 12, 2026Hyperlight codeact disponible en #dotnet et en #python dans Microsoft agent framework #opensource #ai github.com/microsoft/ag... — @aymericw.bsky.social5 likes and reposts
- May 1, 2026Microsoft made multi-agent workflows boring in the best way. Graph orchestration, OpenTelemetry, time-travel debugging, durable execution.… — @jeremymorgan.com5 likes and reposts · 1 reply
- Apr 6, 2026🤖 Microsoft drops agent-framework today! AutoGen + Semantic Kernel merged for multi-agent AI workflows. Native Python & .NET support.… — @just--bruno.bsky.social2 likes and reposts · 1 reply
- Oct 12, 2025#Autogen was part of my first experiments into multi-agentic AI and I certainly learnt a lot from the platform (including from @ag2oss &… — @5h15h.bsky.social2 likes and reposts
- Jul 17, 2026My first contribution to the Microsoft Agent Framework just got merged! 🚀 I'm excited to contribute to this ecosystem!… — @handle.invalid1 likes and repost
5 more on Bluesky
- Apr 5, 2026Microsoftから新フレームワーク「agent-framework」が登場。 Pythonと.NETに対応し、グラフベースで複雑なAIエージェントのワークフローを構築可能。チェックポイントや人介在(Human-in-the-loop)、タイムトラベル機能まで標準装備なのが熱い… — @woody-ai-tools.bsky.social1 likes and repost
- Oct 14, 2025agent-framework A framework for building, orchestrating and deploying AI agents and multi-agent workflows with support for Python and .NET.… — @pythonhub.dev1 likes and repost
- Oct 3, 2025Agent Framework brings the production ready focus of Semantic Kernel with full C#/Python support, as well as the nimble intuitive interface… — @victordibia.bsky.social1 likes and repost · 1 reply
- Apr 27, 2026microsoft/agent-framework: A framework for building, orchestrating and deploying AI agents and multi-agent workflows with support for… — @fluid.sublimer.me0 likes and reposts · 1 reply
- Oct 3, 2025🎉 Celebrating! 🎉 (500+ new stars) 📦 microsoft / agent-framework ⭐ 1,432 (+678) 🗒 Python A framework for building, orchestrating and… — @github-trending.bsky.social0 likes and reposts · 1 reply
On Hacker News · 4
- Apr 4, 2026Microsoft's new framework for building and orchestrating AI agents4 points
- Oct 1, 2025Microsoft Agent Framework3 points
- Oct 3, 2025Microsoft Agent Framework2 points
- Oct 2, 2025Microsoft releases Agent Framework for Python and .NET1 point
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository67 other files it gives its agents.
- dotnet/AGENTS.mdAGENTS.md
- dotnet/samples/AGENTS.mdAGENTS.md
- python/AGENTS.mdAGENTS.md
- python/packages/a2a/AGENTS.mdAGENTS.md
- python/packages/anthropic/AGENTS.mdAGENTS.md
- python/packages/azure-ai-search/AGENTS.mdAGENTS.md
- python/packages/azure-contentunderstanding/AGENTS.mdAGENTS.md
- python/packages/azure-cosmos/AGENTS.mdAGENTS.md
- python/packages/azure-cosmos-memory/AGENTS.mdAGENTS.md
- python/packages/bedrock/AGENTS.mdAGENTS.md
- python/packages/chatkit/AGENTS.mdAGENTS.md
- python/packages/claude/AGENTS.mdAGENTS.md
- python/packages/copilotstudio/AGENTS.mdAGENTS.md
- python/packages/core/AGENTS.mdAGENTS.md
- python/packages/declarative/AGENTS.mdAGENTS.md
- python/packages/devui/AGENTS.mdAGENTS.md
- python/packages/foundry_local/AGENTS.mdAGENTS.md
- python/packages/gemini/AGENTS.mdAGENTS.md
- python/packages/github_copilot/AGENTS.mdAGENTS.md
- python/packages/hosting-a2a/AGENTS.mdAGENTS.md
- python/packages/hosting-mcp/AGENTS.mdAGENTS.md
- python/packages/lab/AGENTS.mdAGENTS.md
- python/packages/mem0/AGENTS.mdAGENTS.md
- python/packages/mistral/AGENTS.mdAGENTS.md
- python/packages/monty/AGENTS.mdAGENTS.md
- python/packages/ollama/AGENTS.mdAGENTS.md
- python/packages/openai/AGENTS.mdAGENTS.md
- python/packages/purview/AGENTS.mdAGENTS.md
- python/packages/redis/AGENTS.mdAGENTS.md
- python/packages/typesafe/AGENTS.mdAGENTS.md
- python/samples/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- build-and-testSkill
- project-structureSkill
- pull-requestsSkill
- verify-dotnet-samplesSkill
- verify-samples-toolSkill
- unit-converterSkill
- unit-converterSkill
- unit-converterSkill
- risk-scoringSkill
- valuationSkill
- risk-scoringSkill
- valuationSkill
- regex-testerSkill
- escalation-policySkill
- support-styleSkill
- pull-requestsSkill
- agent-framework-py-releaseSkill
- pull-requestsSkill
- python-code-qualitySkill
- python-developmentSkill
- python-feature-lifecycleSkill
- python-package-managementSkill
- python-testingSkill
- risk-scoringSkill
- valuationSkill
- risk-scoringSkill
- valuationSkill
- unit-converterSkill
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
add_agent_framework_fastapi_endpoint(): - Add AG-UI endpoint to FastAPI app (SupportsAgentRun or Workflow) - Very specific: line 70
When invocation is disabled, grants remain pending under their original retention deadline and the endpoint emits …
- Distinctive: line 94
Default stateless conversation history is client-controlled, including historical tool calls and results.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AG-UI Package (agent-framework-ag-ui)
AG-UI protocol integration for building agent UIs with the AG-UI standard.
Main Classes
AgentFrameworkAgent- Wraps agents for AG-UI compatibilityAgentFrameworkWorkflow- Wraps nativeWorkflowobjects, or acceptsworkflow_factory(thread_id)for thread-scoped workflow instances without subclassingAGUIChatClient- Chat client that speaks AG-UI protocolAGUIHttpService- HTTP service for AG-UI endpointsagent_framework_messages_to_agui_host_history()- Converts persisted Agent Framework messages to bounded AG-UI Host history while retaining MCP widget payloads and model replay metadataAGUIEventConverter- Converts between Agent Framework and AG-UI eventsadd_agent_framework_fastapi_endpoint()- Add AG-UI endpoint to FastAPI app (SupportsAgentRunorWorkflow)InMemoryAGUIThreadSnapshotStore- Memory-only latest AG-UI Thread Snapshot store for local development, demos, and tests
Types
AGUIRequest/AGUIChatOptions- Request typesAGUIThreadSnapshot/AGUIThreadSnapshotStore- Thread snapshot model with client-replayable data, private Session Continuation State, and a scoped async store protocolavailableInterrupts/resume- Optional canonical AG-UIInterruptandResumeEntryprotocol dataAgentState/RunMetadata- State management typesPredictStateConfig- Configuration for state prediction
Protocol Notes
- Outbound custom events are emitted as AG-UI
CUSTOM. - Usage metadata from
Content(type="usage")is surfaced asCUSTOMevents withname="usage". - Text annotations are surfaced as
CUSTOMevents withname="annotations"andvalue={"messageId": ..., "annotations": [...]}. Annotation-only updates announce a text message if needed without emitting empty text deltas. Providerraw_representationis omitted;AGUIChatClientrestores the annotations on text content. These live custom events are not replayed byMESSAGES_SNAPSHOT. - Inbound custom event aliases are accepted:
CUSTOM,CUSTOM_EVENT, andcustom_event. - Multimodal user inputs support both legacy (
text,binary) and draft-style (image,audio,video,document) shapes. - Interrupted runs complete with
RUN_FINISHED.outcome.type == "interrupt"and canonicaloutcome.interrupts; do not document or add new flows that depend on the legacy top-levelRUN_FINISHED.interruptfield. InterruptandResumeEntrycome from theag-ui-protocolpackage (ag_ui.core), not from an Agent Framework-specific interrupt model.- Tool approval interrupts, including approvals surfaced through workflow
request_info, advertise standardapprovedand full-replacementeditedArgsresponses while retaining the existingacceptedalias and direct partial edits for MAF client compatibility. Acancelledresume completes normally without executing that call; resolved siblings in the same complete resume still proceed. - Approval-time execution preserves each call's complete result group. Follow-up user-input requests remain in the
resumed messages, while
TOOL_CALL_RESULTevents are emitted only for terminalfunction_resultcontents. - Approval consent does not bypass policy. Built-in Agents receive validated local approvals through their normal
Agent.runpath, including Agent middleware, providerbefore_runpreparation, and function middleware._approval_execution.pytracks execution through existing function/chat middleware interfaces; it does not prepare providers or invoke the tools itself.MiddlewareFailureremains fatal. - Programmatic
AgentFrameworkAgent.run(...)andrun_agent_stream(...)calls acceptfunction_invocation_kwargsand preserve that tool-runtime context across approval resume. Adapter-local execution merges only that mapping, the wrapped agent's defaultadditional_function_arguments, and the current run options (in increasing precedence), not unrelated AG-UI run kwargs. - Queued approvals follow the wrapped Agent's scheduling. With
ToolApprovalMiddleware, collected decisions remain pending until that middleware releases the batch; AG-UI does not execute a tool ahead of it. Collected server-side grants do not require the client to submit the same approval again. - A2UI continuation retains the inner response's original model-turn and reasoning/call/result groups. UI rendering and its accounting remain adapter-owned while server tools use the existing function loop. Streaming uses an executable adapter handoff tool that returns a private control request through the existing function-result contract. That request is not a client approval prompt; completing the render clears only its matching internal pending request. Rendering uses the completed handoff's effective arguments, keyed by function-call occurrence, rather than the original streamed model arguments. Only privately marked requests for the adapter's handoff tool are hidden. Unmarked requests remain visible; a pending approval for that tool suspends rendering in both native and opaque-agent modes. Session-backed approval flows let core retain implicit siblings without requesting extra user decisions; stateless flows preserve the approvals core surfaces. A run-scoped control observer is installed once through the client's function-middleware extension point; its A2UI state is scoped to active stream pulls, preserving other runs' control outcomes and the original middleware's relative order. Adapter-side compatibility execution is limited to non-core agents without context providers; unsupported provider preparation fails explicitly instead of executing with a partial policy.
- Local approval resume checks the current function-invocation configuration before any approved side effect begins.
When invocation is disabled, grants remain pending under their original retention deadline and the endpoint emits
APPROVAL_INVOCATION_DISABLED; only a later explicit retry after re-enablement can execute them. Rejections and cancellations in a mixed resume still settle and retire their snapshot controls while grants remain pending. Repeating that mixed response or explicitly retrying it after re-enablement reuses retained terminal outcomes without reviving cancelled/rejected authority or replaying completed tool effects. Returning early or failing provider preparation releases every unstarted claimed grant, including hosted and deferred siblings, without extending pending retention or changing the execution owner. The adapter's in-run middleware rechecks enablement after provider preparation, before beginning any execution. - Approval claim cleanup covers the complete run, including approval-time failures before streaming starts. In-run owners begin execution when the function or hosted request reaches its middleware seam. Cleanup releases unstarted claims without renewing retention and recovers possibly started executions without replaying uncertain work; settled and cancelled outcomes stay inert.
- Complete resume payloads may include a retained result alongside a distinct pending occurrence that reuses the provider call id. Match logical function-call occurrences and current request generations, not provider ids alone; an older request generation for the same occurrence is still invalid.
- Approval responses for tools injected during
before_runare deferred to the in-run approval middleware rather than executed or rejected by the transport before those tools exist. _approval_lifecycle.pyis the sole owner of approval occurrence registration, trusted aliases, authority validation, claims, terminal outcomes, and retry deduplication. Runner code normalizes AG-UI protocol values and projects lifecycle outcomes but must not maintain a parallel pending-approval registry.- Local tool-approval interrupt ids use the Agent Framework
function_call.idoccurrence identity;toolCallIdremains the provider/servicecall_id. Hosted approvals preserve the provider-issued approval request id. The lifecycle stores these identities separately so resume responses carry the authoritative approval occurrence id without rewriting tool-result correlation ids. - Default stateless conversation history is client-controlled, including historical tool calls and results. Never document conversational tool results as authorization or policy evidence; use deterministic server-side checks, server-validated approvals, or scoped authoritative snapshots.
- AG-UI Thread and Run ids are client-owned protocol correlation ids. Service-session mode stores provider conversation
or response ids privately in the thread snapshot. Set
service_session_id_from_thread_id=Trueonly for compatibility when the application intentionally uses a provider continuation id as its AG-UI Thread id. - A configured Snapshot Scope and the client-owned Thread id are combined into a deterministic internal
AgentSession.session_id. Keep the raw Thread id for protocol events and snapshot addressing so equal Thread ids in different trusted scopes cannot collide in context-provider state. The deprecatedlegacy_session_id_from_thread_id=Truecompatibility option preserves raw provider keys only for explicit migrations and must warn because it disables that isolation; it is unsafe for shared multi-tenant deployments. A configured endpoint resolver must return a non-empty string. Reject invalid results before accessing state or invoking the runner; absence of a resolver, not an invalid result, selects intentionally unscoped operation. - Request
stateis client-owned Shared State and is merged intoAgentSession.state, minus a protected set: tool-approval state, history/context-provider namespaces, message-injection state, and provider-owned keys. Agents declare the latter through aservice_session_state_keysattribute, but that resolves against the agent object AG-UI is handed, so a wrapper agent that does not forward it would silently drop the protection._RESERVED_SERVICE_SESSION_STATE_KEYStherefore reserves such keys unconditionally; add a key there whenever it names a remote resource that the server's own credentialed call addresses. - Provider-owned keys identify remote resources that the server's own credentialed call addresses — for example
the Foundry hosted-agent session ID, which selects a VM-isolated sandbox with a persistent filesystem. Never let
request state choose one.
AgentSession.service_session_idis deliberately a separate attribute rather than astateentry, so conversation continuation is unreachable from client input by construction; keep it that way. confirm_changessnapshot cleanup resolves the synthetic confirmation back to its originalfunction_call_id; it must never concatenate unrelated tool results or record accepted changes without a matching real result.- Configured stateless agent Thread Snapshot stores persist after function/MCP tool-result and approval safe points,
then persist the terminal state. Never treat a yielded
finish_reasonor a following metadata update as successful model-turn finalization: inner finalizers and result hooks may still reject that output. Save only after the complete result/approval update and lifecycle side effects are applied, and project only completed call/result groups and current approval controls into the intermediate snapshot. Sibling text, reasoning, and unrelated pending calls remain terminal-only. Do not write every text delta or schedule unordered background snapshot writes. Service-session and workflow Thread Snapshots retain terminal-save cadence so replayable messages cannot advance without matching provider continuation state; workflow checkpoints own incremental workflow runtime state. - Disconnect-safe execution is endpoint-owned and opt-in through
add_agent_framework_fastapi_endpoint(detached_runs=True). Keep its producer queue bounded, retain and observe producer/drainer tasks, and let the producer own final snapshot/checkpoint/approval persistence after the SSE reader disconnects. Bound endpoint-wide producer admission and cancel abandoned producers after the configured timeout. This mode discards unread events; it is not a resumable event log. - While a detached mutation is active, the endpoint may serve an empty Snapshot Hydrate Request but must reject another
mutation for the same
(Snapshot Scope, threadId)with HTTP 409. Classify hydration once and keep it on the direct response path so it bypasses detached admission and producer wrapping. Endpoint admission, agent hydration, and workflow hydration must all use_run_common._is_snapshot_hydration_request; pass workflow checkpoint capability explicitly so checkpoint resumes never become hydration. The guard is process-local and does not replace cross-replica coordination. - Detached runs may outlive FastAPI request-scoped disposable resources. Resolve authorization and Snapshot Scope before spawning the producer, and do not rely on request-owned clients or sessions remaining open after disconnect.
- SSE keepalive is endpoint-owned transport behavior configured through
add_agent_framework_fastapi_endpoint(keepalive_seconds=...). It emits SSE comments only; do not addPING,HEARTBEAT, orKEEPALIVEAG-UI events, and do not add runner-level keepalive settings.
Usage
from agent_framework.ag_ui import add_agent_framework_fastapi_endpoint
from fastapi import FastAPI
app = FastAPI()
add_agent_framework_fastapi_endpoint(app, agent)Import Path
from agent_framework.ag_ui import AGUIChatClient, add_agent_framework_fastapi_endpoint
# or directly:
from agent_framework_ag_ui import AGUIChatClientDoes 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
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.

