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 with BOSA Connector (OpenAI):

python gllm_agents/examples/hello_world_langgraph_bosa_twitter.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

LangChain (OpenAI):

python gllm_agents/examples/hello_world_langchain.py

LangChain Streaming (OpenAI):

python gllm_agents/examples/hello_world_langchain_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

LangChain SSE Transport (OpenAI):

python gllm_agents/examples/hello_world_langchain_mcp_sse.py

LangChain Streaming SSE Transport (OpenAI):

python gllm_agents/examples/hello_world_langchain_mcp_sse_stream.py

LangChain STDIO Transport (OpenAI):

python gllm_agents/examples/hello_world_langchain_mcp_stdio.py

LangChain Streaming STDIO Transport (OpenAI):

python gllm_agents/examples/hello_world_langchain_mcp_stdio_stream.py

3. Running Individual A2A 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 gllm_agents/examples directory to run the A2A server.

LangChain Server:

python hello_world_a2a_langchain_server.py
  • Open a new terminal and navigate to the gllm_agents/examples directory to run the A2A client.

LangChain Client:

python hello_world_a2a_langchain_client.py

LangChain Client Integrated with Agent Workflow:

python hello_world_a2a_langchain_client_agent.py

LangChain Client Streaming:

python hello_world_a2a_langchain_client_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.24-cp313-cp313-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.13Windows x86-64

gllm_agents_binary-0.2.24-cp313-cp313-manylinux_2_31_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.24-cp313-cp313-macosx_13_0_x86_64.macosx_15_0_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 13.0+ x86-64macOS 15.0+ x86-64

gllm_agents_binary-0.2.24-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.13macOS 13.0+ ARM64macOS 15.0+ ARM64

gllm_agents_binary-0.2.24-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12Windows x86-64

gllm_agents_binary-0.2.24-cp312-cp312-manylinux_2_31_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.24-cp312-cp312-macosx_13_0_x86_64.macosx_15_0_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 13.0+ x86-64macOS 15.0+ x86-64

gllm_agents_binary-0.2.24-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64macOS 15.0+ ARM64

gllm_agents_binary-0.2.24-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11Windows x86-64

gllm_agents_binary-0.2.24-cp311-cp311-manylinux_2_31_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.24-cp311-cp311-macosx_13_0_x86_64.macosx_15_0_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 13.0+ x86-64macOS 15.0+ x86-64

gllm_agents_binary-0.2.24-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64macOS 15.0+ ARM64

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.24-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1640cb216cdd9dddc6d8ec0745efba567157c8931ded24221128f4fdf3717cc8
MD5 a53c08ab0a9372b393cebdc02a47e344
BLAKE2b-256 01a60bc387db06dd73c8b890f3447bf1298f0403609dc41f41ac5105d8b7f61a

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.24-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.24-cp313-cp313-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.24-cp313-cp313-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 794516a3fdf2d348cb6b8e10647f55e51594f1956b0a2f5f4bb766ad505bc44b
MD5 756822434144f0d02766f6655d5509e6
BLAKE2b-256 fac8869ebbab6eb32d5a679aa7e39450e491d3ab0db98bf705cf13bf282368c5

See more details on using hashes here.

File details

Details for the file gllm_agents_binary-0.2.24-cp313-cp313-macosx_13_0_x86_64.macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.24-cp313-cp313-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 a74da6858df01655ba5ed8cddfb00b078991cb9c79010a5fe0aa774a13d9dd2f
MD5 951b64737cb05eed10d973e40e9affdb
BLAKE2b-256 42a369895417a7a0ba94b398f5f580a9134cd71af79e26c76a2c5a34e5ff2c38

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.24-cp313-cp313-macosx_13_0_x86_64.macosx_15_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.24-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.24-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 85ee9dba494cb37f257277bb738a2008a6f36667f2028fc3942c071f19cf7b67
MD5 8a272d10df2f45df756fbfa5563cc424
BLAKE2b-256 fbcf3e1a7ab89b9ad99799141501fac498d4c5ed16c06efb10b1d5a13416d60a

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.24-cp313-cp313-macosx_13_0_arm64.macosx_15_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.24-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.24-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8cfa8be92f91d5ccb0e3813cc5376517b83d503e1bdcd9d514b13e535b554cb0
MD5 2a13b8b1352e0fcf3ddadfc148e0b90b
BLAKE2b-256 cf16d2b00bdc606511028b07c461af9d97a39d86506616db52e7fb2bdb40b243

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.24-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.24-cp312-cp312-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.24-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 16ea4a233dcec024cd483a63eabf7a40ac3be71ae4b6358eb41db3c4ca1affb5
MD5 7a74a79036478e025bd50371da602f3c
BLAKE2b-256 7143043f12ec375712e86d5b2f9c75fc51d7734dd58f6ff34b83bedbbe17c705

See more details on using hashes here.

File details

Details for the file gllm_agents_binary-0.2.24-cp312-cp312-macosx_13_0_x86_64.macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.24-cp312-cp312-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 3c885dc5b94208714dc522eb2bf87d087494e3ff86b5c5c4c4a5100f76b69620
MD5 82ef7b040b5d23db728fb6681c707621
BLAKE2b-256 b2271d92cd87f125bd27ce66548cbc081e80dd5727d9ba8aae3de0a15a0af071

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.24-cp312-cp312-macosx_13_0_x86_64.macosx_15_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.24-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.24-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 842eba4ac403058ebea14f11bf7cc3f8f025b6666c01173bffff260cb86f32df
MD5 975fba53f83127420920c4e6e960f3ac
BLAKE2b-256 d97d618afba49bdd0da896b3eff95e87a1b6e4480718c4eeb11b6c35efbd1b96

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.24-cp312-cp312-macosx_13_0_arm64.macosx_15_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.24-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.24-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 59064888263c6f9c58d61f0b9f13de8fa71605fe1b837efa2e0c09312cd1026b
MD5 d5ea1eea1c842e1c9882a2e7fcd5e02f
BLAKE2b-256 cdd90f5192d2c5e37fbb5c62b5647c6815c7cf6ad7cf5e59361f2120e83abf8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.24-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.24-cp311-cp311-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.24-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 bdc7cedb421211d0089db6084f1c019792e6b1c074f32e1a406537aae741bdb0
MD5 2f88798176e7a16eef641d6528535870
BLAKE2b-256 fc51d1879200aab05747779713e99faa8f882318247621b5579f191e7169b0df

See more details on using hashes here.

File details

Details for the file gllm_agents_binary-0.2.24-cp311-cp311-macosx_13_0_x86_64.macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.24-cp311-cp311-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 c74da63827c496de04ace026917ecf7ee7f2c34144cfdf6410a227f1bfa842f8
MD5 947ef54e488f1ed79f30ca6537baec87
BLAKE2b-256 becfeccd14b763e7f10c94159b9b8b040ba9a275434dda50378a262526847f85

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.24-cp311-cp311-macosx_13_0_x86_64.macosx_15_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.24-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.24-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 325a8d730d5f03b5de95088d71c4f4ae3db03bd3e0269d72d50e32ae75d94255
MD5 aa47c07f314ac1b741ab248f55fbf710
BLAKE2b-256 289b5f815112b08a0f21e9aeb6cb6d3fd10e5e2b6d633e87c8bd9d86faa77bcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.24-cp311-cp311-macosx_13_0_arm64.macosx_15_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.

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