Skip to main content

Python SDK for interacting with the Toolbox service with LlamaIndex

Reason this release was yanked:

Underlying orchestration is not v1 yet.

Project description

MCP Toolbox Logo

MCP Toolbox LlamaIndex SDK

This SDK allows you to seamlessly integrate the functionalities of MCP Toolbox into your LlamaIndex LLM applications, enabling advanced orchestration and interaction with GenAI models.

For detailed guides, authentication examples, and advanced configuration, visit the Python SDK LlamaIndex Guide.

Table of Contents

Installation

pip install toolbox-llamaindex

Quickstart

Here's a minimal example to get you started using LlamaIndex:

import asyncio

from llama_index.llms.google_genai import GoogleGenAI
from llama_index.core.agent.workflow import AgentWorkflow

from toolbox_llamaindex import ToolboxClient

async def run_agent():
  async with ToolboxClient("http://127.0.0.1:5000") as toolbox:
    tools = toolbox.load_toolset()

    vertex_model = GoogleGenAI(
        model="gemini-3-flash-preview",
        vertexai_config={"project": "project-id", "location": "us-central1"},
    )
    agent = AgentWorkflow.from_tools_or_functions(
        tools,
        llm=vertex_model,
        system_prompt="You are a helpful assistant.",
    )
    response = await agent.run(user_msg="Get some response from the agent.")
    print(response)

asyncio.run(run_agent())

Usage

The toolbox-llamaindex package provides a dedicated integration to seamlessly load and use MCP Toolbox tools within the LlamaIndex orchestration framework. For detailed guides and advanced configuration, please visit the following sections on our Documentation Site:

Contributing

Contributions are welcome! Please refer to the DEVELOPER.md file for guidelines on how to set up a development environment and run tests.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

Support

If you encounter issues or have questions, check the existing GitHub Issues for the main Toolbox project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toolbox_llamaindex-1.0.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toolbox_llamaindex-1.0.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file toolbox_llamaindex-1.0.0.tar.gz.

File metadata

  • Download URL: toolbox_llamaindex-1.0.0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for toolbox_llamaindex-1.0.0.tar.gz
Algorithm Hash digest
SHA256 15a1e2137e4154e50c87bf0a6c61c74555e959b8a6c622b0d0d99bd418672a52
MD5 ff3de1c961f0fdbcc4b579243957b355
BLAKE2b-256 addf5f93cc9bd153bcb0ec9383a34e21806893199638fb5a1a60acdb9d4d937a

See more details on using hashes here.

Provenance

The following attestation bundles were made for toolbox_llamaindex-1.0.0.tar.gz:

Publisher: google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.
  • Statement: Publication detail:
    • Token Issuer: https://accounts.google.com
    • Service Account: google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com

File details

Details for the file toolbox_llamaindex-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for toolbox_llamaindex-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b452b7813a1626aacb17b29718379d16e6d115213421072ccfe6c1ea002f1ff9
MD5 cd06b9ea483452792c0c7d9c615ab660
BLAKE2b-256 ebbb25e6f73caef862598d6e09c7eaa6298131786b02f4fb6969df95eaed9484

See more details on using hashes here.

Provenance

The following attestation bundles were made for toolbox_llamaindex-1.0.0-py3-none-any.whl:

Publisher: google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.
  • Statement: Publication detail:
    • Token Issuer: https://accounts.google.com
    • Service Account: google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com

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