Hosted Services (Beta)¶
Hosted Services let you deploy backend logic as managed API endpoints on the Manifest Platform. You write the business logic; the platform handles routing, authentication, versioning, scaling, and observability.
A hosted service is a named container of endpoints -- each endpoint defines an HTTP method, path, input/output schemas, and the code that runs when the endpoint is called. Services support both synchronous (request/response) and asynchronous (job-based) invocation patterns.
Why Hosted Services?¶
| Need | How Hosted Services help |
|---|---|
| Run custom backend logic | Write Python code blocks, attach them to endpoints, invoke via REST |
| Expose endpoints to agents | Mark an endpoint as an agent tool and the platform auto-generates a Skill for agent discovery |
| Long-running work | Submit async jobs with automatic retry, priority lanes, and polling |
| Version safely | Immutable version snapshots let you deploy new logic without breaking callers |
| Authenticate flexibly | Choose platform auth, service tokens, or public access per endpoint |
Service Lifecycle¶
Every hosted service follows a predictable lifecycle from creation through deployment and invocation.
stateDiagram-v2
[*] --> Draft: Create service
Draft --> Active: Publish version
Active --> Suspended: Suspend
Suspended --> Active: Reactivate
Active --> Archived: Archive
Suspended --> Archived: Archive
Archived --> [*]
note right of Draft: Add/edit endpoints
note right of Active
Create new draft version
Deploy (persistent mode)
end note
Step by step¶
- Create a service with a unique slug, name, and execution mode.
- Define endpoints on the service's draft version -- set paths, methods, schemas, and code.
- Publish the version to freeze the endpoint snapshot and make it invocable.
- Invoke endpoints through the Service Gateway (sync or async).
- Iterate by creating new versions with updated endpoints while prior versions keep serving traffic.
Execution Modes¶
Hosted services support two execution modes that determine how your code runs.
Each request spins up an isolated execution context, runs your code block, and returns the result. Best for stateless operations that complete quickly.
- No cold start after initial deployment
- Automatic per-request isolation
- Ideal for data transformations, API proxies, and simple computations
The platform builds a container image from your code and deploys it as a long-running service on Cloud Run. Requests are proxied to the running container.
- Supports startup logic (initialize ML models, open DB connections)
- Configurable replicas, concurrency, and autoscaling
- Best for stateful services, ML inference, and high-throughput workloads
Key Concepts¶
- Version
- An immutable snapshot of all endpoints at a point in time. Versions are numbered sequentially (v1, v2, ...). Only draft versions can be edited; publishing freezes the version.
- Endpoint
- A single HTTP route (method + path) within a service version. Each endpoint has input/output JSON schemas, a code block reference, and configuration for auth, timeouts, and rate limiting.
- Skill
- An auto-generated tool definition produced when a version is published. Skills make endpoints discoverable by agents and workflow steps. See Skills System.
- Async Job
- A deferred execution of an endpoint. The caller receives a job ID immediately and polls for results. Jobs support priority lanes, retry policies, and cancellation. See Async Jobs.
Service Gateway URLs¶
All runtime invocations go through the Service Gateway. The URL structure follows a consistent pattern:
# Sync invocation (active version)
POST /api/v1/orgs/{org_id}/services/{service_id}/{endpoint_path}
# Sync invocation (specific version)
POST /api/v1/orgs/{org_id}/services/{service_id}/v{version}/{endpoint_path}
# Async invocation
POST /api/v1/orgs/{org_id}/services/{service_id}/async/{endpoint_path}
# Job polling
GET /api/v1/orgs/{org_id}/services/{service_id}/jobs/{job_id}
# Auto-generated docs
GET /api/v1/orgs/{org_id}/services/{service_id}/openapi.json
GET /api/v1/orgs/{org_id}/services/{service_id}/skills.json
GET /api/v1/orgs/{org_id}/services/{service_id}/docs
What's Next¶
- Creating Services -- set up your first service with the UI or SDK
- Endpoints -- define sync and async endpoints with schemas
- Skills System -- understand how endpoints become agent tools
- Async Jobs -- long-running execution with retry and polling
- Examples -- end-to-end walkthroughs