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

Uploaded CPython 3.13Windows x86-64

gllm_agents_binary-0.2.15-cp313-cp313-manylinux_2_31_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.15-cp313-cp313-macosx_13_0_x86_64.macosx_15_0_x86_64.whl (1.1 MB view details)

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

gllm_agents_binary-0.2.15-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl (980.3 kB view details)

Uploaded CPython 3.13macOS 13.0+ ARM64macOS 15.0+ ARM64

gllm_agents_binary-0.2.15-cp312-cp312-win_amd64.whl (927.6 kB view details)

Uploaded CPython 3.12Windows x86-64

gllm_agents_binary-0.2.15-cp312-cp312-manylinux_2_31_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.15-cp312-cp312-macosx_13_0_x86_64.macosx_15_0_x86_64.whl (1.1 MB view details)

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

gllm_agents_binary-0.2.15-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl (973.2 kB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64macOS 15.0+ ARM64

gllm_agents_binary-0.2.15-cp311-cp311-win_amd64.whl (947.4 kB view details)

Uploaded CPython 3.11Windows x86-64

gllm_agents_binary-0.2.15-cp311-cp311-manylinux_2_31_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.15-cp311-cp311-macosx_13_0_x86_64.macosx_15_0_x86_64.whl (1.1 MB view details)

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

gllm_agents_binary-0.2.15-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl (972.4 kB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64macOS 15.0+ ARM64

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.15-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 bebd8033e4d81f9804f1e0ebc8f0d7f3b56cde7f7902dacf76878aee5ed40eb4
MD5 b0d4b1745a5beb8e8d40cb096b836bc0
BLAKE2b-256 f019f4128b544c06ff727a5f0ba92cad2328f539aa22d7adbe65b4f5ca0cbd8d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.15-cp313-cp313-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 3954af4e3209466b0616bf3a05bc4d4e073de9a95fd7d475e2421f6e171bf8de
MD5 be88520d5195230916e2c7be23d31552
BLAKE2b-256 6a3af5c6ccf9c41ea905240baeaad0a0ad44f08e865e74a931ec442519361d13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.15-cp313-cp313-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 2b5cd05a60b7622e7f79af3902021c5ad42d48867c58133d98bf85a3ea43d56e
MD5 8ed220d7ea18223137ce1bc4ad4c7331
BLAKE2b-256 f627afffac129a445bb117a848932eba87291400b9b75faa012968953ba9cf09

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.15-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.15-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.15-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b7ce3d62d07f03107d6b30810d0e2b6ca8a32a77aa862da6a78a2efe4e046ee2
MD5 bad10db0757e4ca0d1f99fb4930dafb3
BLAKE2b-256 8f3b1d5b9d50fada6a6355d6c46f47a19dcad8744e104178215296c170576322

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.15-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 59bcd54f69dcda95582f49eba1c48503a23e90f4fdea82b83c5e578b8b3f989d
MD5 9c5eb83f1fc986521fe11f5eb7f963d0
BLAKE2b-256 37fcbb3512193955619255348811b0eb46bbcb810ffc8d51d4edb8b3cf32d90a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.15-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 0db5a9ca3beb5e7ad72671e84ad6c941788e6e129d7a9a38e554198a799e3273
MD5 0f3f6c0e46569a920ef6af7d4918c7cd
BLAKE2b-256 319e9a5e7c60822846bec7d4905a697a6a291cef341b374b1e3bf3748a0612e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.15-cp312-cp312-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 afb1d5a9fb1aadd7b5b2b20586b372e255b8c2aec187f84c07482a15797eada5
MD5 2faf9cb0430ebbed9ab4ee6b57f0ea56
BLAKE2b-256 e01e50642593386af2062bddcf6a08a52fea41668b8279e98c2033acab94a176

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.15-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.15-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.15-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 bd5499252d0009df7073e32bc986af67896305a9f568e5d01a24100e79e72ccf
MD5 c1d72857d46cfa75b30823edc418a56e
BLAKE2b-256 df79cbf640731b9be95c295c47e3122f1e518793d05587f90222a51e1deae2a6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.15-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 462264e30ddfc9d1663e674a9ee878e4fa73a718312ee5cbf70763e0f34f9abd
MD5 da6df4e2521733dbc2ac8195f00a28f2
BLAKE2b-256 02a0df7828188f58eee2559c02838a8981986d1f5a59ea3d714720d4d173928c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.15-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 c7aead24371b4b344bc40f6736574ed1fdf56b4e02e8935393c91289afe28043
MD5 87f44c9fe7ae32abd03a335660cd2981
BLAKE2b-256 c9366878f215818102d294e67157d0d9d5d6f9a8bba1ffb2909193cf9af2991d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.15-cp311-cp311-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 e50d936672f523d33fc1ab098510eb119b20868c38ee345fa397f2396691b840
MD5 c7555769b61139c79444a37aeba632df
BLAKE2b-256 381782a846ae6b8e16c3f957b62dadca2977c3d986a82bab02c52c7655969ad3

See more details on using hashes here.

Provenance

The following attestation bundles were made for gllm_agents_binary-0.2.15-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.15-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.15-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1f2583171d6fa32113b2b62656a589c7b9525b20c5436e93e8cde5929b3871e7
MD5 47f9d9c3003efade231bd4ad2c8709a7
BLAKE2b-256 1eb755dc800c9f1e8c197b9087a4ee4ac2a9ef261f23c352e7d88f564ee919b0

See more details on using hashes here.

Provenance

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