Skip to content

Commit 3bbf268

Browse files
committed
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.
1 parent c595071 commit 3bbf268

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 3 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,7 @@ 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(new AgentInterface("JSONRPC", "http://localhost:10001")))
135135
.build();
136136
}
137137
}

0 commit comments

Comments
 (0)