Skip to content

Add AutoGen (AG2) framework adapter#13

Open
champ18ion wants to merge 1 commit into
anonymousAAK:masterfrom
champ18ion:feature/autogen-adapter
Open

Add AutoGen (AG2) framework adapter#13
champ18ion wants to merge 1 commit into
anonymousAAK:masterfrom
champ18ion:feature/autogen-adapter

Conversation

@champ18ion

Copy link
Copy Markdown
Contributor

Adds an AutoGen (AG2) adapter following the existing PydanticAI/CrewAI
pattern: agent factory tools are wrapped with @Instrument so tool calls
are captured into the active TraceCollector via contextvars, with no
need to monkeypatch AutoGen internals.

  • New src/aastf/harness/adapters/autogen.py implementing run_scenario -> AgentTrace
  • New 'autogen' optional extra (autogen-agentchat>=0.4) in pyproject.toml,
    added to the 'all' extra
  • Wired into Runner._build_harness as the 'autogen' adapter
  • Unit tests (tests/unit/test_autogen_adapter.py) covering import guarding,
    _build_input, _extract_final_output, and error handling for malformed
    factories
  • docs/quickstart.md updated with install instructions and adapter table

Type of change: New / updated framework adapter

Related issues: Closes #12

Checklist: all checked —> ruff check src/ tests/ passes, pytest tests/unit/ -v passes (2967 passed), tests added for the new adapter, docs updated, no secrets included.

Adds src/aastf/harness/adapters/autogen.py implementing the standard
adapter contract (run_scenario -> AgentTrace), following the pattern
of the PydanticAI/CrewAI adapters: tools are wrapped with @Instrument
and tool calls are captured into the active TraceCollector via
contextvars, requiring no monkeypatching of AutoGen internals.

- New 'autogen' optional extra (autogen-agentchat>=0.4) in pyproject.toml
- Wired into runner._build_harness as the 'autogen' adapter
- Unit tests covering import guarding, _build_input, _extract_final_output,
  and error handling for malformed factories
- docs/quickstart.md updated with install instructions and adapter table
@champ18ion champ18ion requested a review from anonymousAAK as a code owner June 11, 2026 17:40
@anonymousAAK

Copy link
Copy Markdown
Owner

@copilot resolve the merge conflicts in this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Adapter] AutoGen

2 participants