Skip to content

Commit 5ea7d63

Browse files
CokeLee777claude
andcommitted
fix: correct AgentCard example in README
Replace non-existent `.url()` and `.protocolVersion()` builder calls with the correct `.supportedInterfaces()` method, and add the missing `AgentInterface` import. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c595071 commit 5ea7d63

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,19 @@ you'd like to support.
104104
import io.a2a.server.PublicAgentCard;
105105
import io.a2a.spec.AgentCapabilities;
106106
import io.a2a.spec.AgentCard;
107+
import io.a2a.spec.AgentInterface;
107108
import io.a2a.spec.AgentSkill;
108109
...
109110

110111
@ApplicationScoped
111112
public class WeatherAgentCardProducer {
112-
113+
113114
@Produces
114115
@PublicAgentCard
115116
public AgentCard agentCard() {
116117
return AgentCard.builder()
117118
.name("Weather Agent")
118119
.description("Helps with weather")
119-
.url("http://localhost:10001")
120120
.version("1.0.0")
121121
.capabilities(AgentCapabilities.builder()
122122
.streaming(true)
@@ -131,7 +131,8 @@ public class WeatherAgentCardProducer {
131131
.tags(Collections.singletonList("weather"))
132132
.examples(List.of("weather in LA, CA"))
133133
.build()))
134-
.protocolVersion(io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION)
134+
.supportedInterfaces(List.of(
135+
new AgentInterface("JSONRPC", "http://localhost:10001")))
135136
.build();
136137
}
137138
}

0 commit comments

Comments
 (0)