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

Uploaded CPython 3.13Windows x86-64

gllm_agents_binary-0.4.7-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.7-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.7-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.7-cp312-cp312-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.12Windows x86-64

gllm_agents_binary-0.4.7-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.7-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.7-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.7-cp311-cp311-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.11Windows x86-64

gllm_agents_binary-0.4.7-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.7-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.7-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.7-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8a33a1390b6476d952513f09cbd7dcee138ba84453f00de1de495eb3a154e64f
MD5 fd29896754567602ae81e392514b4ef5
BLAKE2b-256 6143f90c895f0f783cf39f339687dba2974bd7beb1153b4ef1a7d1145c672b13

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.7-cp313-cp313-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 d8cadca0fe7bf85ceb89bbbcc625e7fc2a2ef8e771145762d484b10cb8b3120d
MD5 a2e3a948fe744b5aa15e1af500e9c450
BLAKE2b-256 c84f961dbb470de0f9d0dab48f315da0b7ace6dc17a6318220330841b8fbda82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.7-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 f4989c986386ea278b58a0c2db8ed59865c2b0428c2885c21370d02b1107a7b4
MD5 12d109fdacae9174b0dad08af230cd46
BLAKE2b-256 88cf2fb9360d4ed06d190d2119d9eb4b5d87688ee78dff87af3ea9fc403afb40

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.7-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 5468cd5570e4919f81cd7ccb0773adcd5e15372748cd3f44df75faa60c7e15d3
MD5 a9497f189fc92a0ef71800fa5935118e
BLAKE2b-256 751a9a04f4c67a41e57750e49b5c7dc4149896090bca231847b971ab1c9a0383

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bfc668c2a247b93a3e45fc1d3f1969b324cdbdd2564b63f850b14c84a8525d77
MD5 a4196d3d1f031375607d7129db40628b
BLAKE2b-256 9491c2dff88d74361d73c39620ce8d54ddb4ca5776bddbb5bb886b1c9a8aae98

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.7-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 d87f1cb45fe06889e97306c9b4607daaa1169947e45cdcbacd624e53df2f2986
MD5 d0041f8ed66242656a3513501a90b3a3
BLAKE2b-256 230da37cef7da658d208ae48d13399c1242c727a3dce5740c60553de84eebc7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.7-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 4ac7c6a1b756800975ebb63a4cfb2ab328c3842d36f9399023d3e30456c8751b
MD5 b8d127a83483cc35bc0a4e8f96ed984f
BLAKE2b-256 b3f9332228f1fb6a7023e810d2ce71c66b2304526b1ae96e314df213c017c41f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.7-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1a34f6dd7469f538c01380987aafda41e7ab326ae3eab70dc1696bdc5ddfaa66
MD5 7b51c2f37249cfab0d636e9efa86b1b8
BLAKE2b-256 74cf6250bd2c2426237ca14f9bc85cd9e19ca52918effc19e7f339c1c5bdef84

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 62bc969991e6e3335aa2d06300b2cd9ddacad4a3b64d11fe3ee5bf06edf95dbd
MD5 74f78857b86b0a69c987716be7554bed
BLAKE2b-256 c3944eb5c5bec24520330267d72dc4655a49f637ba911f5973ab1928fd3a6f88

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.7-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 e911f9cfa09c3cece3257e001a992f70be7ce581ac3eb3e2a211ee7f7fe2a6d1
MD5 0c4fdc8564ee126e23031dc53385947d
BLAKE2b-256 16638bb86d51f5e00f5582213fd4e94f07563d1fc46a7acdba82cc288720fe53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.7-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 92ae5856b08be39f6437fb27dc5711e20cfd6877e7b4f4e0cb5288f5dfc7a0c2
MD5 fa4ded10866b8855015e4fc7b5f8f073
BLAKE2b-256 3ee7ff5dff227a2c1a0169a06a240803f1cbcfb97500195e050387eb140c0d01

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.4.7-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 df7805bb86f56c3c874ce09dce5678235658d3c1026b2d11f813929e57dfb8f3
MD5 77b9f3d5e20ac0a5e8ff68015342123e
BLAKE2b-256 0480e4c857ea266b8013b7e442fb7c8398112e8136371ad87bb7e6b055fd3606

See more details on using hashes here.

Provenance

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