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

Uploaded CPython 3.13Windows x86-64

gllm_agents_binary-0.2.17-cp313-cp313-manylinux_2_31_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.17-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.17-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.13macOS 13.0+ ARM64macOS 15.0+ ARM64

gllm_agents_binary-0.2.17-cp312-cp312-win_amd64.whl (943.7 kB view details)

Uploaded CPython 3.12Windows x86-64

gllm_agents_binary-0.2.17-cp312-cp312-manylinux_2_31_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

gllm_agents_binary-0.2.17-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.17-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl (995.7 kB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64macOS 15.0+ ARM64

gllm_agents_binary-0.2.17-cp311-cp311-win_amd64.whl (964.7 kB view details)

Uploaded CPython 3.11Windows x86-64

gllm_agents_binary-0.2.17-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.17-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.17-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl (993.1 kB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64macOS 15.0+ ARM64

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.17-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ebb2018535e8a574f103e65e434f684b77b783af958b6913badd725b033971b9
MD5 ec592594301d165ec84762219fe1eb8a
BLAKE2b-256 962b1a5036878a3a6b6cafd8b05ce88dceba5de3a41291c0bf62268630213b27

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.17-cp313-cp313-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 ed2e27998c5fc3e7f911b92c81fb4cccf97a35a58d1868f498f8263dd8a584c6
MD5 40c178da3ffa8f0e62a66d842bc73b81
BLAKE2b-256 c55920d5a225c0e215ee622fde80e0f46f1bd3d72e49912f454a944fca843710

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.17-cp313-cp313-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 292d9746525e78fd2a5b41f26f3c74a970ee0debc53197d6fe98ce61b2166363
MD5 58fd88ae4eb85bb9bdf5b218a57861ef
BLAKE2b-256 7a1fdd5e23e3b0a10005125a9afa5be46482973722b32c3e4e69eca05f2d65b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.17-cp313-cp313-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 38743213d40316a33c24970791656901e1c23052291c1e267b1f3cacd8de6399
MD5 850d61571ad71672cb842e92c0810885
BLAKE2b-256 c5d8766f24a352c756c8126b7e8a17d21e6c72f21c0f0b39796c8e95fac6fd48

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 476262b75b7551d778511a55c64f30e1322137b1d29da60205df7aaca5f0aa64
MD5 4353500fc882274aecab7eae8a9bd9d3
BLAKE2b-256 84635e24e52f82b4fd40b1a3615d8f6f3c109111ac88bfb63c993b16ecb1079a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.17-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 9f7993049b9285d42f1712b52988038ac5e188697d541a1f69fd09d89771cb01
MD5 31ab59963b8b36897fd7da37aaf2896f
BLAKE2b-256 ff7aabd8afbbffe7282bffe0b1540087cf3cd967a9bbcdb63c243bf5b005b48c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.17-cp312-cp312-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 11b2987b4b0764cebb6eb3a20745877acacf4ac86d582168d162986cba9b8852
MD5 aa995f39f7ee71bc9f2154c7c9aa2596
BLAKE2b-256 8fc72c6da2741dae3b4a4801f291e1099df24e5522877c5392245ac56e4b74d5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.17-cp312-cp312-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1de41dd966fc581b407bded8214bfb2f66ef8c83bc53c09cfefe160249862788
MD5 73dd0b81c7a3757e2e14e41df87b8062
BLAKE2b-256 fd322cdd8de4e2ee2f0f9775c46ba1f4f46a7543f61f3a0214ca683eda0891eb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.17-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 91acfc7bc45fdd298c18b4d3fe9f60f227a891f170f60eb1a33a4e9f4e7e95b1
MD5 0b3b8e2456e1f9f7c12a6768ad61f92f
BLAKE2b-256 0965f257f7cce48eec3c30db66663be297d303e95da75beb1865e828b15a05f2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.17-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 f7ebb05950ec0995598908e296435c360fd3608ecf2565d169edb45022236048
MD5 4c495c54934e75d33960b7437cb31d42
BLAKE2b-256 0f80401ef619d99b655a8e5925547df8ee484dc2494e07f00eb7eddfc9f4e14d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.17-cp311-cp311-macosx_13_0_x86_64.macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 8bd4187fc2e583f1088a9fa2bc61f2d6e22c1818830799ec08a62383457a172e
MD5 538f6a74b1b73f44f9688ef168589351
BLAKE2b-256 aae1f599e85a299a41b27dd4384d10b30e0c991419826141cbb8c6643cf37355

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for gllm_agents_binary-0.2.17-cp311-cp311-macosx_13_0_arm64.macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 671c00832628d2be9dc1a9a1a4d7c14a46752f8c4a972f792b8ea16049055dd2
MD5 7e0e73cba9ec259831d69bffeb8eced2
BLAKE2b-256 95474d867451fcdf46f71380d4dabece3406b087ef49d475f9a0a65f54a66c70

See more details on using hashes here.

Provenance

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