Skip to main content

A library for managing agents in Gen AI applications.

Project description

GLLM Agents

Description

A library for managing agents in Generative AI applications.

Installation

Prerequisites

1. Installation from Artifact Registry

Choose one of the following methods to install the package:

Using pip

pip install gllm-agents-binary

Using Poetry

poetry add gllm-agents-binary

2. Development Installation (Git)

For development purposes, you can install directly from the Git repository:

poetry add "git+ssh://git@github.com/GDP-ADMIN/gen-ai-internal.git#subdirectory=libs/gllm-agents"

Managing Dependencies

  1. Go to root folder of gllm-agents module, e.g. cd libs/gllm-agents.
  2. Run poetry shell to create a virtual environment.
  3. Run poetry lock to create a lock file if you haven't done it yet.
  4. Run poetry install to install the gllm-agents requirements for the first time.
  5. Run poetry update if you update any dependency module version at pyproject.toml.

Contributing

Please refer to this Python Style Guide to get information about code style, documentation standard, and SCA that you need to use when contributing to this project

  1. Activate pre-commit hooks using pre-commit install
  2. Run poetry shell to create a virtual environment.
  3. Run poetry lock to create a lock file if you haven't done it yet.
  4. Run poetry install to install the gllm-agents requirements for the first time.
  5. Run which python to get the path to be referenced at Visual Studio Code interpreter path (Ctrl+Shift+P or Cmd+Shift+P)
  6. Try running the unit test to see if it's working:
poetry run pytest -s tests/unit_tests/

Hello World Examples

Prerequisites

  • Python 3.13+
  • Install the binary package:
pip install gllm-agents-binary
  • For OpenAI: Set your API key in the environment:
export OPENAI_API_KEY=your-openai-key
  • For Google ADK: Set your API key in the environment:
export GOOGLE_API_KEY=your-google-api-key

Run the Hello World Examples

The example scripts are located in the gllm_agents/examples directory within the library. You can run them individually or use the run_all_examples.py script.

1. Running Individual Examples:

Navigate to the library's root directory (e.g., libs/gllm-agents if you cloned the repository).

LangGraph (OpenAI):

python gllm_agents/examples/hello_world_langgraph.py

LangGraph Streaming (OpenAI):

python gllm_agents/examples/hello_world_langgraph_stream.py

LangGraph Multi-Agent Coordinator (OpenAI):

python gllm_agents/examples/hello_world_multi_agent_coordinator.py

Google ADK:

python gllm_agents/examples/hello_world_google_adk.py

Google ADK Streaming:

python gllm_agents/examples/hello_world_google_adk_stream.py

2. Running Individual MCP Examples:

  • Navigate to the library's root directory (e.g., libs/gllm-agents if you cloned the repository).

  • Open a new terminal and navigate to the sample MCP servers directory libs/gllm-agents/gllm_agents/examples/mcp_servers

    Turn on the SSE MCP servers:

    python mcp_server_sse.py
    
  • Open a new terminal and navigate to the sample MCP servers directory libs/gllm-agents/gllm_agents/examples/mcp_servers

    Turn on the STDIO MCP servers:

    python mcp_server_stdio.py
    

LangGraph SSE Transport (OpenAI):

python gllm_agents/examples/hello_world_langgraph_mcp_sse.py

LangGraph Streaming SSE Transport (OpenAI):

python gllm_agents/examples/hello_world_langgraph_mcp_sse_stream.py

LangGraph STDIO Transport (OpenAI):

python gllm_agents/examples/hello_world_langgraph_mcp_stdio.py

LangGraph Streaming STDIO Transport (OpenAI):

python gllm_agents/examples/hello_world_langgraph_mcp_stdio_stream.py

Google ADK SSE Transport:

python gllm_agents/examples/hello_world_google_adk_mcp_sse.py

Google ADK Streaming SSE Transport:

python gllm_agents/examples/hello_world_google_adk_mcp_sse_stream.py

Google ADK STDIO Transport:

python gllm_agents/examples/hello_world_google_adk_mcp_stdio.py

Google ADK Streaming STDIO Transport:

python gllm_agents/examples/hello_world_google_adk_mcp_stdio_stream.py

Architectural Notes

Agent Interface (AgentInterface)

The gllm_agents.agent.interface.AgentInterface class defines a standardized contract for all agent implementations within the GLLM Agents ecosystem. It ensures that different agent types (e.g., LangGraph-based, Google ADK-based) expose a consistent set of methods for core operations.

Key methods defined by AgentInterface typically include:

  • arun(): For asynchronous execution of the agent that returns a final consolidated response.
  • arun_stream(): For asynchronous execution that streams back partial responses or events from the agent.

By adhering to this interface, users can interact with various agents in a uniform way, making it easier to switch between or combine different agent technologies.

Inversion of Control (IoC) / Dependency Injection (DI)

The agent implementations (e.g., LangGraphAgent, GoogleADKAgent) utilize Dependency Injection. For instance, LangGraphAgent accepts an agent_executor (like one created by LangGraph's create_react_agent) in its constructor. Similarly, GoogleADKAgent accepts a native adk_native_agent. This allows the core execution logic to be provided externally, promoting flexibility and decoupling the agent wrapper from the specific instantiation details of its underlying engine.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gllm_agents_binary-0.2.10-cp313-cp313-win_amd64.whl (707.7 kB view details)

Uploaded CPython 3.13Windows x86-64

gllm_agents_binary-0.2.10-cp313-cp313-manylinux_2_31_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.10-cp313-cp313-macosx_14_0_arm64.whl (770.7 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

gllm_agents_binary-0.2.10-cp313-cp313-macosx_13_0_x86_64.whl (858.7 kB view details)

Uploaded CPython 3.13macOS 13.0+ x86-64

gllm_agents_binary-0.2.10-cp312-cp312-win_amd64.whl (712.2 kB view details)

Uploaded CPython 3.12Windows x86-64

gllm_agents_binary-0.2.10-cp312-cp312-manylinux_2_31_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.10-cp312-cp312-macosx_14_0_arm64.whl (765.9 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

gllm_agents_binary-0.2.10-cp312-cp312-macosx_13_0_x86_64.whl (852.5 kB view details)

Uploaded CPython 3.12macOS 13.0+ x86-64

gllm_agents_binary-0.2.10-cp311-cp311-win_amd64.whl (723.4 kB view details)

Uploaded CPython 3.11Windows x86-64

gllm_agents_binary-0.2.10-cp311-cp311-manylinux_2_31_x86_64.whl (949.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.10-cp311-cp311-macosx_14_0_arm64.whl (766.5 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

gllm_agents_binary-0.2.10-cp311-cp311-macosx_13_0_x86_64.whl (863.2 kB view details)

Uploaded CPython 3.11macOS 13.0+ x86-64

File details

Details for the file gllm_agents_binary-0.2.10-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.10-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f014abfc79d8f1b739e77c78c49b001e7f482c62ac501e6283097df66c8b9357
MD5 7594cc7f1fe4c38eb85332b0a44020e9
BLAKE2b-256 805d2466483802bb14b8035510124e9f5ce724c672d478d527be9be49450d844

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.10-cp313-cp313-win_amd64.whl:

Publisher: build-binary.yml on GDP-ADMIN/gen-ai-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gllm_agents_binary-0.2.10-cp313-cp313-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.10-cp313-cp313-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 9f49de26218a93b67a9cf7676697e03a48bd731466a968a0334f0626bae4626b
MD5 d8aac93b6f3d9917bf48b75214594bdf
BLAKE2b-256 d98dbacfd51dd8834d9f66581f12cdd3f572043b3393a0eeb1de07662e1733c9

See more details on using hashes here.

File details

Details for the file gllm_agents_binary-0.2.10-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.10-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 e88b2d111cb69e109f6918f940873b9eb472ce8f5737bb8ccbc1f57e25d1ad44
MD5 872f69dc319e702ddd0e3117fb220178
BLAKE2b-256 3900371529f708a57b839935d2055b52690b4e5663760b15047165d371feb352

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.10-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: build-binary.yml on GDP-ADMIN/gen-ai-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gllm_agents_binary-0.2.10-cp313-cp313-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.10-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 7c7c43fe0b721f1448267a5357ee2d1db1af81eac5a30a9bc2c06417120772b1
MD5 5dc5902f25302a338675d11122f7c8ac
BLAKE2b-256 033fa1bc7b82fc45d26867248efb5fbfc931ca7b07dfa2f69e57c198de48cecb

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.10-cp313-cp313-macosx_13_0_x86_64.whl:

Publisher: build-binary.yml on GDP-ADMIN/gen-ai-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gllm_agents_binary-0.2.10-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.10-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7ce31e7c6872dd12c8cf8cce4d4ec7c9026068fecb62ec829fa17cea090fdcfa
MD5 156f7111af0f44e5b1493039c473b53d
BLAKE2b-256 f3d2fa765fbde010971b36e593b0f8da4b2d8ea04b752eeec2848d67dd1be51e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.10-cp312-cp312-win_amd64.whl:

Publisher: build-binary.yml on GDP-ADMIN/gen-ai-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gllm_agents_binary-0.2.10-cp312-cp312-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.10-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 20c0ca3d6b7969da3a390e5b5267ee3bac9e557037fafc1244455b3f85ac60ab
MD5 223793325f2e73eaf6efbd0a03dac9b8
BLAKE2b-256 02b059393a3eabf7ff1ca09a8647e3699d057402469161413387f46a204c404f

See more details on using hashes here.

File details

Details for the file gllm_agents_binary-0.2.10-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.10-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d14a56e3c0b1760a99d23c7e61808cf6d4a06450d98e29f1bf725a7499911a18
MD5 4aeb026f31554168c0d5d9c7a8430b26
BLAKE2b-256 051ccdff808cc24961ebae9cd40ca48fc3b3922ae52ede3b1e0576962468c4b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.10-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: build-binary.yml on GDP-ADMIN/gen-ai-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gllm_agents_binary-0.2.10-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.10-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 e0b5f56cefe0e43806bef82d8e49a2e61347443125fbfd72cd249573af46cb9a
MD5 28ec3b25e89d90e9797bdab5e8dc9585
BLAKE2b-256 62acc0c4e81783bdcdfbd1a1b88ddc280f8f9023279626fa817de60c179fc9f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.10-cp312-cp312-macosx_13_0_x86_64.whl:

Publisher: build-binary.yml on GDP-ADMIN/gen-ai-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gllm_agents_binary-0.2.10-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f9eef3b50e85e5ae8abc81a28905d254cd2cc7f548e2633c4128025662f2be0b
MD5 74fe5756aee33b008accb5f9e477ec45
BLAKE2b-256 cd1414c72db96a712ef7d9fd845d42353d27e8edfab5daae59c9040389343293

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.10-cp311-cp311-win_amd64.whl:

Publisher: build-binary.yml on GDP-ADMIN/gen-ai-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gllm_agents_binary-0.2.10-cp311-cp311-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.10-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 4708bd5844b272a49e73917cb16b2fed4db14ee07c01bb6f9b1e529d21faa28e
MD5 87fbbcdf9d43aaf130b4cd66e303865b
BLAKE2b-256 13ec3556fd06b0c214dc396b7ae77c3080f749e66bb8e39d18f5d6f6ada31512

See more details on using hashes here.

File details

Details for the file gllm_agents_binary-0.2.10-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.10-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a2105c906bb6a52fd32f966a62c956f70af96b7e79b2e8c1cddaa2d64b640387
MD5 bd0a452c46d9be86c8f16465cf131dd7
BLAKE2b-256 de89876f19a63a9ae4f00542f5816efbef2d08e7f74c564324a49c37f7facdf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.10-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: build-binary.yml on GDP-ADMIN/gen-ai-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gllm_agents_binary-0.2.10-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.10-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 502a8c0bab53d894a0d2c9454649f576e2609c6c11633c18a2d9d4b6e45fc901
MD5 72a750017b7f3d9250abfca06818b13b
BLAKE2b-256 11cbad2279d1cd105c4ec1e5fec77cef50ff2ee00563698ab52e0f9fb52ecb84

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.10-cp311-cp311-macosx_13_0_x86_64.whl:

Publisher: build-binary.yml on GDP-ADMIN/gen-ai-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page