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.9b1-cp313-cp313-win_amd64.whl (707.8 kB view details)

Uploaded CPython 3.13Windows x86-64

gllm_agents_binary-0.2.9b1-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.9b1-cp313-cp313-macosx_14_0_arm64.whl (770.7 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

gllm_agents_binary-0.2.9b1-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.9b1-cp312-cp312-win_amd64.whl (712.2 kB view details)

Uploaded CPython 3.12Windows x86-64

gllm_agents_binary-0.2.9b1-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.9b1-cp312-cp312-macosx_14_0_arm64.whl (765.9 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

gllm_agents_binary-0.2.9b1-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.9b1-cp311-cp311-win_amd64.whl (723.4 kB view details)

Uploaded CPython 3.11Windows x86-64

gllm_agents_binary-0.2.9b1-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.9b1-cp311-cp311-macosx_14_0_arm64.whl (766.5 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

gllm_agents_binary-0.2.9b1-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.9b1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.9b1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 83a8d8183e083f54d5e44c01362225c8658b8d411c4cf6c26f2a7c7643848d0c
MD5 92be88fffd54f712f73240b5fe69ea05
BLAKE2b-256 58020a65d736b898670fd06557294d0f1aaa2f9c6962723df8d5052dcf366add

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.9b1-cp313-cp313-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 48e5e584c7d5d122fa3ad30e339bb7280d315f32f3711115aaec5380a229ab36
MD5 f8025bed737f518e9878daf592d02005
BLAKE2b-256 fa99aa1b6d0b1bbe23f7bf52cbcc6d435c63cbf58da5d80886b5d51d57bd203d

See more details on using hashes here.

File details

Details for the file gllm_agents_binary-0.2.9b1-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.9b1-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ab77e54ba4b8e21f784bf940df806a8fc7122ed817ff5c3b9f0ebbc4ce77bcc4
MD5 d3d3367739539ee4e0dea7a6cba3763c
BLAKE2b-256 45513033b0b180b92bf6460349e1dc884fa6aa5e235e3dc850f0fe729541dd42

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.9b1-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 a4e3e80c7eacfb0091c3b9d7fba9404939fb02a79925431a944a21ac8b54ddf9
MD5 516e93db6eaf3690bd73f5a433fb2355
BLAKE2b-256 f4258e54a6615d7e5a016ffd0379b38924b46dbd6865a1df75820a5e0f8fd06f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.9b1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a3ddef2875eb8aa69c11a82077b6cda5952978ba824cfcace923fd585ee4fe14
MD5 e142e30c061b8fea2baa293d20b7df44
BLAKE2b-256 4b509c44c7312419e2a7e1a833f48092d9f4a200e386cfc2070e79bd3b1589af

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.9b1-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 0a2e03ee3610b9541e3ac30b94730a485c84ef772c0dfabbcb5150118c465b17
MD5 77d72540a2749f43507cd1707750ceca
BLAKE2b-256 5be1d2efbca3f118b495765ed56c83892e82d06f0a2d4f93ca3fb83531eb4834

See more details on using hashes here.

File details

Details for the file gllm_agents_binary-0.2.9b1-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.9b1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 65fab160e3aae02c0e3c6d59665e29c4529fed8524a99e2deef494be56116ec1
MD5 1c5487720bd540c18b116afd23dd36df
BLAKE2b-256 4fcfa314aff7841d1cd2c08b224c4af15bd860be20074d1b32bd757b63cc4cdd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.9b1-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 3a8872a535f02447b46dd3797ede43beccbf314dc36671215e911f70b7dfcf6b
MD5 af21d35d25137dbd348f444f7bec5b64
BLAKE2b-256 4a109d4590eebe28e622f80a71434fb940538b0e55a17b4e36150911a9fdba8c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.9b1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f74a3ba5b79073feb2606fb885a6df4ea746e0e7d4258733e6dd6e799e6e85b9
MD5 9af7332a15ddcc182531337a34f06e53
BLAKE2b-256 8860398011588028c58cfd7e5d2a23f5e74f00935ff24496ff7f8c69f6975d38

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.9b1-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 3c72574df6b559e023fc458852b37b069fda01829e0056c59cef1736acb5663d
MD5 e74bb3e77bd458973714b560ff4d8495
BLAKE2b-256 30d5d1a9503d56bfd256affdca35237c0122775bee2f235a801222035e4a20b0

See more details on using hashes here.

File details

Details for the file gllm_agents_binary-0.2.9b1-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.9b1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ccd30ea8d10278d731a3a5fb6fcb6f8e30766414c6d1e42d9a343f85b8480a7d
MD5 688ebdd74c849583d11da3f55920fd1b
BLAKE2b-256 9facf68d392a5f4c55e22cbe0f61c57c116e2bbfff37bd36e6640be8c6a26bed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.9b1-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 18a00443398f1427f50e434400ede106a6e9495f2f8340c3c6e928b11a8d136f
MD5 2637f04270fa7965c5afe004df7899e1
BLAKE2b-256 a1f1128bf1d5868b092e4a56a5d70dbdfe03539f2a7f3c8ca950b3675ea7b6c7

See more details on using hashes here.

Provenance

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