Skip to main content

The Wise Agent Toolkit enables the integration of various AI frameworks and libraries with Wise APIs to create and manage transfers programmatically.

Project description

Wise (TransferWise) Agent Toolkit

The Wise Agent Toolkit enables the integration of various AI frameworks and libraries with Wise APIs to create and manage transfers programmatically. This library simplifies working with the Wise API and empowers developers to embed financial operations into AI-driven workflows using Python.

The toolkit supports multiple AI libraries through optional dependencies, allowing you to install only what you need.

Included below are basic instructions, but refer to the Python package documentation for more information.

Python

Installation

Core Installation

For the basic toolkit without any AI library integrations:

pip install wise-agent-toolkit

Integration-Specific Installation

Choose your AI library and install the corresponding extra:

LangChain Integration:

pip install "wise-agent-toolkit[langchain]"

MCP (Model Context Protocol) Integration:

pip install "wise-agent-toolkit[mcp]"

All Integrations (if you want everything):

pip install "wise-agent-toolkit[all]"

Development Installation:

pip install "wise-agent-toolkit[dev]"

Note for macOS/zsh users: The package name must be quoted to prevent shell interpretation of square brackets. Alternatively, you can escape the brackets: pip install wise-agent-toolkit\[mcp\]

Supported Integrations

  • LangChain - Full support with wise-agent-toolkit[langchain]
  • MCP (Model Context Protocol) - Full support with wise-agent-toolkit[mcp]
  • 🚧 CrewAI - Coming soon with wise-agent-toolkit[crewai]
  • 🚧 AutoGen - Coming soon with wise-agent-toolkit[autogen]

Requirements

  • Python 3.11+

Usage

LangChain Integration

The library needs to be configured with your Wise API key, which is available in your Wise account dashboard.

from wise_agent_toolkit.langchain.toolkit import WiseAgentToolkit

wise_agent_toolkit = WiseAgentToolkit(
    api_key="YOUR_WISE_API_KEY",
    host="https://api.transferwise.com",
    configuration={
        "actions": {
            "transfers": {
                "create": True,
            },
        }
    },
)

The toolkit works with LangChain and can be passed as a list of tools. For example:

from langchain.agents import initialize_agent
from langchain.chat_models import ChatOpenAI

llm = ChatOpenAI(model="gpt-4")
wise_tools = wise_agent_toolkit.get_tools()

agent = initialize_agent(
    tools=wise_tools,
    llm=llm,
    agent="zero-shot-react-description",
    verbose=True,
)

# Example usage of the agent
response = agent.run("Create a transfer of 100 EUR to John Doe's account.")
print(response)

MCP (Model Context Protocol) Integration

The MCP integration allows you to expose Wise API operations as an MCP server, which can be consumed by MCP-compatible clients like Claude Desktop, Cline, or other MCP clients.

Installation for MCP Integration Only:

pip install wise-agent-toolkit[mcp]

Environment Setup: Set your Wise API credentials as environment variables:

export WISE_API_KEY="your_wise_api_key_here"
export WISE_API_HOST="https://api.transferwise.com"  # or https://api.sandbox.transferwise.tech for testing

Starting the MCP Server: Run the MCP server from the command line:

python -m wise_agent_toolkit.mcp --api_key $WISE_API_KEY --host $WISE_API_HOST

Or with explicit values:

python -m wise_agent_toolkit.mcp --api_key "your_api_key" --host "https://api.transferwise.com"

Using as an MCP Toolkit (Programmatic): If you want to integrate the MCP tools programmatically:

from wise_agent_toolkit.mcp.toolkit import WiseAgentToolkit

wise_agent_toolkit = WiseAgentToolkit(
    api_key="YOUR_WISE_API_KEY",
    host="https://api.transferwise.com",
    configuration={
        "actions": {
            "transfers": {
                "create": True,
            },
        }
    },
)

# Get MCP-compatible tools
tools = wise_agent_toolkit.get_tools()

Server Configuration: The MCP server supports the following command-line options:

  • --api_key: Your Wise API key (required)
  • --host: Wise API host URL (default: sandbox)
  • --server_name: MCP server name (default: "wise-agent-toolkit")
  • --profile_id: Wise profile ID (optional)

For production use, always use https://api.transferwise.com as the host. For testing and development, use https://api.sandbox.transferwise.tech (default).

Checking Available Integrations

You can check which integrations are available in your installation:

from wise_agent_toolkit import get_available_integrations

print("Available integrations:", get_available_integrations())

Examples

For detailed examples, refer to the /examples directory in the source repository.

Context

In some cases, you will want to provide default values for specific API requests. The context parameter allows you to specify these defaults. For example:

wise_agent_toolkit = WiseAgentToolkit(
    api_key="YOUR_WISE_API_KEY",
    configuration={
        "context": {
            "profile_id": 42,
        }
    },
)

Adding New Integration Support

The library is designed to be extensible. To add support for a new AI library:

  1. Create a new directory under wise_agent_toolkit/ for your integration
  2. Implement the integration-specific toolkit and tool classes inheriting from the base classes
  3. Add the optional dependency to pyproject.toml
  4. Update the main __init__.py to conditionally import your integration

Supported API Methods

Quotes

  • Create a quote
  • Update a quote
  • Get quote by ID

Recipients

  • List recipient accounts
  • Create recipient account
  • Get recipient account by ID
  • Deactivate recipient account

Transfers

  • Create a transfer
  • Get transfer by ID
  • List transfers
  • Cancel a transfer

Profiles

  • List profiles
  • Get profile by ID

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

wise_agent_toolkit-0.2.4.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

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

wise_agent_toolkit-0.2.4-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file wise_agent_toolkit-0.2.4.tar.gz.

File metadata

  • Download URL: wise_agent_toolkit-0.2.4.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for wise_agent_toolkit-0.2.4.tar.gz
Algorithm Hash digest
SHA256 1a836bdfec099b253a05e579cd006f28f994a8f33c8461e6c2f9865ba440d497
MD5 2c91cbdd7e413ecb1fac4374eb4c430d
BLAKE2b-256 a77aa4c1e346bc2e471c1bdae9bf191e7d7c4802f4f1f7c72d13cf78c0bcb03f

See more details on using hashes here.

File details

Details for the file wise_agent_toolkit-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for wise_agent_toolkit-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e792a7b429fd8d3fbe54488637825d56c9bf4f78e5e9eb3b221eb95311addd5c
MD5 a036bd6f82d2215355d462f9fc7e0f31
BLAKE2b-256 342ab21b4a9aa9bf0d79e4ae88a61bfcee064b5dace04914586cfecd7fcdcdf8

See more details on using hashes here.

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