I’ve been coding up my own app on my iPhone. It’s just for me to make things work the way I like.
So far I’ve mostly been using reminders and music, where I have been able to get it to do smart list based off of emoji.
But there’s a few places where I’m already starting to see it would be nice to be able to store tech snippets for different categories. Like snippets of prompts or lists of tasks that I can add in bulk.
Is it possible for other apps on the iPhone to reach into drafts and use it as a kind of persistent library?
Apps on iOS are rather thoroughly sandboxes and cannot access data from other apps in any direct way. Drafts provides integration points through URL schemes and Shortcuts (see docs), but there are not ways to program direct integration.
It’s a shame that the sandboxing is that severe. That seems like an architectural choice that’s going to hold back things like AI agents on the platform.
Not at all. Agentic architectures are offering up services by their definition, not direct hooks to take over control. You pass the agent the data payload and it takes car of everything for you.
Could you expand on that distinction? I don’t understand how drafts could be a useful repository of prompts or templates to an agent but not let my code read and write to drafts.
Okay, so based on that question, what you seem to be asking for is for your agent to be able to access Drafts as a data source.
I would suggest that the way an agentic architecture would work is that your AI asks a Drafts agent or service for the data, and then passes or shares that data to the agent you want to process it. The Model Context Protocol (MCP) sets out some standards that could be applied to intermediate this without having to get bogged down in custom integrations for every possible AI or integration.
Rather than directly reading data, you ask Drafts what data it can provide in what format, Drafts responds with what it can offer, you then request the requisite data based on your needs, then Drafts provides it in the described format, then you transform and filter the data to meet the needs of your agent (if any transformation or filtering is required).
It’s also worth pointing out that if Apple ends up releasing the agentic AI features in Siri they’ve been talking about for a while, they made it clear they would be powered by App Intents, which are basically the Shortcuts actions that an app makes available. Drafts has a super extensive set of those, so I expect it to work from day one.
For your own app, I’d look into the callback URIs mentioned earlier, they will let you both read and write from/to Drafts from your app, albeit a bit indirectly, but for personal use that should be more than sufficient.