jh941213/codex-lattice · Archived

microsoft-agent-framework

Build, configure, and troubleshoot Microsoft Agent Framework (agent-framework repo) in Python, including ChatAgent setup, OpenAI/Azure clients, tool/function calling, multi-agent workflows, and environment setup.

First seen Aug 25, 2026

Installation

$ npx skills add jh941213/codex-lattice --skill microsoft-agent-framework

Summary

  • Build, configure, and troubleshoot Microsoft Agent Framework (agent-framework repo) in Python, including ChatAgent setup, OpenAI/Azure clients, tool/function calling, multi-agent workflows, and environment setup.
  • Use when requests mention Agent Framework, ChatAgent, OpenAIChatClient, AzureOpenAIResponsesClient, WorkflowBuilder, or Python agent setup.

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from jh941213/codex-lattice · top by installs.

npx skills add jh941213/codex-lattice

Browse all from jh941213/codex-lattice

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 19
License LICENSE
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,047 B
  • docs SUMMARY.md 385 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Microsoft Agent Framework

Overview

Use this skill to implement or explain Microsoft Agent Framework usage in Python. Prefer Microsoft Learn docs for conceptual guidance and use Context7 to fetch exact snippets (package extras, Azure/OpenAI client specifics).

Workflow

  1. Identify runtime and provider
  • Confirm Python.
  • Pick provider: OpenAI, Azure OpenAI, or Azure AI Foundry.
  • Confirm required environment variables before coding.
  1. Install and configure
  • Use pip packages and extras for the provider you need.
  • Load env vars from the shell or a .env file.
  1. Create a basic agent
  • Choose an agent type: ChatAgent, OpenAIResponsesClient, AzureOpenAIResponsesClient, or AzureAIAgentClient (Azure AI).
  • Use OpenAIChatClient (OpenAI) or AzureOpenAIResponsesClient (Azure OpenAI) for common setups.
  • Start with non-streaming, then add streaming if needed.
  1. Add tools and functions
  • Python: pass callables via tools=[...] on ChatAgent or per request.
  • Use HostedCodeInterpreterTool when you need sandboxed Python execution.
  • Use @aifunction(approvalmode="alwaysrequire") for human approvals and handle userinput_requests.
  1. Orchestrate multi-agent workflows
  • Use WorkflowBuilder and edges for simple graphs.
  • Use fan-out/fan-in and branching edge groups when you need concurrency or routing.
  • Use SequentialBuilder for pipeline workflows and workflow.as_agent() when you need a workflow to behave like a single agent.
  • Use MagenticBuilder for manager/participant orchestration (advanced).
  • Inspect AgentRunEvent outputs to debug.
  1. Integrate external tools via MCP
  • Use HostedMCPTool for Microsoft Learn MCP.
  • Use MCPStreamableHTTPTool for HTTP/SSE MCP servers.
  1. Add memory and storage
  • Serialize/deserialize threads for persistence.
  • Use a memory provider or chat message store for long-term history.
  1. Add middleware
  • Use agent-level middleware for cross-cutting concerns (logging, security).
  • Add run-level middleware when behavior is per-request.
  1. Integrate AG-UI (optional)
  • Use AG-UI for web clients, streaming, state management, and human approvals.

Context7 usage

  • Preferred library id: /microsoft/agent-framework
  • Alternative docs: /websites/learnmicrosoften-us_agent-framework
  • Example queries:

- "OpenAIChatClient ChatAgent Python example" - "AzureOpenAIResponsesClient Python example" - "running agents runstream Python" - "multi-turn conversation agent threads Python" - "WorkflowBuilder Python example" - "HostedMCPTool MCPStreamableHTTPTool Python example" - "SequentialBuilder workflow asagent" - "AzureAIAgentClient agent types Python"

References

  • references/quickstart.md
  • references/env-vars.md
  • references/agent-types.md
  • references/tools.md
  • references/function-tools-approvals.md
  • references/running-agents.md
  • references/agents-images.md
  • references/agents-structured-output.md
  • references/agents-as-mcp-tool.md
  • references/agents-as-tool.md
  • references/agents-memory.md
  • references/agent-rag.md
  • references/agent-middleware.md
  • references/mcp-overview.md
  • references/mcp-tools.md
  • references/ag-ui.md
  • references/workflows.md
  • references/workflow-tutorials.md
  • references/workflow-core.md
  • references/orchestrations.md
  • references/requests-responses.md
  • references/checkpointing.md
  • references/magentic.md
  • references/shared-states.md
  • references/workflow-observability.md
  • references/workflow-visualization.md
  • references/workflow-state-isolation.md
  • references/devui.md
  • references/observability.md