Skip to main content

Bolt Agent Toolkit

Project description

Bolt Agent Toolkit - Python

The Bolt Agent Toolkit library provides a BoltAPI tool for integrating with Bolt APIs through function calling. This library is not exhaustive of the entire Bolt API. It is built directly on top of the Bolt Python SDK.

Requirements

Installation

uv add bolt-agent-toolkit

Usage

The Bolt Agent Toolkit supports multiple frameworks for integrating with Bolt APIs.

Bolt API

The library needs to be configured with your account's API key which is available in your Bolt Dashboard.

from bolt_agent_toolkit import BoltAPI, Context

api_key = "your_bolt_api_key"
context = Context(
    api_key=api_key,
    publishable_key="your_bolt_publishable_key",
)

bolt_api = BoltAPI(api_key=api_key, context=context)

products_result = bolt_api.list_products()
print(products_result)

Langchain

from bolt_agent_toolkit.langchain.toolkit import BoltAgentToolkit

bolt_agent_toolkit = BoltAgentToolkit(
    api_key="your_bolt_api_key",
    configuration={
        "context": {
            "publishable_key": "your_bolt_publishable_key",
        },
        "actions": {
            "products": {
                "read": True,
            },
        },
    },
)

OpenAI

from bolt_agent_toolkit.openai.toolkit import BoltAgentToolkit

bolt_agent_toolkit = BoltAgentToolkit(
    api_key="your_bolt_api_key",
    configuration={
        "context": {
            "publishable_key": "your_bolt_publishable_key",
        },
        "actions": {
            "products": {
                "read": True,
            },
        },
    },
)

Model Context Protocol

from bolt_agent_toolkit.modelcontextprotocol.toolkit import BoltAgentToolkit

bolt_agent_toolkit = BoltAgentToolkit(
    api_key="your_bolt_api_key",
    tools=["products.read", "subscriptions.read"],
    configuration={
        "context": {
            "publishable_key": "your_bolt_publishable_key",
        },
        "actions": {
            "products": {
                "read": True,
            },
            "subscriptions": {
                "read": True,
            },
        },
    },
)

Examples for LangChain, OpenAI's Agent SDK and ModelContextProtocol are included in examples directory.

Development

This project uses a Makefile to simplify common development tasks. To see all available targets and their descriptions:

make

Quick Start

# Set up the development environment
make setup

# Run tests
make test

# Format and lint code
make lint

# Build the package
make build

# Clean up generated files
make clean

Manual Commands

If you prefer to use uv directly:

# Set up environment and install dependencies
uv sync

# Run tests
uv run pytest tests/ -v

# Run individual tools
uv run black bolt_agent_toolkit/
uv run mypy bolt_agent_toolkit/

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

bolt_agent_toolkit-0.1.1.tar.gz (165.2 kB view details)

Uploaded Source

Built Distribution

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

bolt_agent_toolkit-0.1.1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file bolt_agent_toolkit-0.1.1.tar.gz.

File metadata

  • Download URL: bolt_agent_toolkit-0.1.1.tar.gz
  • Upload date:
  • Size: 165.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bolt_agent_toolkit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3fbf0e65be2e92f8fc2bc44abd479bb09ac29537d620400d970b48e0c46178a6
MD5 a0d80900862500fe66c95a31b50574e3
BLAKE2b-256 de7b7507acbb4f906a9be73b736e3c5fce1d39bb35b6bc4226a8c97af8462b2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolt_agent_toolkit-0.1.1.tar.gz:

Publisher: pypi_release.yml on BoltApp/agent-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolt_agent_toolkit-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for bolt_agent_toolkit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a9661d1dd89626ecdc4e4f63397a884ef1f3dcda5957f5f7ddf7449679ccbec5
MD5 35a38f4e90e4325b4db6331b2d334ce3
BLAKE2b-256 0b7d19f4fb9f4262eced31e000ad44156b93091e0091775772c0132a87019996

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolt_agent_toolkit-0.1.1-py3-none-any.whl:

Publisher: pypi_release.yml on BoltApp/agent-toolkit

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