Documentation Index
Fetch the complete documentation index at: https://docs.sigmic.ai/llms.txt
Use this file to discover all available pages before exploring further.
Use Cases
The Task API is more than a wrapper around an LLM. Each task runs inside an isolated cloud sandbox with access to tools — file I/O, shell commands, web search, MCP server integrations — and the agent can call these tools iteratively, adapting its approach based on each result. This makes it suited for complex, multi-step workflows that a single LLM call cannot handle.These use cases leverage the agent’s ability to chain dozens of tool calls, where each step’s output informs the next step’s input. The fire-and-forget execution model means your application doesn’t need to stay connected — just create the task, then poll or stream for results.
Data Reconciliation
Query two systems via MCP, match records, identify discrepancies, and produce a downloadable report.
Document Processing
Upload a ZIP of documents, parse each adaptively, and produce a consolidated dataset as downloadable artifacts.
Recurring Pipeline
Schedule daily tasks that query multiple systems, compare metrics against targets, and alert on anomalies.
Cross-System Data Reconciliation
Problem: Manually comparing records across two systems (e.g., payment processor vs. internal database) is tedious, error-prone, and time-consuming. Solution: The agent queries both systems via MCP servers, matches records, identifies discrepancies, and produces a downloadable report.How It Works
The agent performs dozens of tool calls across two MCP-connected systems:- Queries the internal database for all paid orders in a date range
- Paginates through the payment processor API to fetch all matching payments
- Writes and runs a matching script inside the sandbox (fuzzy matching on amount, email, timestamp)
- For each mismatch, drills into both systems to pull full record details
- Produces a reconciliation report and discrepancy CSV as downloadable artifacts
Why This Needs the Task API
- Multiple MCP servers — the agent queries two independent systems in a single task
- Pagination — payment APIs return paginated results; the agent must loop through pages
- Adaptive logic — the matching strategy depends on what fields are available, discovered at runtime
- Shell execution — the agent writes and runs a Python script for fuzzy matching inside the sandbox
- Artifact generation — the final CSV and summary report are real files the caller can download
Example
What the Agent Produces
After completion, the artifacts endpoint returns files like:This use case requires MCP servers configured with access to your database and payment provider. Use dynamic token injection with
secrets to pass credentials securely per-request.Bulk Document Processing
Problem: You have a batch of documents (invoices, reports, contracts) in varying formats that need to be parsed, normalized, and aggregated into a single structured dataset. Solution: Upload a ZIP archive of documents. The agent extracts the archive, reads each file, adapts its parsing strategy per document format, and produces a consolidated output.How It Works
- The ZIP archive is auto-extracted on upload into the sandbox workspace
- The agent lists the extracted files and inspects sample documents to understand the format variation
- For each document, the agent reads the content and extracts structured fields (vendor, date, amount, line items, etc.)
- When a document has an unexpected format, the agent adapts — trying different parsing strategies rather than failing
- The agent runs a Python script to aggregate, deduplicate, and validate the extracted data
- Produces a consolidated CSV ledger and an anomaly report as downloadable artifacts
Why This Needs the Task API
- ZIP extraction — the archive is auto-extracted; the agent discovers the file count at runtime
- Per-file iteration — processing 50+ documents requires 50+ read operations, each with unique parsing
- Adaptive parsing — real-world documents have inconsistent formats; the agent must adjust its strategy per file
- Shell execution — aggregation, deduplication, and anomaly detection run as Python scripts in the sandbox
- Long-running — processing a large batch takes minutes; fire-and-forget execution with SSE streaming keeps the caller informed
Example
Iterating with Follow-ups
After the initial processing completes, use follow-up messages to refine the results without re-uploading files:Recurring Data Pipeline (Cron-Triggered)
Problem: Your team needs a daily operations report that pulls data from multiple sources — databases, payment systems, monitoring tools — compares metrics against targets, and alerts on anomalies. Building and maintaining a custom pipeline for this is expensive. Solution: A scheduled job calls the Task API daily. The agent queries multiple systems, synthesizes the data, generates a report artifact, and posts alerts to Slack when metrics are off-track.How It Works
- A cron job (or scheduler) fires
POST /api/v1/tasksdaily with the current date inenv - The agent queries the database via MCP for revenue, signups, and churn numbers
- The agent queries the payment processor via MCP for payment volume and failure rates
- The agent runs a Python script to compare actuals vs. targets and compute trends
- The agent generates a formatted daily report as a downloadable artifact
- If any metric is off-track, the agent posts an alert to Slack via MCP with the specific numbers
Why This Needs the Task API
- Multi-source aggregation — the agent queries 2-3 MCP servers and the web in a single task
- Computed analysis — the agent writes and runs scripts to compare actuals vs. targets, compute week-over-week trends
- Conditional branching — alerts are only sent when metrics breach thresholds; the agent decides at runtime
- Unattended execution — the fire-and-forget model is designed for scheduled, headless operation
- Artifacts — the report is a real downloadable file, not just text in a response
Example: Scheduler Integration
Retrieving the Report
After the task completes, download the generated report:Common Patterns Across Use Cases
These use cases share architectural patterns that apply to any complex Task API integration:Fire-and-Forget + Poll/Stream
All three examples use the same flow: create the task, then either stream or poll for completion. Your application doesn’t need to maintain a long-lived connection during execution.Secrets for Credential Injection
Usesecrets to pass credentials that the agent needs at runtime. Secrets are never stored, never logged, and never returned in any API response. They are held in memory only for the task’s duration.
Artifacts as Outputs
The agent writes its final outputs to the sandbox filesystem. Use the artifacts API to list and download these files after the task completes.Follow-ups for Iteration
After reviewing the initial output, send follow-up messages to refine results. The agent retains full context from the original task, and expired sessions are automatically restored.What’s Next
Create a Task
Start building with the Task API
MCP Servers
Connect external systems to extend agent capabilities
Streaming Events
Monitor task execution in real-time
Artifacts
Download files generated by the agent