Skip to content

About

Upload-Post tools for Hugging Face smolagents: publish, schedule and track social media posts from your agents

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

upload-post-smolagents

smolagents tools for Upload-Post: let your agents publish and schedule videos and text posts on TikTok, Instagram, YouTube, LinkedIn, Facebook, X, Threads, Pinterest, Bluesky and more, then check the result.

Tool Name seen by the agent Upload-Post API
UploadPostProfilesTool upload_post_profiles GET /api/uploadposts/users
UploadPostTextTool upload_post_text POST /api/upload_text
UploadPostVideoTool upload_post_video POST /api/upload (async)
UploadPostStatusTool upload_post_status GET /api/uploadposts/status

The tools are built on the official Python SDK (upload-post).

Install

pip install upload-post-smolagents
export UPLOAD_POST_API_KEY=...          # https://app.upload-post.com/api-keys
export UPLOAD_POST_PROFILE=my-profile   # optional default profile

Use with a CodeAgent

from smolagents import CodeAgent, InferenceClientModel
from upload_post_smolagents import get_upload_post_tools

agent = CodeAgent(tools=get_upload_post_tools(), model=InferenceClientModel())
agent.run("Post 'We just shipped dark mode!' on X and LinkedIn from my acme profile.")

Individual tools take api_key= and profile= if you prefer not to use environment variables. UploadPostVideoTool only accepts public http(s) URLs unless you create it with allow_local_files=True (that gives the agent read access to any local file, so only enable it in trusted setups).

Full example: examples/code_agent.py.

Load from the Hugging Face Hub

The tools are also published as Spaces grouped in a Hub collection:

from smolagents import Tool, ToolCollection

text_tool = Tool.from_hub("upload-post/upload-post-text-tool", trust_remote_code=True)
tools = ToolCollection.from_hub("upload-post/upload-post-tools-for-smolagents-6abce770ec47a0a6225f6f86", trust_remote_code=True)

The Spaces contain no credentials: set UPLOAD_POST_API_KEY in your own environment.

All 57+ tools via MCP

Upload-Post also runs a hosted MCP server with every API feature (comments, DMs, analytics, scheduling, FFmpeg jobs...). smolagents can load it directly:

import os
from smolagents import CodeAgent, InferenceClientModel, ToolCollection

server = {
    "url": "https://mcp.upload-post.com/mcp",
    "transport": "streamable-http",
    "headers": {"Authorization": f"ApiKey {os.environ['UPLOAD_POST_API_KEY']}"},
}
with ToolCollection.from_mcp(server, trust_remote_code=True) as tools:
    agent = CodeAgent(tools=[*tools.tools], model=InferenceClientModel())
    agent.run("Summarise my last 10 uploads.")

Install with pip install "upload-post-smolagents[mcp]". It pins mcp<2, because smolagents' MCP adapter (mcpadapt 0.1.20) doesn't work with the mcp 2.x SDK yet.

Development

pip install -e ".[test]"
pytest            # the SDK is mocked, no network needed
python scripts/push_to_hub.py            # dry run: writes the Space files to ./hub_export

License

MIT

About

Upload-Post tools for Hugging Face smolagents: publish, schedule and track social media posts from your agents

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages