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.5.tar.gz (7.0 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.5-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: signnow_smolagents-0.1.5.tar.gz
  • Upload date:
  • Size: 7.0 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.5.tar.gz
Algorithm Hash digest
SHA256 c92c79321a177dbc866bae3c8135d5d14df0ba3aaaaa33b4f2be1d1017c2d6fa
MD5 6e0f2d307a136e24f64ae2557fc8298b
BLAKE2b-256 91208495b100caf534bc7e2c2b615c0e49e50971a05f6218d9b646268090491a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signnow_smolagents-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b7dfe8cd908f21eecb0cd916c32e2731aeb18f8f204a44e1ba3e0265d9953d58
MD5 e57fc29915d096405dc722455d981c43
BLAKE2b-256 e90b5f8ebb6d7aae2d32cee971b3981ca91c0f44461b3cda394377b359de238c

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