Skip to content

String

String is an operating system for AI.

It sits on top of existing operating systems and the web, giving AI agents a single, consistent interface to the outside world — apps, documents, websites, APIs, and files.

AI reads everything as Markdown. AI acts through a handful of commands. That’s the entire interface.


Context is text. String presents all content as text, preferring Markdown — the format AI understands best. SFMD (String Flavored Markdown) adds lightweight extensions for navigation, block addressing, and actions while remaining 100% CommonMark compatible.

Actions are commands. Two primitives cover nearly everything:

  • /open — see something (a document, a page, a block, a shortcut)
  • /act — do something (call an API, run a workflow, submit data)

New capabilities come from new documents, not new commands.


If String is an operating environment, the part that’s actually standardized is small enough to list. Think of it as the syscall surface an agent reaches for, regardless of which underlying resource it is talking to.

SurfaceWhat it standardizesPrimary primitives
Navigationhow an agent moves between documents, pages, and blocks/open, /back, /nav, [!nav:], [@shortcut]
Action invocationhow an agent calls a capability/act.<name>, action blocks, typed args, /act.<name> --help
State scopingwhat is remembered, where, and for how longtopics (tab, app:, bash:, hub), session vars, env scopes
Output framinghow the agent recognizes its own results<𝒞=string:topic>…</𝒞> markers around every payload
Editing semanticshow an agent writes back to the world/write, /append, /replace, /edit, /undo, /verify, text/line/block edits
Trust and permissionswhat an agent is allowed to runaction allowlist, --allow-shell, [!requirements], signed packages (v0.2)
Recovery and error hintshow an agent knows what to do when things breaktyped error codes, missing-env hints, /info diagnostics, meta.warnings

Every resource type — a local document, an installed app, a remote URL, a shell session — exposes some subset of these surfaces with the same verbs. An agent that learns String once can read a doc, drive an app, browse the web, and edit a file without re-learning a new interface for each domain.

That’s why the runtime feels OS-shaped from the inside, even though externally the right framing is closer to a universal surface for agent work — see string-os.org.


#DocumentWhat it covers
1Why StringThe problem, the vision, and why AI needs its own OS
2The ModelContext hierarchy, SFMD principles, command surface
3The AI LoopHow an AI agent discovers, navigates, and acts
4TopicsSessions, typed topics (tab, app, bash, hub)
5ActionsAction definition, invocation, response templates
6StateVariables, secrets, session state, configuration
7Navigation/open, /nav, menus, shortcuts, history
8AuthoringHow to write SFMD documents
9EditingCreating and modifying documents through String
10EventsLocal webhooks and the agent event inbox
11ErrorsError codes, format, and handling
12TransportChanFlow channel tags, AI ↔ String communication
13Response FormatResponse structure and formatting
14Tools/tool invocation, cmd blocks, tool vs app
15Packages/install, /uninstall, registry, multi-file apps, namespace identity
16Install ManifestJSON contract for HTTP-source installs

Practical, scenario-based guides showing AI using String end-to-end. Each guide is a real AI↔String conversation using channel tags. The cookbook lives in its own repository: string-os/cookbook.

#GuideScenario
1WeatherSimplest example, end to end. Start here.
2AnatomyThe weather app dissected — why it’s shaped this way.
3CompareMCP, function calling, and a String app — compared.
4Client LibraryThe @string-os/client API and the single-tool pattern.
5Porting (Nano Banana Pro)Porting the Gemini Image API into a String app, end to end.