Skip to main content

SmolAgents tools for SignNow API integration

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

SignNow SmolAgents Tools

A collection of tools and agents for integrating with the SignNow API using the SmolAgents framework.

Features

This package provides:

  • Agents with authorization using login/password and app key
  • Tool collection (ToolCollection) for interacting with SignNow’s core API:
    • Upload local documents
    • Retrieve templates
    • Create documents from templates
    • Get detailed document information
    • Fetch contacts
    • Send invites for signing

You can use:

  • A full agent (SignNowSmolagentsCodeAgent or SignNowSmolagentsToolCallingAgent)
  • Just the tool collection (SignNowSmolagentsToolset)
  • Or individual tools separately

Installation

pip install -r requirements.txt

Usage Example

Get Access Token

from sn_smolagent_tools_demo import access_token_from_login_password

token = access_token_from_login_password("your_login", "your_password", "your_app_key")

Using the Agent

from sn_smolagent_tools_demo import SignNowSmolagentsCodeAgent

agent = SignNowSmolagentsCodeAgent(access_token=token)
result = agent.run("Upload the file 'contract.pdf' and send it for signature to John Smith")

Using the Tool Collection

from sn_smolagent_tools_demo import SignNowSmolagentsToolset

tools = SignNowSmolagentsToolset(access_token=token).tools
for tool in tools:
    print(tool.name)

Creating a Custom Agent with Individual Tools

from sn_smolagent_tools_demo import (
    GetTemplateListTool,
    UploadLocalFileTool,
    GetContactsTool,
    CreateDocumentFromTemplateTool,
    GetDocumentInfoTool,
    SendInviteTool
)
from smolagents import CodeAgent

# Initialize tools individually
get_templates_list = GetTemplateListTool(access_token=token)
upload_document = UploadLocalFileTool(access_token=token)
get_contacts = GetContactsTool(access_token=token)
create_document_from_template = CreateDocumentFromTemplateTool(access_token=token)
get_document_info = GetDocumentInfoTool(access_token=token)
send_invite = SendInviteTool(access_token=token)

# Create custom agent with selected tools
manager_agent = CodeAgent(
    model=model,
    tools=[
        upload_document,
        get_contacts,
        get_document_info,
        send_invite,
        create_document_from_template,
        get_templates_list,
    ],
    name='signnow_agent',
    description=(
        'This agent integrates with the SignNow API to handle electronic signatures.'
        ' It can send documents for signing, retrieve their signing status, manage templates, and coordinate contacts—all within a streamlined workflow.'
    ),
    managed_agents=[],
    planning_interval=10,
    verbosity_level=2,
    max_steps=20,
)

Integrating the SignNow Agent as a Managed Agent

You can include the SignNow agent in your workflow as a managed agent to seamlessly add e-signature functionality to any agent you build:

from sn_smolagent_tools_demo import SignNowSmolagentsCodeAgent
from smolagents import CodeAgent

sn_agent = SignNowSmolagentsCodeAgent(access_token=token)

your_agent = CodeAgent(
    model=model,
    tools=[
        your_tool_1,  # replace with your own tools
        your_tool_2,
    ],
    name='your_agent',
    managed_agents=[sn_agent],  # integrate SignNow capabilities
    planning_interval=10,
    verbosity_level=2,
    max_steps=20,
)

Available Tools

  • get_template_list
  • upload_local_file_to_signnow
  • get_contacts_from_signnow
  • create_document_from_template
  • get_document_info
  • send_invite

TODO

  • Add wrappers for more SignNow APIs
  • Add logging and debugging features
  • Improve error handling and retries

License

MIT License

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

signnow_smolagents-0.1.4.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

signnow_smolagents-0.1.4-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file signnow_smolagents-0.1.4.tar.gz.

File metadata

  • Download URL: signnow_smolagents-0.1.4.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for signnow_smolagents-0.1.4.tar.gz
Algorithm Hash digest
SHA256 758472728b064e70b6a6ac6f89fa0176417b3646b3f81560ef7087ac31c15846
MD5 a4b3858ab33cdb59fdc0dfa9104906c6
BLAKE2b-256 90932936ad309f5e3b0eb850ea8b65e19d53cdc25709a4fe1fb3470d170e178d

See more details on using hashes here.

File details

Details for the file signnow_smolagents-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for signnow_smolagents-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fba673722c41354725781caba83d54660cf09ebac6344a0917b0687686133fed
MD5 30a92dd4360f4e3c4135cbf974b3dcb1
BLAKE2b-256 2641cc393ebc4eb70f268d37870e7c7e955872bcd3549d532befea6c8ae1bd36

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