Merk
Tilgang til denne siden krever autorisasjon. Du kan prøve å logge på eller endre kataloger.
Tilgang til denne siden krever autorisasjon. Du kan prøve å endre kataloger.
This page provides links to sample agents and workflows designed for use with DevUI.
Coming Soon
DevUI samples for C# are coming soon. Please check back later or refer to the Python samples for guidance.
Getting Started Samples
The Agent Framework repository includes sample agents and workflows in the python/samples/02-agents/devui/ directory:
| Sample | Description |
|---|---|
| agent_weather | A weather agent using Microsoft Foundry |
| agent_foundry | Minimal agent using Microsoft Foundry |
| workflow_declarative | YAML-defined workflow |
| workflow_fanout | Workflow demonstrating fan-out/fan-in patterns |
| workflow_spam | Workflow for spam detection |
| workflow_with_agents | Multiple agents in a workflow |
Running with DevUI
# Discover all samples
devui .
# Or run a specific sample
devui ./weather_agent_azure
In-Memory Mode
The in_memory_mode.py script demonstrates running agents without directory discovery:
python in_memory_mode.py
This opens the browser with pre-configured agents and a basic workflow, showing how to use serve() programmatically.
Sample Gallery
When DevUI starts with no discovered entities, it displays a sample gallery with curated examples. From the gallery, you can:
- Browse available samples
- View sample descriptions and requirements
- Download samples to your local machine
- Run samples directly
Creating Your Own Samples
Follow the Directory Discovery guide to create your own agents and workflows compatible with DevUI.
Minimal Agent Template
# my_agent/__init__.py
from agent_framework import Agent
from agent_framework.openai import OpenAIChatClient
agent = Agent(
name="my_agent",
client=OpenAIChatClient(),
instructions="You are a helpful assistant."
)
Minimal Workflow Template
# my_workflow/__init__.py
from agent_framework import WorkflowBuilder, WorkflowContext, executor
from typing_extensions import Never
@executor(id="my_executor")
async def my_executor(message: str, ctx: WorkflowContext[Never, str]) -> None:
await ctx.yield_output(message)
workflow = WorkflowBuilder(start_executor=my_executor).build()
Related Resources
- DevUI Package README - Full package documentation
- Agent Framework Samples - All Python samples
- Workflow Samples - Workflow-specific samples
Note
Go support for this feature is coming soon. See the Agent Framework Go repository for the latest status.
Next Steps
- Overview - Return to DevUI overview
- Directory Discovery - Learn about directory structure
- API Reference - Explore the API