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_a2a_multi_agent_coordinator_server.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.4.8-cp313-cp313-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.13Windows x86-64

gllm_agents_binary-0.4.8-cp313-cp313-manylinux_2_31_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.4.8-cp313-cp313-macosx_13_0_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.13macOS 13.0+ x86-64

gllm_agents_binary-0.4.8-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.13macOS 13.0+ ARM64macOS 15.0+ ARM64

gllm_agents_binary-0.4.8-cp312-cp312-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.12Windows x86-64

gllm_agents_binary-0.4.8-cp312-cp312-manylinux_2_31_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.4.8-cp312-cp312-macosx_13_0_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.12macOS 13.0+ x86-64

gllm_agents_binary-0.4.8-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64macOS 15.0+ ARM64

gllm_agents_binary-0.4.8-cp311-cp311-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.11Windows x86-64

gllm_agents_binary-0.4.8-cp311-cp311-manylinux_2_31_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.4.8-cp311-cp311-macosx_13_0_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.11macOS 13.0+ x86-64

gllm_agents_binary-0.4.8-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64macOS 15.0+ ARM64

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ad37c1e970c1ba0e1da017c1d305131463be45d6d51288481cb422e212ce7b37
MD5 c059d8af94338c6e9d301a834a060cc5
BLAKE2b-256 ad28630b3205c4f3fd2c3820f33257155595a58d7b19923ac958977a701abea8

See more details on using hashes here.

Provenance

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

Publisher: build-binary.yml on GDP-ADMIN/gl-sdk

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.4.8-cp313-cp313-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.8-cp313-cp313-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 8dd0e0d95778efed0ea586d93e4c981cbcb8f845c3eeabbd9ace2154dee6390f
MD5 1e51e47480357fc8ee1dac0c5a567d66
BLAKE2b-256 51c6e92dde7bcdaf88c99a7cca6b9c584ca51ce93ad340248a001c5579c9d7c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.8-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 64f201341d43653993e16c010c5a3d1ca5df70ec37cd7879a17a38fc78ac1235
MD5 091c6feb253863a08bff11611f43fdb6
BLAKE2b-256 2682fbcc723898e57c346af4ae92f45b559728281dfb35b059ff2712cd6ed6e9

See more details on using hashes here.

Provenance

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

Publisher: build-binary.yml on GDP-ADMIN/gl-sdk

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.4.8-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.8-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 0e3670692df57308ebad09e17de441ab54467698a26582a04e15b90baaa8418c
MD5 a4a0ee552eead42bebf4f319fcf9d0b0
BLAKE2b-256 453d8daaf392c0d28b4b677d80c8cb02bc7cc1cde1802c90bab32091ff28a729

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.4.8-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl:

Publisher: build-binary.yml on GDP-ADMIN/gl-sdk

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.4.8-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3f94fd39a4b97d4839d5a3da72fc0d5b3a5d861e7c6ed5f94cf14decc897c2f5
MD5 25dfea11628323b66c9eedf9d7c58ce6
BLAKE2b-256 62003ef996444eef6f43520f6302208cd68fe9d9ce6813fa64fa6e75f7e92ebf

See more details on using hashes here.

Provenance

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

Publisher: build-binary.yml on GDP-ADMIN/gl-sdk

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.4.8-cp312-cp312-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.8-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 d9f4d71ef11fe4227e299bd66f1081e00b21c9c32f0f59fe7c6e8d3cd81bf2fd
MD5 b1c16cf307156c7076e80f371282db18
BLAKE2b-256 ebc766786fe61339ab8e583c4a124d74f259a95e44bdb6028211aea39fa6ccb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.8-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 59ab931dab95f661a0efd05c255ccac659f8dd0d776a7ca6091b1ebdcb5f56b0
MD5 6f56e0512d6aa3a2e6411308b52d0aec
BLAKE2b-256 75cb4b1ff75f8aa9b7b2347745bc64b2fac9821858271f1c9119f412da344846

See more details on using hashes here.

Provenance

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

Publisher: build-binary.yml on GDP-ADMIN/gl-sdk

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.4.8-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.8-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 666bec5c6a395f38609c0fc5be95fe302e6fbcdd5beabcd8efc664b146f5009c
MD5 5f3d788306b19652b98b84d9a9c60a48
BLAKE2b-256 026efa014f75bb026c431c8c93d82fc45232f2b3322a53a199f97e0f14c3fd67

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.4.8-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl:

Publisher: build-binary.yml on GDP-ADMIN/gl-sdk

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.4.8-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 87c12f64d808036c431a3cb4edf7a10b01f94065e68fe0300a6f75503c845b83
MD5 410f240e85c130e76ac756f65bcab611
BLAKE2b-256 d2c6fbb68a284d94ee415732c01457fe2c00a2d1cd7be4fcdb0e57dc37be6ae4

See more details on using hashes here.

Provenance

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

Publisher: build-binary.yml on GDP-ADMIN/gl-sdk

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.4.8-cp311-cp311-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.8-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 cc333259ee3de73726715ae228fb6951f3081b46e014a7ed109f44af63458ab2
MD5 642eb7fa28de7e15055ab34a77054712
BLAKE2b-256 31035717acc835eeec7a2d175b710893ac5dbd1f3d3b115bed15a7b5ba0d7bc3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.8-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 30456ee1589898418daae0a71e132ac49459c1a579484a0e998bec2b52d633ba
MD5 3a8e260216bedfc1148cfeee03e54941
BLAKE2b-256 8d34131b8ef4d31db87f4cd3a303a4b94286453b47957f7e835330caa0446956

See more details on using hashes here.

Provenance

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

Publisher: build-binary.yml on GDP-ADMIN/gl-sdk

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.4.8-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.8-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e728d31eef652bebda25683fee2ac490d33f9aa2f85ef4d61f6a5ea8442bb269
MD5 648dccba2f32665fb5c2838c55fe895d
BLAKE2b-256 adff0872dde7dde4130e8c8202f7d6ee8fe859731971cff036ef035fd7a643b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.4.8-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl:

Publisher: build-binary.yml on GDP-ADMIN/gl-sdk

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