Skip to content
Draft
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
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ push-test-agent: buildx-create build-kagent-adk
kubectl apply --namespace kagent --context kind-$(KIND_CLUSTER_NAME) -f go/test/e2e/agents/kebab/agent.yaml
$(DOCKER_BUILDER) build --push $(BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) -t $(DOCKER_REGISTRY)/poem-flow:latest -f python/samples/crewai/poem_flow/Dockerfile ./python

.PHONY: test-e2e
test-e2e:
bash python/packages/kagent-adk/tests/e2e/run_tests.sh 2>&1

.PHONY: create-kind-cluster
create-kind-cluster:
bash ./scripts/kind/setup-kind.sh
Expand Down
52 changes: 52 additions & 0 deletions contrib/a2a/a2a-inspector/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#https://github.com/a2aproject/a2a-inspector

# Stage 1: Build the frontend assets
FROM node:18-alpine AS builder

RUN apk add git

# clone the repository https://github.com/a2aproject/a2a-inspector.git

WORKDIR /app
RUN git clone https://github.com/a2aproject/a2a-inspector.git

WORKDIR /app/a2a-inspector/frontend

# install dependencies
RUN npm install

# build the frontend assets
RUN npm rebuild esbuild

RUN npm run build

# Stage 2: Build the final application with the backend
FROM python:3.13-slim

WORKDIR /app

# Install build dependencies for Python packages
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libc6-dev \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*

RUN pip install uv
RUN mkdir -p /app/frontend

COPY --from=builder /app/a2a-inspector/pyproject.toml /app/a2a-inspector/uv.lock ./
COPY --from=builder /app/a2a-inspector/backend/ /app/backend/
COPY --from=builder /app/a2a-inspector/frontend/public /app/frontend/public

RUN uv sync --no-cache
RUN uv pip install validators

WORKDIR /app/backend

# Expose the port the backend server runs on
EXPOSE 8080

# The command to run the server. Because our WORKDIR is now /app/backend,
# we can simply refer to 'app:app' from the current directory.
CMD ["uv", "run", "--", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]
14 changes: 14 additions & 0 deletions contrib/a2a/a2a-inspector/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Local architecture detection to build for the current platform
LOCALARCH ?= $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')

.PHONY: build
build:
docker buildx build --push --platform linux/$(LOCALARCH) -t localhost:5001/a2a-inspector:latest .

.PHONY: deploy
deploy: build
kubectl apply -f a2a-inspector.yaml
kubectl wait --for=condition=Available deployment/a2a-inspector -n kagent --timeout=60s
open http://localhost:8080
kubectl port-forward svc/a2a-inspector 8080:8080 -n kagent
Empty file.
39 changes: 39 additions & 0 deletions contrib/a2a/a2a-inspector/a2a-inspector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: a2a-inspector
namespace: kagent
spec:
replicas: 1
selector:
matchLabels:
app: "a2a-inspector"
template:
metadata:
labels:
app: a2a-inspector
spec:
containers:
- name: a2a-inspector
image: localhost:5001/a2a-inspector:latest
ports:
- containerPort: 8080
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 1000m
memory: 512Mi
---
kind: Service
apiVersion: v1
metadata:
name: a2a-inspector
namespace: kagent
spec:
selector:
app: a2a-inspector
ports:
- port: 8080
targetPort: 8080
20 changes: 20 additions & 0 deletions contrib/agents/workflow-agent-context-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: kagent.dev/v1alpha2
kind: Agent
metadata:
name: wf-context-agent
namespace: kagent
spec:
description: You are a simple agent which answers user question using context
type: Declarative
declarative:
modelConfig: default-model-config
systemMessage: |-
- You are simple agent which answers user question using all your context
- Use `set-context-var` tool to set context for the agent
- Use `get-context-var` tool to get context for the agent
tools:
- type: McpServer
toolServer: context-mcp-server
toolNames:
- set-context-var
- get-context-var
89 changes: 89 additions & 0 deletions contrib/agents/workflow-agent-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
apiVersion: kagent.dev/v1alpha2
kind: Agent
metadata:
name: sre-cluster-diagnostics
namespace: kagent
spec:
type: Workflow
description: "Cluster diagnostic Team"
workflow:
parallel:
maxWorkers: 5
timeout: "5m"
subAgents:
- name: istio-agent
- name: helm-agent
- name: k8s-agent
---
apiVersion: kagent.dev/v1alpha2
kind: Agent
metadata:
name: sre-report-agent
namespace: kagent
spec:
description: SRE Report Agent
type: Declarative
declarative:
modelConfig: default-model-config
systemMessage: |-
- You are SRE report agent responsible to build kubernetes cluster health report

## Data collection
- Use data prepared by `sre-cluster-diagnostics`

## Format
- Create detailed diagnostic report with separate sections
- Always add a summary at the end
- Use emoji and table format

---
apiVersion: kagent.dev/v1alpha2
kind: Agent
metadata:
name: sre-team
namespace: kagent
spec:
type: Workflow
description: "SRE Team"
workflow:
sequential:
timeout: "5m"
subAgents:
- name: sre-coordinator
- name: sre-cluster-diagnostics
- name: sre-report-agent
---
apiVersion: kagent.dev/v1alpha2
kind: Agent
metadata:
name: sre-coordinator
namespace: kagent
spec:
description: You are SRE Agent which coordinates Cluster diagnostic Team and
type: Declarative
declarative:
modelConfig: default-model-config
systemMessage: |-
- You are autonomous SRE Agent Responsible to plan data collection and of kubernetes cluster health report
- Build a list of items to check by `sre-cluster-diagnostics` team and delegate report generation to `sre-report-agent`
- Do not ask user to confirm - act autonomously
- Use only known available Tools
- Do not invent names
---
apiVersion: kagent.dev/v1alpha2
kind: Agent
metadata:
name: sre-team-manager
namespace: kagent
spec:
description: You are SRE Agent which coordinates sre-team tasks
type: Declarative
declarative:
modelConfig: default-model-config
systemMessage: |-
- You are autonomous SRE Team Manager which coordinate tasks of SRE team
- use `sre-team` Agent to perform diagnostic tasks
tools:
- type: Agent
agent:
name: sre-team
Loading
Loading