Skip to content

Commit c996580

Browse files
authored
Merge branch 'main' into fix/anthropic-client-error-when-thinking-is-enabled
2 parents 02e3568 + c3334b9 commit c996580

File tree

149 files changed

+7050
-580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+7050
-580
lines changed

.github/CODEOWNERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# AG2 code owners
2+
# About code owners https://docs.github.com/ru/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
3+
4+
# A2A and Remote
5+
/autogen/a2a/ @Lancetnik
6+
/autogen/remote/ @Lancetnik
7+
/test/a2a/ @Lancetnik
8+
/test/remote/ @Lancetnik
9+
/website/docs/user-guide/a2a/ @Lancetnik
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Claude Code Review
2+
3+
on:
4+
# For PRs from the same repository (fast path)
5+
pull_request:
6+
types:
7+
- opened
8+
- synchronize
9+
- ready_for_review
10+
# Optional: Only run on specific file changes
11+
# paths:
12+
# - "src/**/*.ts"
13+
# - "src/**/*.tsx"
14+
# - "src/**/*.js"
15+
# - "src/**/*.jsx"
16+
# For PRs from forked repositories (secure path with secrets)
17+
pull_request_target:
18+
types:
19+
- opened
20+
- synchronize
21+
- ready_for_review
22+
23+
jobs:
24+
claude-review:
25+
# Skip draft PRs and prevent duplicate runs
26+
if: |
27+
github.event.pull_request.draft == false &&
28+
(
29+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
30+
(github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository)
31+
)
32+
33+
runs-on: ubuntu-latest
34+
permissions:
35+
contents: read
36+
pull-requests: read
37+
issues: read
38+
id-token: write
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v4
43+
with:
44+
fetch-depth: 1
45+
46+
- name: Checkout PR branch
47+
env:
48+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
run: |
50+
if [ "${{ github.event_name }}" = "pull_request_target" ]; then
51+
echo "⚠️ Forked PR detected - running in secure mode"
52+
echo "PR from: ${{ github.event.pull_request.head.repo.full_name }}"
53+
echo "Base repo: ${{ github.repository }}"
54+
fi
55+
56+
echo "Checking out PR #${{ github.event.pull_request.number }}"
57+
gh pr checkout ${{ github.event.pull_request.number }}
58+
echo "✅ PR branch checked out successfully"
59+
60+
- name: Run Claude Code Review
61+
id: claude-review
62+
uses: anthropics/claude-code-action@v1
63+
with:
64+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
65+
prompt: |
66+
REPO: ${{ github.repository }}
67+
PR NUMBER: ${{ github.event.pull_request.number }}
68+
69+
Please review this pull request and provide feedback on:
70+
- Code quality and best practices
71+
- Potential bugs or issues
72+
- Performance considerations
73+
- Security concerns
74+
- Test coverage
75+
76+
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
77+
78+
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
79+
80+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
81+
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
82+
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

.github/workflows/claude.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
actions: read # Required for Claude to read CI results on PRs
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 1
32+
33+
- name: Checkout PR branch (if comment is on a PR)
34+
if: github.event.issue.pull_request || github.event.pull_request
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
run: |
38+
if [ -n "${{ github.event.issue.number }}" ]; then
39+
PR_NUMBER="${{ github.event.issue.number }}"
40+
elif [ -n "${{ github.event.pull_request.number }}" ]; then
41+
PR_NUMBER="${{ github.event.pull_request.number }}"
42+
fi
43+
44+
if [ -n "$PR_NUMBER" ]; then
45+
echo "Detected comment on PR #$PR_NUMBER"
46+
47+
# Check if it's a forked PR
48+
PR_INFO=$(gh pr view $PR_NUMBER --json isCrossRepository,headRepositoryOwner 2>/dev/null || echo '{}')
49+
IS_FORK=$(echo "$PR_INFO" | jq -r '.isCrossRepository // false')
50+
51+
if [ "$IS_FORK" = "true" ]; then
52+
echo "⚠️ Forked PR detected - running in secure mode"
53+
FORK_OWNER=$(echo "$PR_INFO" | jq -r '.headRepositoryOwner.login')
54+
echo "PR from: $FORK_OWNER"
55+
fi
56+
57+
echo "Checking out PR #$PR_NUMBER"
58+
gh pr checkout $PR_NUMBER
59+
echo "✅ PR branch checked out successfully"
60+
fi
61+
62+
- name: Run Claude Code
63+
id: claude
64+
uses: anthropics/claude-code-action@v1
65+
with:
66+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
67+
68+
# This is an optional setting that allows Claude to read CI results on PRs
69+
additional_permissions: |
70+
actions: read

.github/workflows/core-llm-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Checkout
6161
uses: actions/checkout@v5
6262
with:
63-
ref: ${{ github.event.pull_request.head.sha }}
63+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
6464
- uses: astral-sh/setup-uv@v6
6565
with:
6666
version: "latest"

.github/workflows/core-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
shell: bash
8181
- name: Install packages and dependencies
8282
run: |
83-
uv pip install --system -e .[test,cosmosdb,interop,redis,websockets,openai,docs]
83+
uv pip install --system -e .[test,cosmosdb,interop,redis,websockets,openai,docs,a2a]
8484
- name: Install optional dependencies for code executors
8585
run: |
8686
uv pip install --system -e ".[jupyter-executor]"

.gitignore

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
.docusaurus/
22
node_modules/
3+
34
# Project
4-
/.vs
5-
.vscode
5+
.vs/
6+
.vscode/
7+
.idea/
8+
.DS_Store
69

710
# Log files
811
*.log
912

10-
# Python virtualenv
11-
.venv*
12-
.env*
13-
1413
# Byte-compiled / optimized / DLL files
1514
__pycache__/
1615
*.py[cod]
@@ -76,7 +75,7 @@ db.sqlite3-journal
7675

7776
# Flask stuff:
7877
instance/
79-
.webassets-cache
78+
.webassets-cache/
8079

8180
# Scrapy stuff:
8281
.scrapy
@@ -125,6 +124,8 @@ venv/
125124
ENV/
126125
env.bak/
127126
venv.bak/
127+
.venv*
128+
.env*
128129

129130
# Spyder project settings
130131
.spyderproject
@@ -141,6 +142,9 @@ venv.bak/
141142
.dmypy.json
142143
dmypy.json
143144

145+
# ruff
146+
.ruff_cache/
147+
144148
# Pyre type checker
145149
.pyre/
146150

@@ -150,10 +154,7 @@ dmypy.json
150154
# Cython debug symbols
151155
cython_debug/
152156

153-
logs
154-
155-
.idea/*
156-
.DS_Store
157+
logs/
157158

158159
output/
159160
*.pkl
@@ -168,7 +169,7 @@ wolfram.txt
168169

169170
# DB on disk for Teachability
170171
tmp/
171-
test/my_tmp/*
172+
test/my_tmp/
172173

173174
# Storage for the AgentEval output
174175
test/test_files/agenteval-in-out/out/
@@ -179,28 +180,27 @@ local_cache/
179180

180181
# Files created by tests
181182
*tmp_code_*
182-
test/agentchat/test_agent_scripts/*
183+
test/agentchat/test_agent_scripts/
183184

184185
# test cache
185186
.cache_test
186187
.db
187188
local_cache
188189

189-
190-
notebook/result.png
191-
192-
notebook/coding
193-
194190
chroma
195191
notebook/reasoning_tree.json
196192
client_secret*.json
197193
*token*.json
198194
*credentials.json
199195
notebook/*_server.py
200196

197+
notebook/result.png
198+
notebook/coding/
201199

202-
notebook/mcp/wikipedia_articles
203-
notebook/mcp/arxiv_papers
200+
notebook/mcp/wikipedia_articles/
201+
notebook/mcp/arxiv_papers/
204202

203+
remote-examples
205204

206205
*CLAUDE.md:
206+
.cursor/

MAINTAINERS.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,30 @@
22

33
## Here is a list of maintainers for the AG2 project.
44

5-
| Name | GitHub Handle | Organization | Features |
6-
|-----------------|------------------------------------------------------------|------------------------|-----------------------------------------|
7-
| Qingyun Wu | [qingyun-wu](https://github.com/qingyun-wu) | Penn State University | all, alt-models, autobuilder |
8-
| Chi Wang | [sonichi](https://github.com/sonichi) | - | all |
9-
| Mark Sze | [marklysze](https://github.com/marklysze) | - | alt-models, group chat |
10-
| Hrushikesh Dokala | [Hk669](https://github.com/Hk669) | - | alt-models, swebench, logging, rag |
11-
| Jiale Liu | [LeoLjl](https://github.com/LeoLjl) | Penn State University | autobuild, group chat |
12-
| Shaokun Zhang | [skzhang1](https://github.com/skzhang1) | Penn State University | AgentOptimizer, Teachability |
13-
| Yixuan Zhai | [randombet](https://github.com/randombet) | Meta | group chat, sequential_chats, rag |
14-
| Yiran Wu | [yiranwu0](https://github.com/yiranwu0) | Penn State University | alt-models, group chat, logging, infra |
15-
| Jieyu Zhang | [JieyuZ2](https://jieyuz2.github.io/) | University of Washington | autobuild, group chat |
16-
| Davor Runje | [davorrunje](https://github.com/davorrunje) | airt.ai | Tool calling, I/O |
17-
| Rudy Wu | [rudyalways](https://github.com/rudyalways) | Google | all, group chats, sequential chats |
18-
| Haiyang Li | [ohdearquant](https://github.com/ohdearquant) | - | all, sequential chats, structured output, low-level|
19-
| Eric Moore | [emooreatx](https://github.com/emooreatx) | IBM | all|
20-
| Evan David | [evandavid1](https://github.com/evandavid1) | - | all |
21-
| Tvrtko Sternak | [sternakt](https://github.com/sternakt) | airt.ai | structured output |
22-
| Jiacheng Shang | [Eric-Shang](https://github.com/Eric-Shang) | Toast | RAG |
23-
| Alec Solder | [alecsolder](https://github.com/alecsolder) | - | swarms, reasoning, function calling |
24-
| Marc Willhaus | [willhama](https://github.com/willhama) | - | - |
25-
| George Sideris | [giorgossideris](https://github.com/giorgossideris) | - | reasoning, RAG |
26-
| Beibin Li | [BeibinLi](https://github.com/BeibinLi) | GenAI, Meta | multimodal, reasoning, optiguide |
5+
| Name | GitHub Handle | Organization | Features |
6+
|-------------------|------------------------------------------------------------|--------------------------|-----------------------------------------|
7+
| Qingyun Wu | [qingyun-wu](https://github.com/qingyun-wu) | Penn State University | all, alt-models, autobuilder |
8+
| Chi Wang | [sonichi](https://github.com/sonichi) | - | all |
9+
| Mark Sze | [marklysze](https://github.com/marklysze) | - | alt-models, group chat |
10+
| Hrushikesh Dokala | [Hk669](https://github.com/Hk669) | - | alt-models, swebench, logging, rag |
11+
| Jiale Liu | [LeoLjl](https://github.com/LeoLjl) | Penn State University | autobuild, group chat |
12+
| Shaokun Zhang | [skzhang1](https://github.com/skzhang1) | Penn State University | AgentOptimizer, Teachability |
13+
| Yixuan Zhai | [randombet](https://github.com/randombet) | Meta | group chat, sequential_chats, rag |
14+
| Yiran Wu | [yiranwu0](https://github.com/yiranwu0) | Penn State University | alt-models, group chat, logging, infra |
15+
| Jieyu Zhang | [JieyuZ2](https://jieyuz2.github.io/) | University of Washington | autobuild, group chat |
16+
| Davor Runje | [davorrunje](https://github.com/davorrunje) | airt.ai | Tool calling, I/O |
17+
| Rudy Wu | [rudyalways](https://github.com/rudyalways) | Google | all, group chats, sequential chats |
18+
| Haiyang Li | [ohdearquant](https://github.com/ohdearquant) | - | all, sequential chats, structured output, low-level|
19+
| Eric Moore | [emooreatx](https://github.com/emooreatx) | IBM | all |
20+
| Evan David | [evandavid1](https://github.com/evandavid1) | - | all |
21+
| Tvrtko Sternak | [sternakt](https://github.com/sternakt) | airt.ai | structured output |
22+
| Jiacheng Shang | [Eric-Shang](https://github.com/Eric-Shang) | Toast | RAG |
23+
| Alec Solder | [alecsolder](https://github.com/alecsolder) | - | swarms, reasoning, function calling |
24+
| Marc Willhaus | [willhama](https://github.com/willhama) | - | - |
25+
| George Sideris | [giorgossideris](https://github.com/giorgossideris) | - | reasoning, RAG |
26+
| Beibin Li | [BeibinLi](https://github.com/BeibinLi) | GenAI, Meta | multimodal, reasoning, optiguide |
27+
| Nikita Pastukhov | [Lancetnik](https://github.com/lancetnik) | - | A2A |
28+
2729

2830
**Pending Maintainers list (Marked with \*, Waiting for explicit approval from the maintainers)**
2931
| Name | GitHub Handle | Organization | Features |

autogen/a2a/__init__.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (c) 2023 - 2025, AG2ai, Inc., AG2ai open-source projects maintainers and core contributors
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
try:
5+
from a2a.types import AgentCard
6+
except ImportError as e:
7+
raise ImportError("a2a-sdk is not installed. Please install it with:\npip install ag2[a2a]") from e
8+
9+
import warnings
10+
11+
warnings.warn(
12+
(
13+
"AG2 Implementation for A2A support is in experimental mode "
14+
"and is subjected to breaking changes. Once it's stable enough the "
15+
"experimental mode will be removed. Your feedback is welcome."
16+
),
17+
ImportWarning,
18+
stacklevel=2,
19+
)
20+
21+
from autogen.remote.httpx_client_factory import HttpxClientFactory
22+
23+
from .agent_executor import AutogenAgentExecutor
24+
from .client import A2aRemoteAgent
25+
from .httpx_client_factory import MockClient
26+
from .server import A2aAgentServer, CardSettings
27+
28+
__all__ = (
29+
"A2aAgentServer",
30+
"A2aRemoteAgent",
31+
"AgentCard",
32+
"AutogenAgentExecutor",
33+
"CardSettings",
34+
"HttpxClientFactory",
35+
"MockClient",
36+
)

0 commit comments

Comments
 (0)