You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"A judgement on whether a request from a user successfully identifies both a repository owner/organization and repository name, accompanied by an explanation"
29
+
"A judgement on whether a request from a user successfully identifies an organization or user that owns issues."
"Retrieve Github issues using tool calls in order to answer the user's query.\n"
61
-
"Instructions:\n"
62
-
"1) Identify the criteria they specify such as username, organization and/or repository name.\n"
63
-
"2) If the user provides filters (e.g., state=open, label=bug, assignee=alice, or search text), apply them.\n"
64
-
"3) Return a clean, numbered summary: issue number, title, state, labels, assignee(s), and direct URL.\n"
65
-
"4) Prefer listing or searching for issues over the get_issues API unless the user gives you a specific issue number"
66
62
"User query: {request}"
67
63
),
68
64
agent=self.issue_researcher,
69
65
expected_output=(
70
-
"A concise report (Markdown allowed) listing matching issues with links and key metadata, "
71
-
"or a brief explanation if nothing matches."
66
+
"A direct answer to the user's query, citing the output of the tool to support your answer. Provide as many details as possible to support your claim."
Copy file name to clipboardExpand all lines: a2a/git_issue_agent/git_issue_agent/data_types.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,6 @@
6
6
############
7
7
8
8
9
-
classRepositoryJudgement(BaseModel):
10
-
is_owner_and_repo_identified: bool=Field(False, description="Whether the user's query indicates both an owner/organization name and the repo name")
9
+
classUserQueryJudgement(BaseModel):
10
+
has_sufficient_information: bool=Field(False, description="Whether the user's query contains sufficient enough information to retrieve issues from github")
11
11
explanation: str=Field(None, description="A detailed explanation as to why you made the judgement")
- Do **not** guess repository owners, names, or issue numbers.
41
+
- Choose the most specific tool that aligns with the user’s intent.
42
+
- Respect each tool’s required and optional parameters; format them exactly as expected.
43
+
- Use only one tool call at a time.
44
+
45
+
**List Issue Types:** Use only to enumerate available issue types for a specific organization.
46
+
**List Issues:** Use only when both repository owner and exact repository name are provided. Optional filters: state, label, date, etc.
47
+
**List Sub-Issues:** Use only when owner, repo, and issue number are given.
48
+
**Search Issues:** Use for broader queries or when owner/repo are unknown. Optionally scope by owner or repo if provided.
49
+
50
+
Decision rules:
51
+
- Prefer list-style tools when the query targets a specific repo or issue.
52
+
- Prefer search when the user’s scope is broad or unspecified.
53
+
- Never infer missing identifiers.
54
+
55
+
Examples:
56
+
- “Open issues in `kagenti/agent-examples`” → list issues
57
+
- “Find issues mentioning ‘timeout’ across all repos” → search issues
58
+
- “Issue types for the `ibm` organization” → list issue types
59
+
- “Sub-issues under #134 in `openai/triton`” → list sub-issues
24
60
25
-
- Use a tool when the user asks for information from Github that is not already in the provided context.
26
-
- Prefer the single best tool rather than multiple overlapping tools.
27
-
- If multiple tools could work, choose the one whose schema requires the fewest assumptions.
28
-
- Always provide required fields, populated with information provided by the user's query.
29
-
- If the user query does not provide enough information to fill out the fields, use a different tool that is suitable
30
-
- For example, the list_issues tool requires a repository name, but the search_issues API does not. If the user does not provide a repository name, you cannot use the list_issues tool.
31
-
- For optional fields, you may omit them unless needed. If omitting, just leave them out of the call - Do not pass them in with a None value.
32
-
- Never invent fields not present in the schema.
33
-
- Dates/times: use ISO 8601 if not specified."""
61
+
TOOL USE RULES
62
+
- Use only the tools provided here.
63
+
- Cite tool outputs or provided context; do not add outside knowledge.
64
+
"""
34
65
35
66
36
67
REPO_ID_BACKSTORY="""
37
68
You are a judge determining whether a user’s request successfully identifies sufficient information to retrieve Github issues.
38
69
39
70
For a request to count as a successful identification, it must:
40
-
- ✅ Explicitly name the repository owner, which can be:
41
-
- the exact organization name,
42
-
- the exact username, or
43
-
- a user ID that owns repositories or issues.
44
-
- Optionally, the request may also name a specific repository.
71
+
- ✅ Explicitly name the an owner, which can be:
72
+
- an organization name,
73
+
- a username
45
74
46
75
✅ Positive Examples
47
76
48
-
- "kagenti/agent-examples" → Identifies the repository agent-examples owned by the organization kagenti.
49
-
- "foo in the bar organization" → Identifies the repository foo owned by the organization bar.
50
-
- "issues for username123" → Valid if the goal is to search across all repositories owned by username123.
77
+
- "summarize open issues across the foo organization" → Valid because the foo organization is identified.
78
+
- "kagenti/agent-examples" → Identifies the kagenti organization.
79
+
- "foo in the bar organization" → Identifies bar organization.
80
+
- "the kubernetes organization" → Identifies the kubernetes organization.
51
81
52
82
❌ Negative Examples
53
-
- "the kubernetes repo" → Invalid because it only specifies the repository name, not the owner.
54
-
- "show me open issues" (with no owner or repo) → Invalid because no owner or repository is identified.
83
+
- "the kubernetes repo" → Invalid because it only specifies a repository name, not the owner or the organization.
84
+
- "show me open issues" (with no owner or organization) → Invalid because no owner or organization is identified.
55
85
56
86
Your task is to return whether the user’s request meets these criteria.
0 commit comments