Tasks
Tasks are Python scripts that run on Aisle's infrastructure. You write a Python function, and Aisle handles scheduling, execution, logging, and delivering outputs back to users.
Unlike Workflows — which chain together prompts and scripts in a visual builder — Tasks give you direct code control. Use them when you need loops, conditionals, branching logic, or external API calls that go beyond what a workflow node can express.
What a task looks like
result = aisle.ai.prompt("Summarize this document", files=[doc])
aisle.create_chat("Your summary", result)
The aisle object is injected automatically. It gives you access to AI models, memories, files, integrations, HTTP, and more — without any import or configuration.
Triggers
Tasks can be invoked:
- Manually — from the task editor or via the API
- On a schedule — cron expressions or plain-language intervals
- Via webhook — HTTP POST to a generated endpoint
- From a workflow — as a node in a visual workflow
Outputs
Tasks can produce two kinds of output:
aisle.create_chat()— creates a chat thread visible to a user in the Aisle UI, optionally allowing follow-up repliesaisle.output()— sets a structured return value on the execution record, useful when another system is consuming the result
The SDK
The aisle SDK is available inside every task as a pre-injected object. See SDK Reference for the full API.