Skip to main content

Tasks

Tasks are Python scripts that run on Aisle's managed infrastructure. You write the logic, and Aisle handles execution, credentials, schedules, retries, logs, revisions, and outputs.

Tasks are the recommended way to build deterministic automations in Aisle. Use them when you need loops, conditionals, branching logic, external API calls, structured outputs, or repeatable production behavior.

Use Projects when you want a workspace for ongoing agent-style work. Use Tasks when the work should run repeatably with deterministic Python control flow.

What a task looks like

company = aisle.inputs.get("company")

brief = aisle.ai.raw(
f"Write a concise account brief for {company}."
)

aisle.create_chat(
title=f"{company} account brief",
content=brief,
)

The aisle object is injected automatically. It gives you access to AI models, memories, files, integrations, HTTP, and more — without any import or configuration.

What tasks can do

CapabilityHow it shows up
AI callsaisle.ai.raw, saved prompts, inline prompts, structured outputs
Integrationsaisle.integrations.slack.create_message(...), CRM lookups, database queries, file operations
MemorySearch, vector search, store, update, archive, and list memory records
FilesRead, write, convert, split PDFs, and create downloadable files
Runtime stateInputs, run metadata, checkpoints, cache, retries, concurrency
OutputsCreate chats for humans or return structured values for systems

Triggers

Tasks can be invoked:

  • Manually — with Run Now in the Tasks UI or POST /api/automated_tasks/:id/run_now
  • On a schedule — recurring jobs stored as a cron expression with a timezone
  • Via webhook — HTTP POST to a generated endpoint
  • Via polling triggers — connector-backed checks for new external data
  • From chat or Projects — as tools assigned to a Project or made runnable from the launcher

Outputs

Tasks can produce human-facing and machine-facing output:

  • aisle.create_chat() — creates a chat thread visible to a user in the Aisle UI, optionally in a Project
  • aisle.output() — sets a structured return value on the execution record, useful when another system is consuming the result
  • Task output settings — control whether the task behaves as a standalone chat, project chat, Slack output, or silent run

The SDK

The aisle SDK is available inside every task as a pre-injected object. See SDK Reference for the full API.

Where to go next