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.8-cp313-cp313-win_amd64.whl (637.3 kB view details)

Uploaded CPython 3.13Windows x86-64

gllm_agents_binary-0.2.8-cp313-cp313-manylinux_2_31_x86_64.whl (926.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.8-cp313-cp313-macosx_14_0_arm64.whl (679.1 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

gllm_agents_binary-0.2.8-cp313-cp313-macosx_13_0_x86_64.whl (755.3 kB view details)

Uploaded CPython 3.13macOS 13.0+ x86-64

gllm_agents_binary-0.2.8-cp312-cp312-win_amd64.whl (639.6 kB view details)

Uploaded CPython 3.12Windows x86-64

gllm_agents_binary-0.2.8-cp312-cp312-manylinux_2_31_x86_64.whl (927.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.8-cp312-cp312-macosx_14_0_arm64.whl (677.3 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

gllm_agents_binary-0.2.8-cp312-cp312-macosx_13_0_x86_64.whl (752.2 kB view details)

Uploaded CPython 3.12macOS 13.0+ x86-64

gllm_agents_binary-0.2.8-cp311-cp311-win_amd64.whl (649.4 kB view details)

Uploaded CPython 3.11Windows x86-64

gllm_agents_binary-0.2.8-cp311-cp311-manylinux_2_31_x86_64.whl (850.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.8-cp311-cp311-macosx_14_0_arm64.whl (676.7 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

gllm_agents_binary-0.2.8-cp311-cp311-macosx_13_0_x86_64.whl (757.6 kB view details)

Uploaded CPython 3.11macOS 13.0+ x86-64

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d8524d55edee30421fc37fd5f5c298ab348afd09df2ece63e72dc1083a6a14e8
MD5 1c3306b653a9017ba573d6a41ea419e3
BLAKE2b-256 256526b62c024c420e0da801a174f59cf4bc620c61c34087bbd7abc827deb267

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.8-cp313-cp313-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 8636b2cf6c8f1ff4e7ec2c4455216fa67ac58cd474c1ab54e80b8df84663332f
MD5 2c8cad7a99854c62a4dac9d2ea4240ef
BLAKE2b-256 2d5a28d78822ef4852502b9e2b2fa7701921d0110bf78c87970d671cebb40aae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.8-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 c4809aa02c87d148c815b396400576dc2f73abf7380e16aa861e17e14fae4bff
MD5 d1f8063dcf1891baed030c783d3dac46
BLAKE2b-256 0d7b620fb1d5ecc57be3805b84aaea08cebc1c8f344d4a04893991d3e58316b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.8-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.8-cp313-cp313-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.8-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 d5ab5ba48f4ee0ade5c7667b178ff1ed66c8bc1bbea6c72cc200ff7afc6b7297
MD5 bf94e4391034b5eaff838d261074c9a7
BLAKE2b-256 e9399dc68d8ef653b97efa6365a8897e9c136845877eaa2167bc4e46d092d7fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.8-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.8-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 653debf21fcf6907d57ed353ca78e65c04a8fce018a0ad6725a298459d7aa953
MD5 35d6b80b03cbfd4927ce32537d1fb05b
BLAKE2b-256 bb717d54cbefd9b8d898e0b5c334d1c0d103cf8847ab2d4d7a70fd04d58b1746

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.8-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 9183d22fff31ab387753ca28c7cd011292f4742646706550dd82427a97612dfa
MD5 652d2f4660a11e1f348323758346ab92
BLAKE2b-256 19cf0f0a045ce8e2e6d1e91e265ef08cdf9f653746e180f90d78d2617efbba8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.8-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 32847f28d8fe65de00bcc9130e124531d2d7f9106e136fd634910ca1bad29e96
MD5 aa4f06d3217892c9090669d96b31eddc
BLAKE2b-256 f0cd566f63bb11e0cb333880357eb7e03562e11fe9ddcbc60838a5c8d72764b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.8-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.8-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.8-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 1d267bb0dc7d660297c75e3db0ce1dd8726b254530b5650393dc40f5a5b323ed
MD5 125724b4ce11ea41b692ebbef0b77ef0
BLAKE2b-256 e9764581798238d5e1d746b4bb4351afebeb5ff4cd7587910cbedd504d8188bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.8-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.8-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 78784033133fd09436cfae538750435bbe2dc3d369686bcbb44bfc5aaac24a78
MD5 824f356756bdffc0cf211a479428e1b4
BLAKE2b-256 e6827e655ecb22a34ba3188de2accc3b69ead94ba5e7eb0e3a788929a4678a4a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.8-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 636c364e81cdd8df1b7f193f6e14d12596e13eaec3f9e1bd67d10b79485577a6
MD5 7c20b895acfc4d154684f8d7a21b7178
BLAKE2b-256 9bf53aaaa362f66a0d9037f2f2b19d8e7d779d11540b5f9b604863d725aa6ae1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.8-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 642c724f50ae9f187ab92d3dd66b84d593d8ce71e1d6e57a6f882161ee3ebd74
MD5 fc0667e478a314b537f4ffae73b5a957
BLAKE2b-256 096ba1f39eb0679fab5c61ec5093533bdae488f1bdc9b613ad090d398a612ea5

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.8-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.8-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.8-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 afb6d46d23899fefc5cfe276df3ef4f0dbea8572ead63b6ef755964abfc56b5a
MD5 bc8ae9009c627b8f5128805afabc4b7a
BLAKE2b-256 1c48c9acc76ed9f4ac036c580cd4e33d829aa8431c50e75b76e9c899abef8e28

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.8-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