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.3.1.tar.gz (23.0 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.1-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wise_agent_toolkit-0.3.1.tar.gz
  • Upload date:
  • Size: 23.0 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.1.tar.gz
Algorithm Hash digest
SHA256 b60aaf8797bcbc02bc3033fdb94c1ee82f8c69f17920d1482c5830bb6582edb2
MD5 7fb85060a5943c77cb374fd0e187b8e6
BLAKE2b-256 a94d4874faf56353873dbf1ec2682092f51b1fe8bfebef0059dff8b991fbf16a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wise_agent_toolkit-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9fbca241f412b07de153859055e07a5bfedf3c1143dd835fc5a9fc20b362773
MD5 7e686a1c54ab7677043a4909d5c9854a
BLAKE2b-256 daa106bac7cf03e946116010077e59b7e4e36731721a900a250613dbcf3a7402

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