Python: Introduce Agent Framework Lab with GAIA Benchmark and Lighting project for RL (#719)

* prepare eval package

* add gaia benchmark to eval package

* update telemetry

* renaming

* organization

* organize into namespace packages; rename to labs

* update cookie cutter instruction

* update gaia runner

* use temp directory

* Rename "labs" --> "lab"

* update

* update gaia sample

* update status

* Add lighting project

* Add listing for lighting
This commit is contained in:
Eric Zhu
2025-09-17 05:59:21 +00:00
committed by GitHub
parent a7e35a4fea
commit a1b0a28f9c
42 changed files with 1989 additions and 110 deletions
@@ -0,0 +1,58 @@
# Cookiecutter Template for Agent Framework Lab Packages
This is a cookiecutter template for creating new lab packages in the Microsoft Agent Framework.
## Usage
```bash
cd /path/to/agent-framework/python/packages/lab
cookiecutter ./cookiecutter-agent-framework-lab
```
You will be prompted for the following information:
- **package_name**: The name of your lab package (e.g., "lighting", "vision")
- **package_display_name**: Human-readable name (e.g., "Lighting Tools", "Computer Vision")
- **package_description**: Brief description of the package (auto-generated from display name)
- **version**: Starting version (default: 0.1.0b1)
- **author_name**: Author name (default: Microsoft)
- **author_email**: Author email (default: SK-Support@microsoft.com)
- **include_cli_script**: Whether to include a CLI script (y/n)
- **cli_script_name**: Name of CLI script if included
## What Gets Generated
The template creates a complete lab package structure:
```
{package_name}/
├── agent_framework/
│ └── lab/
│ └── {package_name}/
│ └── __init__.py
├── agent_framework_lab_{package_name}/
│ ├── __init__.py
│ └── py.typed
├── tests/
│ ├── __init__.py
│ └── test_{package_name}.py
├── pyproject.toml
├── README.md
└── LICENSE
```
## After Generation
1. Implement your functionality in `agent_framework_lab_{package_name}/`
2. Update the `__all__` exports in `__init__.py`
3. Add your dependencies to `pyproject.toml`
4. Write comprehensive tests
5. Update the README with usage examples
## Integration
Don't forget to add your new package to the workspace:
1. Add to `python/pyproject.toml` dependencies
2. Add to `[tool.uv.sources]` section
3. Test installation with `uv run python -c "from agent_framework.lab.{name} import *"`
@@ -0,0 +1,20 @@
{
"package_name": "",
"package_display_name": "",
"package_description": "{{ cookiecutter.package_display_name }} module for Microsoft Agent Framework.",
"version": "0.1.0b1",
"author_name": "Microsoft",
"author_email": "SK-Support@microsoft.com",
"license": "MIT",
"include_cli_script": ["y", "n"],
"cli_script_name": "{{ cookiecutter.package_name }}_cli",
"python_requires": ">=3.10",
"within_microsoft_agent_framework_repo": ["y", "n"],
"__prompts__": {
"within_microsoft_agent_framework_repo": "Are you creating this package within the github.com/microsoft/agent-framework repo or a fork of it? (If yes, ensure you create it in python/packages/lab/ directory)"
},
"_templates_suffix": "",
"_copy_without_render": [
"*.py.typed"
]
}
@@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,56 @@
# Agent Framework Lab - {{ cookiecutter.package_display_name }}
{{ cookiecutter.package_description }}
## Installation
```bash
pip install agent-framework-lab-{{ cookiecutter.package_name }}
```
## Usage
```python
from agent_framework.lab.{{ cookiecutter.package_name }} import YourClass
# Your usage example here
instance = YourClass()
```
## Overview
Brief description of what this lab package provides and its main features.
## Features
- Feature 1: Description
- Feature 2: Description
- Feature 3: Description
## Examples
### Basic Usage
```python
from agent_framework.lab.{{ cookiecutter.package_name }} import YourClass
# Example usage
```
### Advanced Usage
```python
# More advanced examples
```
## API Reference
Document your main classes and functions here.
## Contributing
This package is part of the Microsoft Agent Framework Lab. Please see the main repository for contribution guidelines.
## License
This project is licensed under the {{ cookiecutter.license }} License - see the LICENSE file for details.
@@ -0,0 +1,4 @@
# Copyright (c) Microsoft. All rights reserved.
# This makes agent_framework a namespace package
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
@@ -0,0 +1,4 @@
# Copyright (c) Microsoft. All rights reserved.
# This makes agent_framework.lab a namespace package
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
@@ -0,0 +1,4 @@
# Copyright (c) Microsoft. All rights reserved.
# Import and re-export from the actual implementation
from agent_framework_lab_{{cookiecutter.package_name}} import * # noqa: F403, F401
@@ -0,0 +1,16 @@
# Copyright (c) Microsoft. All rights reserved.
"""
{{ cookiecutter.package_description }}
"""
# Import your main exports here
# from .main_module import MainClass, main_function
__all__ = [
# List your exports here
# "MainClass",
# "main_function",
]
__version__ = "{{ cookiecutter.version }}"
@@ -0,0 +1,94 @@
[project]
name = "agent-framework-lab-{{ cookiecutter.package_name }}"
description = "{{ cookiecutter.package_description }}"
authors = [{ name = "{{ cookiecutter.author_name }}", email = "{{ cookiecutter.author_email }}"}]
readme = "README.md"
requires-python = "{{ cookiecutter.python_requires }}"
version = "{{ cookiecutter.version }}"
license-files = ["LICENSE"]
urls.homepage = "https://learn.microsoft.com/en-us/semantic-kernel/overview/"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
urls.release_notes = "https://github.com/microsoft/agent-framework/releases?q=tag%3Apython-1&expanded=true"
urls.issues = "https://github.com/microsoft/agent-framework/issues"
classifiers = [
"License :: OSI Approved :: {{ cookiecutter.license }} License",
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"agent-framework",
"pydantic>=2.0.0",
# Add your specific dependencies here
]
{% if cookiecutter.include_cli_script == "y" %}
[project.scripts]
{{ cookiecutter.cli_script_name }} = "agent_framework_lab_{{ cookiecutter.package_name }}:main"
{% endif %}
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
packages = ["agent_framework_lab_{{ cookiecutter.package_name }}", "agent_framework.lab.{{ cookiecutter.package_name }}"]
[tool.setuptools.package-data]
agent_framework_lab_{{ cookiecutter.package_name }} = ["py.typed"]
[tool.ruff]
line-length = 120
target-version = "py310"
extend-exclude = ["tests", "__pycache__"]
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP", "C4", "N"]
ignore = ["N803", "N806", "N999", "UP007"]
[tool.ruff.format]
quote-style = "double"
[tool.mypy]
python_version = "3.10"
strict = true
check_untyped_defs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
show_error_codes = true
implicit_reexport = true
packages = ["agent_framework_lab_{{ cookiecutter.package_name }}"]
{% if cookiecutter.within_microsoft_agent_framework_repo == "y" %}
[tool.poe]
executor.type = "uv"
include = "../../../shared_tasks.toml"
[tool.poe.tasks]
test = "pytest --cov=agent_framework_lab_{{ cookiecutter.package_name }} --cov-report=term-missing:skip-covered tests"
mypy = "mypy agent_framework_lab_{{ cookiecutter.package_name }}"
{% else %}
[tool.poe.tasks]
fmt = "ruff format"
format = "ruff format"
lint = "ruff check"
test = "pytest --cov=agent_framework_lab_{{ cookiecutter.package_name }} --cov-report=term-missing:skip-covered tests"
mypy = "mypy agent_framework_lab_{{ cookiecutter.package_name }}"
{% endif %}
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
addopts = "--strict-markers --strict-config"
markers = [
"unit: marks tests as unit tests",
"integration: marks tests as integration tests",
]
@@ -0,0 +1 @@
# Copyright (c) Microsoft. All rights reserved.
@@ -0,0 +1,15 @@
# Copyright (c) Microsoft. All rights reserved.
"""Tests for {{ cookiecutter.package_name }} module."""
import pytest
from agent_framework_lab_{{cookiecutter.package_name}} import __version__
class Test{{cookiecutter.package_name | title}}:
"""Test the {{ cookiecutter.package_name }} module."""
def test_version(self):
"""Test package version is defined."""
assert __version__ is not None
assert __version__ == "{{ cookiecutter.version }}"