Put coding agents inside your own product
The Hoplite Platform API runs the agent, its isolated workspace, the live preview and the build. Your product keeps its users, its interface and the decision to publish. Send a prompt from your backend and follow every step as an event.
What is a coding agent API?
A coding agent API lets your software, rather than a person in a chat window, hand work to a coding agent: start it with a prompt, watch its progress and collect what it produced. It is how you build an AI editor, site builder or internal tool without running the agent infrastructure yourself.
Hoplite's Platform API is organised around apps, one per customer site or workspace in your product. Every source, thread, draft, preview and build lives inside an app, so you can build a website editor without creating a GitHub repository for each customer.
Versions that never change underneath you
A source is an immutable bundle of files. Import your starter files, and every completed run returns a resultSourceId for its output that stays valid after later edits. A failed run keeps the previous successful source, and source versions outlive the sandboxes that made them.
Parallel edits, merged in order
Each editing thread starts from a source and owns an isolated workspace, so threads run at the same time. Applying a draft to the app head is serialized per app: independent edits merge automatically, and conflicts go to an agent repair by default, or back to you to resolve.
Live previews inside your dashboard
Start a preview for an editing thread and relay it through your own authenticated gateway, over HTTP and WebSocket, with a five-minute credential your backend refreshes. Hoplite routes to the sandbox, restores saved source when a runtime has expired and limits framing to your dashboard's origin.
Builds you publish on your terms
Build a pinned source with your own command in a separate scratch sandbox. A ready build gives you a gzip tar artifact, a manifest of file hashes and sizes, and the saved logs. Store it, run your QA and publish when your product says so. Hoplite never deploys it for you.
Your own agent stack vs. the Platform API
| Question | Building your own agent infrastructure | Hoplite Platform API |
|---|---|---|
| Agent runtime | You host and operate the agent loop | Send a prompt; Hoplite runs the agent |
| Workspaces | Provision and clean up sandboxes yourself | An isolated workspace per thread, archived when idle and restored from saved source |
| Versions | Design your own snapshot storage | Immutable sources, one per completed run |
| Concurrent edits | Write your own merge logic | Applies serialized per app, with agent repair or manual resolution |
| Previews | Run and proxy dev servers yourself | Authenticated previews relayed through your gateway |
| Progress | Poll a job table you maintain | A durable event feed with a live stream and replay |
| Retries | Deduplicate requests by hand | An Idempotency-Key on every write |
Platform API, answered
- How do I get access?
- The Platform API is enabled per organization. Email support@hoplite.sh with your workspace name and workspace ID, both under Settings → Workspace → General, and a short description of what you are building. Until then, every Platform request answers 403 with platform_api_not_enabled and changes nothing.
- Is the Platform API stable?
- Not yet: the Platform contract is currently a release candidate, so it may still change before it's final. Use the API base URL for the environment where this version is deployed.
- How is it different from Hoplite's Direct API?
- The Direct API automates Hoplite's existing product. The Platform API gives your product a source-based workflow built around apps. Apps and their threads are managed only through the Platform API and don't appear in Hoplite's project and thread lists.
- Do my customers need GitHub repositories?
- No. You import files as sources and read the results back as files, so you can build a website editor without creating a GitHub repository for each customer.
- How do I follow progress without polling?
- Open the event stream for one app or for all of them. It is a server-sent event stream with replay from a saved cursor, and with a thread filter it also streams the assistant's in-progress reply. Events are kept for seven days.
- Does Hoplite host the apps my customers build?
- No. Hoplite builds a pinned source and hands you the artifact, its manifest and its logs. You store it, run your own QA and publish it on your own infrastructure.
- What credentials and limits apply?
- A server-side service account with Projects and Threads set to Write. Keep its key on your backend. Every write needs an Idempotency-Key, and each credential has 600 requests per 60 seconds; an open event stream counts as one.
- Is there an example to start from?
- Yes. Site Studio is a runnable reference application with a preview gateway, published under the MIT licence. Its README maps each Platform concept to the code that uses it.
Build your editor on Hoplite's agents
Email support@hoplite.sh to have the Platform API enabled for your workspace, then follow the quickstart from your first app to a downloaded build.