Skip to content

Releases: questcollector/autogen-kubernetes

autogen-kubernetes-v0.6.2

Choose a tag to compare

@questcollector questcollector released this 15 Sep 01:55
f3825a3

What's Changed

  • auto-remove feature

Full Changelog: autogen-kubernetes-mcp-v0.6.1...autogen-kubernetes-v0.6.2

autogen-kubernetes-v0.6.1

Choose a tag to compare

@questcollector questcollector released this 02 Sep 06:53
5af9183

What's Changed

bug fix
PodJupyterServer

  • support None command
  • support args parameter in _from_config

Full Changelog: autogen-kubernetes-mcp-v0.6.0...autogen-kubernetes-v0.6.1

autogen-kubernetes-mcp-v0.6.1

Choose a tag to compare

@questcollector questcollector released this 02 Sep 06:55
5af9183

What's Changed

bug fix

  • command and args argument uses single string type
... --command "python -m" --args "arg1 arg2 arg3"

Full Changelog: autogen-kubernetes-mcp-v0.6.0...autogen-kubernetes-mcp-v0.6.1

autogen-kubernetes-v0.6.0

Choose a tag to compare

@questcollector questcollector released this 28 Aug 09:59
b2e266f

What's Changed

PodJupyterServer

  • Creates a Jupyter Server Pod using jupyter-kernel-gateway, along with the required token secret and service resources.
  • Similar to PodCommandLineCodeExecutor, the service_spec, and secret_spec can be customized in multiple formats: Python dictionary, YAML/json string, YAML/json file path, or Kubernetes client model.
  • When used with default arguments, it runs on the quay.io/jupyter/docker-stacks-foundation image with jupyter-kernel-gateway and ipykernal installed, and executes via jupyter-kernel-gateway. For efficiency in production, building a custom image is recommended. Below is the sample Dockerfile
FROM quay.io/jupyter/docker-stacks-foundation

RUN mamba install --yes jupyter_kernel_gateway ipykernel && \
    mamba clean --all -f -y && \
    fix-permissions "${CONDA_DIR}" && \
    fix-permissions "/home/${NB_USER}"
CMD python -m jupyter kernelgateway --KernelGatewayApp.ip=0.0.0.0 \
        --JupyterApp.answer_yes=true \
        --JupyterWebsocketPersonality.list_kernels=true

PodJupyterCodeExecutor

  • A CodeExecutor that leverages PodJupyterServer and the jupyter-kernel-gateway server to executor code statefully and retrieve results
  • When used together with PodJupyterServer,note that the server generates PodJupyterConnectionInfo based on the service FQDN. This means it cannot be directly used in a non-incluster environment.
    • After creating the PodJupyterServer, you must construct and provide PodJupyterConnectionInfo so that PodJupyterCodeExecutor can access it properly.

Using with PodJupyterServer

async with PodJupyeterServer() as jupyter_server:
    async with PodJupyterCodeExecutor(jupyter_server) as executor:
        code_result = await executor.execute_code_blocks(
            code_blocks=[
                CodeBlock(language="python", code="print('Hello, World!')"),
            ],
            cancellation_token=CancellationToken(),
        )
        print(code_result)

Using custom PodJupyterConnectionInfo

async with PodJupyeterServer() as jupyter_server:
    # connection info for created jupyter server pod
    connection_info = PodJupyetrConnectionInfo(
        host="https://jupyter-server/access/path",
        port="443",
        token=SecretStr("token-string")
    )
    async with PodJupyterCodeExecutor(connection_info) as executor:
        code_result = await executor.execute_code_blocks(
            code_blocks=[
                CodeBlock(language="python", code="print('Hello, World!')"),
            ],
            cancellation_token=CancellationToken(),
        )
        print(code_result)
  • Even without using PodJupyterServer, you can configure a custom Jupyter server that meets the required conditions and provide PodJupyterConnectionInfo for PodJupyterCodeExecutor to work with

Full Changelog: v0.5.2...autogen-kubernetes-v0.6.0

autogen-kubernetes-mcp-v0.6.0

Choose a tag to compare

@questcollector questcollector released this 28 Aug 10:02
b2e266f

What's Changed

Command-line Arguments

Command-line arguments are used when creating PodCommandLineCodeExecutor/PodJupyterCodeExecutor and MCP server.

type arguments: jupyter type creates PodJupyterCodeExecutor for python code executor tool.

MCP server have to run in same kubernetes cluster because PodJupyterCodeExecutor only uses service FQDN to connect jupyter server.

Not validated for non-text outputs yet.

flowchart LR
  subgraph K8sCluster["Kubernetes Cluster"]
    E[PodJupyterCodeExecutor]
    J[JupyterServerPod]
  end

  E --generate--> J

All the arguments are optional

Argument Description Default
type Code Executor type, commandline(stateless), jupyter(stateful) supported
--host MCP server host address 0.0.0.0
--port MCP server port 8000
--kubeconfig Path to the kubeconfig file None(auto-detected)
--image Pod container image name None
--pod-name Pod name (auto-generated)
--timeout Code execution timeout(seconds) 60
--workspace-path Path inside the container where scripts are stored /workspace
--namespace, -n Kubernetes namespace for Pod creation default
--volume Kubernetes volume to mount into the Pod/container, accepts YAML format string, YAML file path None
--pod-spec Custom Pod spec definition(YAML format string, YAML file path) None
--command Custom executor container command None
--args Custom executor container arguments None

example

commandline type

uvx autogen-kubernetes-mcp commandline --namespace my-namespace --image python:3.11-slim
python -m autogen_kubernetes_mcp commandline --namespace my-namespace --image python:3.11-slim

jupyter type

uvx autogen-kubernetes-mcp jupyter --namespace my-namespace --timeout 120
python -m autogen_kubernetes_mcp jupyter --namespace my-namespace --timeout 120

Full Changelog: v0.5.2...autogen-kubernetes-mcp-v0.6.0

v0.5.2

Choose a tag to compare

@questcollector questcollector released this 08 Aug 05:53
3752344

What's Changed

added autogen-kubernetes-mcp package

Full Changelog: v0.5.1...v0.5.2

v0.5.1

Choose a tag to compare

@questcollector questcollector released this 08 Jul 08:15
e910b41

What's Changed

Project

  • pyright: add pyright task
  • upgrade autogen version
  • pytest: add asyncio_default_fixture_loop_scope in ini_options

README

  • update guide for project setting

PodCommandLindCodeExecutor

  • Component serialization feature(new)
  • CancellationToken support(new)

Full Changelog: v0.4.0.dev10...v0.5.1

v0.4.0.dev10

v0.4.0.dev10 Pre-release
Pre-release

Choose a tag to compare

@questcollector questcollector released this 13 Dec 07:58
9be05f4

What's Changed

New Contributors

Full Changelog: https://github.com/questcollector/autogen-kubernetes/commits/v0.4.0.dev10