May 19th, 2026

Until now, you had two choices: either let your agents generate Python code on-the-fly (flexible, but unpredictable), or manually write every integration. Neither was ideal.
You had solid Python code; tested code, code that works, but your agents couldn't use it directly.
We've created Python Code Execution: a way to turn your Python functions into reusable agent skills.
Here's how it works:
You write a Python function (a real one, with your business logic)
You deploy it as an agent skill in 2 minutes
Your agents execute it whenever they need it, always the same way
No dynamic generation. No hallucinations. No surprises. Just your code.
Currency conversion: Your agents convert amounts with live exchange rates, without asking you
Data validation: Normalize emails, phone numbers, addresses before they touch your database
Complex business logic: Calculate discounts, taxes, fees, exactly as your rules require
API integration: Wrap your API calls with authentication and error handling, then let agents use them
Data transformation: Clean, reformat, enrich data before sending it elsewhere
Structured reports: Aggregate and format data for presentation or automatic export
Your code runs in an isolated, secure environment:
Timeout: 30 seconds per execution (configurable by plan)
Memory: 512 MB per execution
Libraries: You have access to requests, pandas, numpy, json, datetime, and more
Errors: Smart handling, errors are captured and returned usefully
Traceability: Every execution is logged for audit and debugging
Open an agent (existing or new)
Go to Skills → Add a skill
Select "Python Code Execution"
Paste your Python function (e.g., a currency converter)
Test with real data
You're done.
Concrete Example:
def convert_currency(amount: float, from_currency: str, to_currency: str) -> str: import requests url = f"https://api.frankfurter.app/latest?amount={amount}&from={from_currency}&to={to_currency}" response = requests.get(url, timeout=10) data = response.json() converted = data["rates"][to_currency] return f"{amount} {from_currency} = {converted} {to_currency}" Save, test, it's live.
We also offer Python Code Interpreter (dynamic code generation). Here's the difference:
Use Code Execution if:
You have code that works and needs to stay stable
You need total control over the logic
It's for production (payments, sensitive data, etc.)
Use Code Interpreter if:
You're exploring, experimenting
Every request is different
You don't have predefined code
Pro plan and higher (Team Starter, Team Growth, Custom)
Not available on the free plan
Where to find it: Agents → [Your agent] → Edit → Skills → Add a skill → "Python Code Execution"
Before: You had Python code + your agents = two separate worlds.
Now: Your Python code = an agent skill = a complete, end-to-end workflow.
No more need to:
Rewrite your business logic
Ask your agents to generate risky code
Maintain two versions of the same logic
Just: Define once, execute infinitely.
"Ready to turn your Python code into an agent skill? Check out the documentation."
→ Discover at docs.swiftask.ai