feat(notebooks): Add and update comprehensive notebook examples (#220, #221)#241
feat(notebooks): Add and update comprehensive notebook examples (#220, #221)#241
Conversation
…ew features - Add agent_as_workflow.ipynb: Demonstrates WorkflowAgent pattern with reflection and retry - Update azure_responses_client.ipynb: Azure OpenAI Responses Client with function calling - Update openai_responses_example.ipynb: OpenAI Responses Client direct usage examples - Update mem0_basic.ipynb: Mem0 provider integration for long-term memory - Update magentic.ipynb: Complete Magentic orchestration with multi-agent coordination - Update yaml_workflow.ipynb: YAML-based workflow configuration and execution - Clear all output cells to keep notebooks clean Resolves #220 and #221
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
🤖 Hi @Zochory, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive notebook examples to demonstrate AgenticFleet capabilities and updates existing notebooks with new Microsoft Agent Framework features. The notebooks cover various usage patterns from basic client usage to advanced multi-agent orchestration.
Key changes:
- Adds
agent_as_workflow.ipynbdemonstrating the reflection pattern with Worker-Reviewer cycles - Adds
yaml_workflow.ipynbshowing declarative workflow configuration - Updates existing notebooks with current API patterns and examples
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| notebooks/agent_as_workflow.ipynb | New comprehensive example showing workflow-as-agent pattern with reflection and retry logic |
| notebooks/yaml_workflow.ipynb | New example demonstrating YAML-based workflow configuration and loading |
| notebooks/openai_responses_example.ipynb | New example for direct OpenAI Responses client usage with function calling |
| notebooks/mem0_basic.ipynb | New example showing Mem0 context provider integration with Azure AI |
| notebooks/magentic.ipynb | New example demonstrating complete Magentic orchestration workflow |
| notebooks/example.ipynb | Updated Azure Responses client example with improved error handling |
| notebooks/devui_azureai.ipynb | New example for Azure AI Foundry integration with debug UI |
| notebooks/devui.ipynb | Simple debug UI example with OpenAI chat client |
| notebooks/azure_responses_client.ipynb | Comprehensive Azure OpenAI Responses client example |
Comments suppressed due to low confidence (6)
notebooks/yaml_workflow.ipynb:1
- The path references '../var/config/workflows/' but AgenticFleet stores configuration files in 'config/workflows/' according to the architecture. This path should be updated to match the actual configuration directory structure.
{
notebooks/yaml_workflow.ipynb:1
- Inconsistent configuration path - this references '../config/workflows/' while line 55 uses '../var/config/workflows/'. According to AgenticFleet architecture, configuration should be in 'config/workflows/' relative to project root.
{
notebooks/openai_responses_example.ipynb:1
- Hardcoded Azure OpenAI endpoint should not be used as a fallback. AgenticFleet follows uv-first patterns and declarative configuration via YAML/env vars, not hardcoded URLs in code.
{
notebooks/magentic.ipynb:1
- Model names should respect per-agent configuration from YAML files rather than being hardcoded. AgenticFleet architecture requires declarative model configuration in agents//config.yaml.
{
notebooks/example.ipynb:1
- Hardcoded model deployment name should use environment configuration. AgenticFleet pattern requires respecting per-agent model settings from YAML configuration, not hardcoding model names.
{
notebooks/agent_as_workflow.ipynb:1
- Hardcoded model IDs violate AgenticFleet's declarative configuration principle. Model names should be loaded from YAML configuration files, not hardcoded in factories.
{
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "from agenticfleet.fleet.workflow_loader import load_workflow_from_yaml\n", | ||
| "\n", | ||
| "# Load the workflow configuration\n", | ||
| "config_path = Path(\"../var/config/workflows/magentic_example.yaml\")\n", |
There was a problem hiding this comment.
Reference existing YAML config path
The workflow loader uses Path("../var/config/workflows/magentic_example.yaml"), but the repository does not ship a var/config directory or any magentic_example.yaml file. Executing the cell raises FileNotFoundError, preventing users from running the YAML workflow example. Point to an actual configuration file in the repo (e.g., under config/workflows) or include the missing YAML asset.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I am unable to perform a code review for this pull request.
I was unable to access the pull request diff.
🔍 General Feedback
I have tried the following steps to get the pull request diff:
- I tried to use the
mcp__github__get_pull_request_difftool as instructed, but it is not available in my environment. - I tried to use
git diffcommand, but it is not allowed. - I tried to find the diff in a file by guessing common filenames (
diff.txt,changes.diff,pr.diff,pull_request.diff,patch.diff,diff.patch), but none of them exist. - I tried to find the diff by searching for the string "diff --git" using
grep, but it only returned a match in a sample git hook file. - I tried to find the diff by searching for the pull request number "241" using
grep, but it did not lead to the diff file.
There is a contradiction in my instructions. I am told to use mcp__github__* tools, but they are not available. The gemini-review.yml workflow file confirms that these tools should be available.
Please check the configuration of the environment.
|
@copilot The job failed because several tests in tests/test_reflection_endpoint.py could not connect to a required endpoint, resulting in httpx.ConnectError: All connection attempts failed. Root Cause: Solution Steps:
Example: Pytest Fixture for a Test ServerIf you use FastAPI/Flask, add a fixture in your import pytest
from my_app import app # import your app
@pytest.fixture(scope="session", autouse=True)
def start_test_server():
from threading import Thread
import uvicorn
server = Thread(target=uvicorn.run, args=(app,), kwargs={"host": "127.0.0.1", "port": 8000})
server.daemon = True
server.start()
yield
# Optionally add teardown code hereUpdate your tests to use Example: GitHub Actions Workflow StepAdd this step to - name: Start Reflection API Server
run: |
python -m my_app & # Replace with your actual server start command
sleep 5 # Wait for the server to be readySummary: If you share the relevant part of |
Adds agent_as_workflow.ipynb and updates existing notebooks with new features