|
2 | 2 |
|
3 | 3 | **Getting started with Agent Builder and A2A using Microsoft Agent Framework** |
4 | 4 |
|
5 | | -This is a example Python console app that demonstrates how to connect and utilize an [Elastic Agent Builder](https://www.elastic.co/elasticsearch/agent-builder) agent via the Agent2Agent (A2A) Protocol orchestrated with the [Microsoft Agent Framework](https://learn.microsoft.com/en-us/agent-framework/overview/agent-framework-overview). |
| 5 | +This is an example Python console app that demonstrates how to connect and utilize an [Elastic Agent Builder](https://www.elastic.co/elasticsearch/agent-builder) agent via the Agent2Agent (A2A) Protocol orchestrated with the [Microsoft Agent Framework](https://learn.microsoft.com/en-us/agent-framework/overview/agent-framework-overview). |
6 | 6 |
|
7 | 7 | ## Prerequisites |
8 | 8 |
|
@@ -52,7 +52,7 @@ This is a example Python console app that demonstrates how to connect and utiliz |
52 | 52 | 3. In Elastic Agent Builder, create a **tool** with the following values: |
53 | 53 | * **Type**: `ES|QL` |
54 | 54 | * **Tool ID**: `example.get_greetings` |
55 | | -* **Description**: `Get greetings doc from Elasticsearch my\docs index.` |
| 55 | +* **Description**: `Get greetings doc from Elasticsearch my-docs index.` |
56 | 56 | * **ES|QL**: |
57 | 57 |
|
58 | 58 | FROM my-docs | WHERE filename == "greetings.md" |
@@ -88,23 +88,23 @@ This is a example Python console app that demonstrates how to connect and utiliz |
88 | 88 | 2. Replace <YOUR-ELASTIC-AGENT-BUILDER-URL\> |
89 | 89 | 1. In your Elastic deployment, go to the Elastic Agent Builder - Tools page. Click the **MCP Server** dropdown at the top of the Tools page. Select **Copy MCP Server URL.** |
90 | 90 | 2. In Visual Studio add the **MCP Server URL** value to the `elastic-agent-builder-a2a.py` file. |
91 | | - * Find where the placeholder text “**\<YOUR-ELASTIC-AGENT-BUILDER-URL\>**” appears and paste in the copied **MCP Server URL** to replace the placeholder text. Now edit the pasted **MCP Server URL**. Delete the text “mcp” at the end of the URL and replace it with the text “a2a”. The edited URL should look something like this |
| 91 | + * Find where the placeholder text “**<YOUR-ELASTIC-AGENT-BUILDER-URL\>**” appears and paste in the copied **MCP Server URL** to replace the placeholder text. Now edit the pasted **MCP Server URL**. Delete the text “mcp” at the end of the URL and replace it with the text “a2a”. The edited URL should look something like this |
92 | 92 |
|
93 | 93 | `https://example-project-a123.kb.westus2.azure.elastic.cloud/api/agent_builder/a2a` |
94 | 94 |
|
95 | | - 3. Replace \<YOUR-ELASTIC-API-KEY\> |
| 95 | + 3. Replace <YOUR-ELASTIC-API-KEY\> |
96 | 96 | 1. In your Elastic deployment, click **Elasticsearch** in the navigation menu to go to your deployment’s home page. |
97 | 97 | 2. Click **Create API key** to create a new API key. |
98 | 98 | 3. After the API key is created, copy the API Key value. |
99 | | - 4. In Visual Studio add the API Key value to the `elastic-agent-builder-a2a.pys` file. |
100 | | - * Find where the placeholder text “**\<YOUR-ELASTIC-API-KEY\>**” appears and paste in the copied API Key value to replace the placeholder text. |
| 99 | + 4. In Visual Studio add the API Key value to the `elastic-agent-builder-a2a.py` file. |
| 100 | + * Find where the placeholder text “**<YOUR-ELASTIC-API-KEY\>**” appears and paste in the copied API Key value to replace the placeholder text. |
101 | 101 |
|
102 | 102 | 4. Confirm the **relative_card_path** is set correctly in the `elastic-agent-builder-a2a.py` file by finding the code line that starts with the text “agent_card”. Confirm that the **relative_card_path** matches the Agent ID you specified when you created the agent in Elastic Agent Builder. If your Agent ID is “helloworld_agent” then the **relative_card_path** should be set to `/helloworld_agent.json` |
103 | 103 | 5. Save the `elastic_agent_builder_a2a.py` file in the Visual Studio editor. |
104 | 104 |
|
105 | 105 | 5. Create a Python virtual environment by running the following code in the Visual Studio Code terminal. |
106 | 106 |
|
107 | | - python \-m venv .venv |
| 107 | + python -m venv .venv |
108 | 108 | |
109 | 109 | 6. Activate the Python virtual environment. |
110 | 110 | * If you’re running MacOS, the command to activate the virtual environment is: |
|
0 commit comments