Data is the API
An app keeps its shared data in collections of JSON records. Your agent reads and writes them withsummer_app_data, with no app open. Every write is one revision, and everyone with the app open sees it live.
Read (no ops):
{ revision, records, next, collections, declaredCollections }. Leave out collection to read every collection. limit is 1 to 500 (default 200); pass next as after for the next page. Removed records are not returned. declaredCollections is the record shape the app declares in its manifest (collections). That is how an agent asked to “add a note” knows what a note looks like.
Write (one revision, applied in order):
{ revision, operation, records, replayed }.
- 1 to 100 ops per call. A record is JSON up to 64 KB. Record ids: letters, digits and
_ . : -, max 128 characters. putcreates or replaces.patchmerges keys (nullremoves a key).removedeletes.- A record’s
revisionis the app’s data revision at the record’s last write: one counter for the whole app, not one per record.ifRevisionapplies an op only if the record is still at that revision. Take it from the record’srevisionin your last read.0means “only if it does not exist yet”. A mismatch fails the call withconflict: read again and retry. - Your writes are recorded with
actor.kind: "agent"and your agent’s name, and ascreatedByon records you create. The app can show which rows an agent made. "as": "seed"writes starter data that belongs to the team:kind: "seed", shown with no author. Use it to fill a new app.
Agent tools
An app can give agents its own logic, for example a balance formula. It declares the tools in its manifest (agentTools) and handles them in its code:
agent is the name of the agent that called. Data writes made while the handler runs are recorded with actor.kind: "agent" and via: "agent-tool". Return JSON under 100 KB; a throw becomes tool_failed.
Your agent lists the tools with summer_app_tools ({ appId, version, tools, collections }) and runs one with summer_app_call:
{ ok: true, result, seq }. The call runs inside the app open in the person’s Studio tab, with their rights, and waits up to 60 seconds. If the app is not open, the answer is app_not_open: use summer_app_data, or ask the person to open the app.
Use data for plain reads and edits. Use a tool for logic that lives in the app.
Events: the app talks back
An app sends events to your agent withsummer.agent.send(name, payload), for example when the person presses “Send to agent”. Your agent waits for them with summer_app_events:
{ events, cursor, timedOut }. Each event is { seq, kind, actorId, payload, createdAt }. Pass cursor as after in the next call. timeoutSeconds (0 to 50, default 25) is how long the call waits for the first new event.
The page an agent can use
An app declares its inputs and buttons withsummer.page.declare (see the SDK reference). While the app is open, summer_app_page reads them (no fill, no press), fills fields ("fill": [{ "field": "<id>", "value": 12 }]) and presses a button ("press": "<action id>"). Buttons marked critical (delete, publish, pay, send) are pressed only by the person. If the app is not open, the answer is app_not_open.
The MCP tools
The hosted Summer Engine MCP (https://mcp.summerengine.com/mcp) and the summer-engine npm package have the same summer_app_* tools, except summer_app_dock, which is only in the npm package and comes with the next Summer Engine update.
All of them except
summer_app_call (which can run a tool that generates) are free.
Skills
The Summer skill library has two skills for apps:summer-apps (when to build an app, layout or code, the build loop, data, tools and events) and summer-apps-design (how an app must look). The npm package installs them with the rest of the library.
