Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,15 +336,27 @@ AgentCard agentCard = A2A.getAgentCard("http://localhost:1234");

## Additional Examples

### Hello World Example
### Hello World Client Example

A complete example of an A2A client communicating with a Python A2A server is available in the [examples/helloworld](examples/helloworld) directory. This example demonstrates:
A complete example of a Java A2A client communicating with a Python A2A server is available in the [examples/helloworld/client](examples/helloworld/client/README.md) directory. This example demonstrates:

- Setting up and using the A2A Java client
- Sending regular and streaming messages
- Receiving and processing responses
- Sending regular and streaming messages to a Python A2A server
- Receiving and processing responses from the Python A2A server

The example includes detailed instructions on how to run both the Python server and the Java client using JBang. Check out the [example's README](examples/helloworld/client/src/main/java/io/a2a/examples/helloworld/README.md) for more information.
The example includes detailed instructions on how to run the Python A2A server and how to run the Java A2A client using JBang.

Check out the [example's README](examples/helloworld/client/README.md) for more information.

### Hello World Server Example

A complete example of a Python A2A client communicating with a Java A2A server is available in the [examples/helloworld/server](examples/helloworld/server/README.md) directory. This example demonstrates:

- A sample `AgentCard` producer
- A sample `AgentExecutor` producer
- A Java A2A server receiving regular and streaming messages from a Python A2A client

Check out the [example's README](examples/helloworld/server/README.md) for more information.

## License

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ A JBang script is provided in the example directory to make running the client e

2. Navigate to the example directory:
```bash
cd examples/client/src/main/java/io/a2a/examples/helloworld
cd examples/helloworld/client/src/main/java/io/a2a/examples/helloworld/
```
Comment on lines 63 to 66
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The cd command navigates into a very deep directory. A simpler approach is to run jbang with the full path to the script from the project root, avoiding the cd command entirely.

Suggested change
2. Navigate to the example directory:
```bash
cd examples/client/src/main/java/io/a2a/examples/helloworld
cd examples/helloworld/client/src/main/java/io/a2a/examples/helloworld/
```
2. Run the client from the project root using JBang:
```bash
jbang examples/helloworld/client/src/main/java/io/a2a/examples/helloworld/HelloWorldRunner.java


3. Run the client using the JBang script:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This example demonstrates how to use the A2A Java SDK to communicate with an A2A
The Java server can be started using `mvn` as follows:

```bash
cd examples/server
cd examples/helloworld/server
mvn quarkus:dev
```

Expand Down