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

Uploaded CPython 3.13Windows x86-64

gllm_agents_binary-0.2.19-cp313-cp313-manylinux_2_31_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.19-cp313-cp313-macosx_13_0_x86_64.macosx_15_0_x86_64.whl (1.2 MB view details)

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

gllm_agents_binary-0.2.19-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.13macOS 13.0+ ARM64macOS 15.0+ ARM64

gllm_agents_binary-0.2.19-cp312-cp312-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.12Windows x86-64

gllm_agents_binary-0.2.19-cp312-cp312-manylinux_2_31_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.19-cp312-cp312-macosx_13_0_x86_64.macosx_15_0_x86_64.whl (1.2 MB view details)

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

gllm_agents_binary-0.2.19-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64macOS 15.0+ ARM64

gllm_agents_binary-0.2.19-cp311-cp311-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.11Windows x86-64

gllm_agents_binary-0.2.19-cp311-cp311-manylinux_2_31_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.19-cp311-cp311-macosx_13_0_x86_64.macosx_15_0_x86_64.whl (1.2 MB view details)

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

gllm_agents_binary-0.2.19-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64macOS 15.0+ ARM64

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.19-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ecab7281e40f4d0d7b0505684e57de7745ca6f24907169410299b59ade9ca7f3
MD5 5c5ece0365ce4228926dd6ac382208ae
BLAKE2b-256 f205d933487e0a1d6e91e3f2bf7fa4d73b64d3bc1979bfc5e569484dcc8c2d4e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.19-cp313-cp313-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 d76f6e0f594b47192d3472e36151b5f9c57516ce20650b84ff01c7849d2e3878
MD5 15c3500dd96a0fefa19918f17a5bce68
BLAKE2b-256 f9a3a4aa1afc10e1ce44bffc5f2f8bb7086bba9bfd92ff4bb7317f17517aeead

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.19-cp313-cp313-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 6246b44055d3b9e6c5969f988178c1031b504f91e6756e7b0176f5286b418e48
MD5 2132bbfd4e4b5cbd5ed8ed0b291243e6
BLAKE2b-256 76381ad769b81aa9683ff2a8ce7c4dcd5b1587195e4f05251b91f00beb6ed72b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.19-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7cff6a59abb7705d5750cdc502c915ef8dc74bd1f10c747dcbcd64607e203f18
MD5 cc4f12cd57b7f5711d4d2794dfa26b6d
BLAKE2b-256 447f1410153a394cec3fe07b7836cd22da0093157efabcc368fe89ddfcb2a35d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.19-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6a03d9e67c6609775dfa44b694e2f54530072b645773ca0ae3edf97d60fdfe35
MD5 000283567d45a7fa6c74ff4383472f9c
BLAKE2b-256 b3f22781e727097e3ac8190ccf1d6fadb67a05c767e576f4e36c12fc43edaaf4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.19-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 308a95d1c90c7a6813bc1769a644a5c4b455f69ed6a8f7bd34a2385d7bae0b79
MD5 4a65a97eb7e8529cdfdd6cc6075b809e
BLAKE2b-256 2539a7dc950a898d582c6fc43d8019d88f5bc47bea61fe2e2cd1c600176eabb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.19-cp312-cp312-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 c9a38a3b2f706b2307f6206114daee64c32a4d773b6c2faebf8c8a135beb5c43
MD5 dfa7e536f15d101d178ddd2445dba03e
BLAKE2b-256 1ddc6d4609239ae639c1a2f11b48c846bc0d62e95749cecaa844e173e37327f9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.19-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c50079ff3bad7bdf6064e3dd79003812cf3761f996555b273be5cc61391d8fac
MD5 3bea24034f23ac4460a1cde6423136cb
BLAKE2b-256 1a7bb8910bbb6fc1cf888171a72d8b0cf8430be0c82683e1020874cf2eb4d33a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.19-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d4d72863fc81f09f59f8cb5a60f400fc73ad689ff23eaa63b2fafb664491189b
MD5 0260e25e740c1214de76abce73a215bf
BLAKE2b-256 51a05a304b05e5a48a97ed23983a85053a1a0dba7d861a910f5978b68baff93a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.19-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 42b5e532042865e17402c413da2922974836c0e4393c62c560231269ab2980e6
MD5 6ee53a9cddeb904366f95a5ea9e6472b
BLAKE2b-256 b61968b1a85bff476cf12adf638c287c0100964d2a82644cc6780dab3fe2692d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.19-cp311-cp311-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 24a04d2db5afc71debc6de2289c58a8d3e122ccf7f83e047921af2ed016103cd
MD5 27ef5e0e80210df10de324c416cf0505
BLAKE2b-256 398f44b0d22bdc36f42ff653e7079a9edbaf959f739e224465abaa04acd06ba1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.19-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e5f5d4f096f7e8fd23833a6d70ae5364c9654908f14a1a3be258dbe3d88ed552
MD5 4a8ac0217e8cc0b901705c5b97ee292b
BLAKE2b-256 02975de376e0778939d3766aa735f7cf23b8f92c8cf7884152c483a620e3cd6e

See more details on using hashes here.

Provenance

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