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

Uploaded CPython 3.13Windows x86-64

gllm_agents_binary-0.2.20-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.20-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.20-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.20-cp312-cp312-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.12Windows x86-64

gllm_agents_binary-0.2.20-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.20-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.20-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.20-cp311-cp311-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.11Windows x86-64

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.20-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2730ad69d1c26759ce9b549cefc744bfc6ed99980f995fab5022192b46793fff
MD5 6a0b20e7576a9c7a3e9b16847682a0aa
BLAKE2b-256 6eadf55d3eb93a53706f02394ccca6996832df8dde5461186ce0435153a000a2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.20-cp313-cp313-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 b7d2b125f88515aa4519b3436c3c6d8741138068fd195e9a78f77d4af598434f
MD5 38448e3810c817894064872dde975470
BLAKE2b-256 b7f45804ead85f9d296f9610129041f18326543e4f1f7d9a1a81d35507543f01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.20-cp313-cp313-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 90aee75463467bcb57b9921b0eafda2f6ab1ba616652d1b3a51a3889647f5e84
MD5 1b27c368ee8d4b7a3fa39af5e55d6799
BLAKE2b-256 b2045777ca5cbcabe0fce209f3c76bd546d9e70eac5ba002554ec9c7db72ed75

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.20-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8418ad3471ecb58e24f8f1ad1fc1a38de17d55202cd74cf73ec6ef8ecc99d1db
MD5 90356ded3d8d9a552ca1b602cca7e428
BLAKE2b-256 8c2b37ba25eafe9f0dbbeff7377a5073ce82597c4a5c35021030898f7b6cce24

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.20-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 54cb0f0e46ac3f7f29c84a75c452bf26d15e729dbf11d087fc0caac5d4ae2c6b
MD5 dcbdc7f2a843d3dcadfa1266c0530ab8
BLAKE2b-256 5712f023452a2204fdea5edcee562b547cffcc5530a3ee8d91b8d9e43fe2685b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.20-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 64566c0f3f653b823006686708cd76b074019e274ab095c2b1fa97ebc71bbf06
MD5 b36a2db83c03cff2d8ffe4c8cec0bffe
BLAKE2b-256 b0157205c8f9695d88932f63b82327b69e6f10fabcca704ea10ebbe866ef5f07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.20-cp312-cp312-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 e3d6238e0c01ffa0a4957ae8a9a7666b2d948b3c8914e7c33aac8bfc68ebd01c
MD5 15ccba2cd0585aebb119adc6f77df6b8
BLAKE2b-256 13fdf3929bbc7d4e7092c9ee2b31dc3cd2282448cea0a04a3e861a7283552847

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.20-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b657377fee7f048045a6349c141a8bbec2ca14d236a075afe6d545deaa677d76
MD5 e5b1ea6405cc4071f0427af8bc1f28db
BLAKE2b-256 33ab8fc9bda3f8303adc102beecf339eeb1cf8b160cbbc28a16a078ac01663c2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.20-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 332dd59504f5ea6cddbf92e5eaa569f7418b957d743ccddcf774da711cfbfb76
MD5 ca423452f600fc99740fa0a92a8320f0
BLAKE2b-256 928cab819aff4197c17f9741474025d1e45db7526520450adfaac3ee23b7c4c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.20-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 da21642255ca75b41f7ffd882c949c1894e463fb7ad2d0a307fa4e0acb0fd086
MD5 303fe63017942e75ee71de6b947bb898
BLAKE2b-256 01a08ebaa006b3c2650db5a142ad34ed152286c4df8fea6bd2e890bb233d59c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.20-cp311-cp311-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 eb6e548355132e4496788c3335c5702c5caa5d7a06557179c289c2cdf737b754
MD5 13ed4b8966a111445bf2b8dfa535d288
BLAKE2b-256 8cece7348931714eee81f06902615fb898f535714ebab3971b02079bb2e3b24b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.20-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4cb7c65a966bd4c8614d910bd417fbfc6722654946ab696994fffe58fa6644b5
MD5 a28c8836711d70cd23522dc0fc170dd9
BLAKE2b-256 0060a88c44ded278ce6204b2d6dd97e306a84e217fee3b96552a9647ee444c00

See more details on using hashes here.

Provenance

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