From 014e5f18bda7ae208e076eb01b8e62425c686702 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 12 Oct 2026 14:25:38 +0000 Subject: [PATCH 1/2] [Automated] Draft docs (kagent): feat: attach text files and images to chat messages Signed-off-by: GitHub Action --- docs-site/content/kagent/1.x/examples/a2a-agents.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs-site/content/kagent/1.x/examples/a2a-agents.md b/docs-site/content/kagent/1.x/examples/a2a-agents.md index 7cbd2891..01666648 100644 --- a/docs-site/content/kagent/1.x/examples/a2a-agents.md +++ b/docs-site/content/kagent/1.x/examples/a2a-agents.md @@ -98,6 +98,8 @@ An A2A client typically starts by reading the agent card, which tells it what th `SendMessage` blocks until the agent finishes the turn, or pauses to ask a person, and then returns the whole task. A message needs its own ID, a role, and at least one part. +A message part can also carry a file as raw bytes, with `filename` and `mediaType` set on the part. Non-image files reach the model as extracted text, and the extracted text keeps the file name. Images reach providers that accept image input. Providers that do not accept image input, such as Amazon Bedrock, Ollama, and SAP AI Core, receive a text note that names the image instead. Messages that use the controller or kagent gRPC clients can be up to 16 MiB, so clients that send large file parts must stay under that limit. + 1. Send a message to the Agent. Omitting a `contextId` starts a new Session. ```bash grpcurl -plaintext \ From 7f57c91bf7d149516d42e05dbd0f8c814c06393c Mon Sep 17 00:00:00 2001 From: Rachael Graham Date: Mon, 12 Oct 2026 09:51:43 -0500 Subject: [PATCH 2/2] Update a2a-agents.md Signed-off-by: Rachael Graham --- docs-site/content/kagent/1.x/examples/a2a-agents.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs-site/content/kagent/1.x/examples/a2a-agents.md b/docs-site/content/kagent/1.x/examples/a2a-agents.md index 01666648..9e42bedb 100644 --- a/docs-site/content/kagent/1.x/examples/a2a-agents.md +++ b/docs-site/content/kagent/1.x/examples/a2a-agents.md @@ -98,7 +98,10 @@ An A2A client typically starts by reading the agent card, which tells it what th `SendMessage` blocks until the agent finishes the turn, or pauses to ask a person, and then returns the whole task. A message needs its own ID, a role, and at least one part. -A message part can also carry a file as raw bytes, with `filename` and `mediaType` set on the part. Non-image files reach the model as extracted text, and the extracted text keeps the file name. Images reach providers that accept image input. Providers that do not accept image input, such as Amazon Bedrock, Ollama, and SAP AI Core, receive a text note that names the image instead. Messages that use the controller or kagent gRPC clients can be up to 16 MiB, so clients that send large file parts must stay under that limit. +A message part can also carry a file. Put the file's bytes in the part's `raw` field, which JSON encodes as base64, and set `filename` and `mediaType` on the same part. + +> [!NOTE] +> Unlike the UI, which checks each file as you stage it, this path accepts any media type. A file whose media type is not text-like reaches the model as the note `[Uploaded file "report.pdf" (application/pdf) could not be read as text.]` instead of contents. The controller's gRPC server rejects any message over 16 MiB, framing included. For how files reach the model, and the file types and sizes that the UI accepts, see [Attach files to a message]({{< link path="observability/launch-ui#attach-files-to-a-message" >}}). 1. Send a message to the Agent. Omitting a `contextId` starts a new Session. ```bash