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.3.5-cp313-cp313-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.13Windows x86-64

gllm_agents_binary-0.3.5-cp313-cp313-manylinux_2_31_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.3.5-cp313-cp313-macosx_13_0_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.13macOS 13.0+ x86-64

gllm_agents_binary-0.3.5-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.13macOS 13.0+ ARM64macOS 15.0+ ARM64

gllm_agents_binary-0.3.5-cp312-cp312-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.12Windows x86-64

gllm_agents_binary-0.3.5-cp312-cp312-manylinux_2_31_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.3.5-cp312-cp312-macosx_13_0_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.12macOS 13.0+ x86-64

gllm_agents_binary-0.3.5-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64macOS 15.0+ ARM64

gllm_agents_binary-0.3.5-cp311-cp311-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.11Windows x86-64

gllm_agents_binary-0.3.5-cp311-cp311-manylinux_2_31_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.3.5-cp311-cp311-macosx_13_0_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11macOS 13.0+ x86-64

gllm_agents_binary-0.3.5-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64macOS 15.0+ ARM64

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.3.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0d4abcd34e9e9aa013292b569d5ba82ddfc4bab1dd7ec492eb1407dcb863321a
MD5 b162ed218ff3ab1e88a2c38370c58863
BLAKE2b-256 7bcbafff6423204fe9bf4f72dd8ecbfde4aa64c083e849d064b49eeeccb73e25

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.3.5-cp313-cp313-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 da24be4f678b046bf8efb1e4351651da9ae3468fa8f1146a258752532db3d677
MD5 945fb9aa0a53e788585c17dc881c6f2d
BLAKE2b-256 c459feb7175f95b6d27b307403adb64b379bf7201fc03948e66bb010b4b0fe8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.3.5-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 c17852c1e26c1eb0f41d10b3a913a8a792339d00db1dd1f0b99d4f9e80dfeb6e
MD5 18e13aaf68231c75da2221510c80dd02
BLAKE2b-256 c84e0866b7cd49760ff2f77a6dde949de447bc2fd0e3344ce4c5f59cb0aa570d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.3.5-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4d091b0982f37f74bb9947a069c0bd0c7397d09bca5bc68e3157440010bc8d28
MD5 df003aa7d80b5041a30e7c2b10e8ca55
BLAKE2b-256 8205ac838c58e1098113c5d9f5f3ace950782e68eb5f759d2913b3f17a4814d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.3.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c34ce86915899746e86b7828ca7a5628d2e7162464bf20131639feba89aafc55
MD5 f8b7282b6c19a6280aa14e8cff5008d2
BLAKE2b-256 516234a2a6d83bab76ba8c6afac9d65bc72fb243a679a749f593463422381736

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.3.5-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 00fa48bdc773c4183f309a36c52c148a37e1b1c7da7e594b7a63dead9ae2b1fa
MD5 ed7ec384b1b0be16fc1ddca57454189c
BLAKE2b-256 fd3a38f987522176b4e75555f92e166a002c113ea6d791312ceb9222c2f9ee93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.3.5-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 be29e6c6896ee99c4610d943e33fb4e5b3a5c9ea05217217bb296f007070d281
MD5 63e43d086009badaf435be15023ecb85
BLAKE2b-256 982023322383a992cabd28e938f0ab79813cfd21dd8aa434008292e25ac6c5c2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.3.5-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b9a3186478da8362f1e88be778f9f891433305647c4a64e103abcfdc8ccfe7b3
MD5 f47ad6c08aefad518b8ee1fcd954b783
BLAKE2b-256 a98643fac0f2c22c90813bab9fdf9df6b9e12dc9c263dff788648a5c97c95c79

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.3.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7e2e52e0dccd25123028d348b9fcb4864984411d308a8529b8e357485691475c
MD5 de073eb006acada16e46f0cd49ab03c7
BLAKE2b-256 8d6619c0c9f8c8516496c5a9f0ae88bc7a165bc2fa8deaae0290baea8808cf30

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.3.5-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 dad4faf24c85b499359923c7a4a8bff2bbfa6d0620f87c752a3babf1af935246
MD5 ac7a07932d74e93cb71f00b40873e36c
BLAKE2b-256 b60560f60aec5db6a8e4ee6e94ea34a20ac504ab4ef13ee57145174a99c6d2a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.3.5-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 6b1fd57c39cd7d36c3ce83956f78e41955d5dacba349a4feed9ad1a9c66cb340
MD5 8b1cfd6a27fe7793832fd65c310981cc
BLAKE2b-256 b253695b1fb59acc7ba258e312eb3f9e1a6c9d51c35b4ffa52fbf2b9c5450e4d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.3.5-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 9b48a67262c990e81ddf39e186bfd668b11bb23f5b58ba74b3d551fd06b0f933
MD5 6bfab710b6e2148d5855fcfd94be1c9c
BLAKE2b-256 faa427c167e9b85bdd42dd0f4c41dd3ac9498d3755fac5f20167e961429818d4

See more details on using hashes here.

Provenance

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