Skip to content
Merged
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
11 changes: 7 additions & 4 deletions docs-site/content/kagent/main/agents/bring-your-own-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ return application.Run()
For a complete executor, see [`go/core/test/byoa2a/main.go`](https://github.com/kagent-dev/kagent/blob/main/go/core/test/byoa2a/main.go) in the kagent repository.
{{% /tab %}}
{{% tab name="Python" %}}
The `kagent-adk` package provides helpers for agents that are built with the Google Agent Development Kit (ADK). `KAgentApp` wraps an ADK agent rather than an arbitrary framework, serves A2A over gRPC, and answers the readiness endpoint on 8081. `materialize_from_bootstrap` fetches the bootstrap bundle and writes its documents to `/config`, and `KAgentConfig.from_file` reads the `runtime` object back. The listener defaults to `[::]:80`, which matches what kagent dials.
The `kagent-adk` package provides helpers for agents that are built with the Google Agent Development Kit (ADK). `KAgentApp` wraps an ADK agent, serves A2A over gRPC, and answers the readiness endpoint on 8081. `materialize_from_bootstrap` fetches the bootstrap bundle and writes its documents to `/config`, and `KAgentConfig.from_file` reads the `runtime` object back. The listener defaults to `[::]:80`, which matches what kagent dials.

The `kagent-langgraph`, `kagent-crewai`, and `kagent-openai` packages each provide a `KAgentApp` helper that serves A2A in the same way. With every helper, start the server with `app.build().run()`. An entry point that passes `app.build()` to Uvicorn, as earlier releases required, does not serve gRPC.

```python
from kagent.adk import KAgentApp
Expand All @@ -229,7 +231,8 @@ app = KAgentApp(
agent_card=card,
kagent_api_url=config.api_url,
app_name=config.app_name,
).build()
)
app.build().run()
```

`from_file` raises `ValueError` when the document omits `control_plane_url`, `gateway_url`, `name`, or `namespace`. Because `from_file` only reads the file, a standalone process that runs outside Agent Substrate skips `materialize_from_bootstrap` and supplies its own `/config/config.json`.
Expand All @@ -247,7 +250,8 @@ app = KAgentApp(
kagent_api_url=config.api_url,
app_name=config.app_name,
config=parse_config(Path("/config/config.json").read_text()),
).build()
)
app.build().run()
```

The `a2a_grpc_address` argument overrides both the default and the configured address.
Expand All @@ -270,7 +274,6 @@ The kagent helpers also save the bundle to `/data/kagent/bootstrap/bundle.pb`, a
## Known limitations

- **The A2A interface is fixed.** kagent advertises `http://127.0.0.1:80` over gRPC, and `spec.byo` does not take a field that changes the address, the port, or the protocol. An image that serves A2A over only HTTP JSON-RPC cannot run on this harness.
- **The LangGraph, CrewAI, and OpenAI adapters do not satisfy the contract.** The `kagent-langgraph`, `kagent-crewai`, and `kagent-openai` packages each build a FastAPI application with A2A JSON-RPC routes, without a gRPC server. Running LangGraph, CrewAI, or the OpenAI Agents SDK under `byo` means serving A2A over gRPC yourself, as the **Any other language** tab in [Build the image](#build-the-image) describes.
- **Skills load only when the image reads them.** kagent mounts each skill and plugin that an AgentTemplate attaches, and describes them in the agent configuration. The Go helper reads that description. The Python helper does not yet read it, so a Python image runs without its skills.
- **Long-term memory is unavailable.** Memory is configured under `spec.kagent.memory`, and only the `kagent` harness wires it up. A `byo` Harness does not take an equivalent setting. For what a BYO image would need to replace, see [Agent memory]({{< link path="agents/agent-memory" >}}).
- **A broken port mapping looks like a healthy agent.** For the failure and what avoids it, see [The A2A contract](#the-a2a-contract).
Expand Down
Loading