Create and publish a Python AI Tool in six steps. No cloud account is needed until you upload your ZIP.
1. Install
Install Python 3.11 or later, then install the SDK:
python -m pip install syraio-ai-connect
The package is named syraio-ai-connect; in your code you import ai_connect.
2. Create a project
Create your project and open its folder:
python -m ai_connect create my-python-tools
cd my-python-tools
Your code goes in src/tool.py. The project also contains tool.json, README.md, and requirements.txt.
3. Write your tools
Replace src/tool.py with this example:
from ai_connect import create_ai_tools
myTools = create_ai_tools(name="my-python-tools", version="0.1.0")
myTools.add_tool("hello", "Return a greeting.", lambda args: "Hello from AI Connect!")
if __name__ == "__main__":
myTools.run()
This adds hello, a tool with no arguments that returns a greeting. Keep the final if __name__ == "__main__" block so AI Connect can start your tool.
Another example: use an argument
Add this above the if __name__ == "__main__" block:
myTools.add_tool(
"greet",
"Greet someone by name.",
lambda args: f"Hello, {args['name']}!",
{
"type": "object",
"properties": {"name": {"type": "string", "minLength": 1}},
"required": ["name"],
"additionalProperties": False,
},
)
greet accepts a required name. For example, { "name": "Ada" } returns Hello, Ada!.
Practical example: add two numbers
Add an add tool that calculates a sum. Your AI client calls your code with the numbers it needs and uses the result in its answer.
Place this above the if __name__ == "__main__" block.
myTools.add_tool(
"add",
"Add two numbers.",
lambda args: {"sum": args["a"] + args["b"]},
{
"type": "object",
"properties": {"a": {"type": "number"}, "b": {"type": "number"}},
"required": ["a", "b"],
"additionalProperties": False,
},
)
For example, the client sends { "a": 20, "b": 22 } and your tool returns { "sum": 42 }. You can use the same pattern for business calculations or reading data from your own system.
4. Try the examples
Create preview.py next to tool.json:
import asyncio
import runpy
myTools = runpy.run_path("src/tool.py")["myTools"]
result = asyncio.run(myTools.call_tool("hello"))
print(result["content"][0]["text"])
Run it from your project folder:
python preview.py
You should see Hello from AI Connect!.
If you added greet, replace the call_tool line with this to try it:
result = asyncio.run(myTools.call_tool("greet", {"name": "Ada"}))
Run python preview.py again. You should see Hello, Ada!.
Try the addition tool
In preview.py, replace the call_tool line with:
result = asyncio.run(myTools.call_tool("add", {"a": 20, "b": 22}))
Run python preview.py.
The result should contain:
{ "sum": 42 }
5. Build the ZIP
Update README.md with what your tool does, setup instructions, and runtime requirements. This README appears on your public tool page.
Check the generated tool.json: keep a stable, unique id, set a display name and description, and keep the tool version at 0.1.0 for this first release. The SDK version and your tool's release version are separate.
From my-python-tools:
python -m ai_connect package
Output: my-python-tools.zip. It includes tool.json, README.md, a generated dist/main.py, your source, and bundled Python dependencies.
Build Python ZIPs on the target operating system, architecture, and Python minor version. For example, a Windows x64 / Python 3.13 package needs that target on the user's device. Record the target printed by the packager in your README. Users do not install the SDK with pip.
6. Upload and publish
- Register a cloud account or sign in.
- Open the Developer portal.
- Select Upload AI Tool ZIP and choose
my-python-tools.zip. - Wait for processing, then open the new listing. New listings are Private draft.
- Review the name, description, version, and README. Save any listing edits.
- Select Publish and confirm. Find your listing in the public AI Tool store, open its page, and verify the README and ZIP download.
Upload the AI Tool ZIP here, not an npm .tgz or Python SDK .whl. If another creator already uses your tool ID, choose a unique ID in tool.json and rebuild before uploading.
For updates, keep the ID and increase the version in tool.json and your service declaration. Rebuild and upload the new ZIP. Existing versions cannot be overwritten. A new release uploaded to an already published listing becomes public immediately.
Your users now follow step 7: install the tool, then step 8: connect an AI client. They do not need a cloud account to browse, download, or use your public release.
Use the calculation from an AI client
After installing and enabling the package and connecting your client with the user guide, ask:
Use
my-python-tools__addto calculate 20 + 22 and show the result.
The client should call your tool with a: 20 and b: 22, then display 42. AI Connect runs your code on your device and returns its result to the client.