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
  • Get account requirements for a quote

Transfers

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

Profiles

  • List profiles
  • Get profile by ID

Activities

  • List activities

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.3.2.tar.gz (25.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.3.2-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wise_agent_toolkit-0.3.2.tar.gz
  • Upload date:
  • Size: 25.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.3.2.tar.gz
Algorithm Hash digest
SHA256 41b66764fa49d052bd88691dcd7f49ac51be9a8e76205ed953b72e026f45ad64
MD5 bf9476193eaad28ac8ec80e88675763e
BLAKE2b-256 94b0275b7d21a965e535b1f4e24504fe360dc635822c29f827f7aad422af27d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wise_agent_toolkit-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ede3ebe51a42acdda79c6c0047540b57045dbeaebb0c8ca09e3e0119eacd8f49
MD5 dbede952bea715bb952905dea46cddb8
BLAKE2b-256 ec01d620f97660d4cb959255217ea9851441b9d6ef7e10b406597a3c1c41b5fa

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