OpenPieces Documentation
OpenPieces is an AI-native platform where the AI doesn't have tools — it builds them, then uses them later. Every service, endpoint, and automation you create is a tool the AI built for you.
Core Idea
When you ask for something, the Orchestrator AI plans the architecture, commissions the OpenCode agent to write Deno HTTP services, deploys them to public URLs, and wires them into workflows. No predefined integrations. No drag-and-drop. The AI builds everything from scratch, for your specific need.
All Topics
Quickstart
Get your first service deployed in under two minutes.
Services
Action and trigger services — the core building blocks of OpenPieces.
Endpoints
Registering HTTP routes on your services with method, path, and schema.
Workflows
Linking triggers to action services with detailed execution steps.
Tasks
Cron-based schedulers that fire workflows on a schedule.
Secrets
Encrypted key-value storage for API keys and credentials.
Brain
The AI's long-term memory — facts, preferences, and history.
Sessions
Conversations with OpenCode for building and iterating on services.
The Object Model
Action Service
A Deno HTTP server. Reusable across workflows. Can stand alone or be called by workflows. Gets a public URL on deployment.
Trigger Service
A Deno HTTP server that receives inbound events. Lives inside exactly one workflow. Validates events then notifies the Events AI.
Workflow
A named declaration linking a trigger to action services. Not executable code — it's a plan with detailed steps that govern execution.
Task
A cron-based scheduler. Pure configuration — a cron expression linked to a workflow. When it fires, the Events agent executes the workflow.
Endpoint
A registered HTTP route on a service (GET, POST, PUT, DELETE, PATCH). Each endpoint has a method, path, and optional input schema.
Secret
An encrypted key-value pair. API keys, tokens, and credentials are stored as secrets. The AI names them; the user fills in values.
Session
A conversation with OpenCode scoped to one service directory. Sessions retain full context — reuse recent ones for bug fixes, create fresh ones for new features.
Brain
Long-term memory for the AI. Stores facts, past decisions, user preferences, built services, and workspace history. The AI reads before building, writes after.