Source-linked AI summary

String: An Agentic OS Where Every App Is a Markdown File

Jookyung Song, Nojun Kwak, Simyung Chang

arXiv:2608.28027v1cs.AI

TL;DR

Agents currently carry tool descriptions in context even when unused, incurring repeated context and decision costs. String addresses this with SFMD documents and a runtime that exposes capabilities through partial Markdown views and a uniform /open–/act interface. Across 87 tasks and six models, String apps achieved comparable aggregate success while reducing completed-episode tokens by 33.5%, with resident interface context fixed at 53 tokens.

  • Problem

    Agent capability surfaces place schemas, manuals, and skill procedures in model context, creating repeated context costs and cognitive load that falls hardest on small models.

  • Method

    String uses SFMD executable Markdown and a runtime that exposes views and typed actions on demand through a uniform interface while managing state and execution.

  • Results

    Comparable aggregate success across six models reached 51.8% versus 50.5% with curated skills, while completed episodes used 33.5% fewer tokens and resident tool context stayed at 53 tokens.

  • Takeaways & Limitations

    Staged disclosure is consequential: wrong-action selection fell from 28% to 2%, while moving tier-2 detail one turn early cost up to 23.3 accuracy points.

  • Takeaways & Limitations

    String v0.1 is single-user, loopback-only, and unauthenticated, with signing, capabilities, audit, and permission prompts still on the roadmap.

Abstract

from arXiv · show

LLM agents have become a new class of software user, but every surface they work through was designed for someone else. Pages are built for human eyes, which can skim and ignore; tool schemas for programs, which pay nothing to carry definitions they never call. An agent has neither luxury: it re-reads, and pays again for, everything it is shown on every turn. We present String, an open-source runtime that gives this user an interface of its own and treats the job as an operating-systems problem. Tool knowledge moves out of the agent's context and into a common layer that renders it back one view at a time as Markdown. A single SFMD (String-Flavored Markdown) document declares an application's views, typed actions, navigation, and credentials, and the runtime handles discovery, validation, execution, state, and secrets behind two core verbs: /open to see and /act to do. Web and app turn out to be two renderings of one architecture: an SFMD site serves styled HTML to browsers and the raw document to agents, so one grammar reaches apps, files, shells, and the web, even legacy HTML, with no per-site integration. Views stay partial by design, and the staging is causal: disclosing one tier of detail a single turn too early costs up to 23 accuracy points, while proper staging drops wrong-action selection from 28% to 2%. Privilege follows provenance: a remote page may call HTTP but never the shell, and caller-supplied text never expands a stored secret. On an 87-task benchmark that pairs each task with curated skills, operationalizing those procedures as on-demand String apps yields comparable aggregate success across six models from frontier to small (+1.3pp) while using 33.5% fewer tokens among completed episodes, and the resident interface stays a constant 53 tokens at any catalog size. We report the design, the evaluation, and what three months of production use taught us.

1 Introduction

String proposes an operating-system layer for agents: SFMD documents expose applications through a uniform interface while the runtime conserves context by staging only needed information.

  • Motivation: String addresses capability overload by moving tool knowledge out of persistent model context and into a shared runtime layer.Existing function calling, APIs, and skill libraries repeatedly describe connected capabilities as schemas, manuals, or transcripts.
  • Core bets: The design treats SFMD as an executable document format in which a Markdown file declares views, navigation, and typed actions.Installing an app is copying its file, so authoring requires no separate toolchain.
  • Design principles: P1–P4 define String’s design: partial exposure, a uniform surface, documents as programs, and recursive rendering.Views remain addressable, all surfaces use the same interface, format errors are program bugs, and action results are rendered back as SFMD.
  • Scope: The runtime and design were developed through the paper’s design sections and stress-tested by three months of production use.The paper reports production lessons, including unfavorable ones, separately in Appendix C.

2 Design: the interface

String uses executable Markdown and a small, familiar command grammar to provide one uniform surface across apps, files, and the web while keeping views deliberately partial.

  • 2.1 SFMD: executable Markdown as apps: SFMD adds six CommonMark-compatible constructs for app identity, addressable blocks, navigation, shortcuts, actions, and variables.Each construct maps onto an existing Markdown production, so SFMD files still render in ordinary viewers.
  • 2.1 SFMD: executable Markdown as apps: Action blocks declare HTTP or CLI verbs, endpoints or shell templates, and typed parameters, while response templates reshape results into Markdown.Response templates can turn long identifiers into short navigable addresses such as @post-3.
  • 2.2 Nothing new to learn: a near-zero learning curve: String exposes plain Markdown and Unix-like slash commands so agents need only a small familiar grammar rather than a new notation.The resident stub names the grammar, including /open and /act, without teaching it in full.
  • 2.2 Nothing new to learn: a near-zero learning curve: Web and app are two renderings of one SFMD artifact: browsers receive styled HTML, while agents receive raw SFMD through a parallel URL or content negotiation.The same surface also handles ordinary legacy HTML pages without per-site grammar or HTML/CSS filtering.
  • 2.2 Nothing new to learn: a near-zero learning curve: Discovery is on demand: /act –help reveals schemas, responses provide next: hints, and errors name recovery commands.This makes information scent explicit without keeping all action details resident.
  • 2.3 Partial exposure as the rendering discipline: Partial exposure hides URLs, schemas, long lists, and unnecessary regions behind addresses while bounding menus and mutation diffs.Action output is re-parsed as SFMD, allowing result links to become navigable shortcuts under the same grammar.

3 Runtime: state, trust, and execution

String organizes state and privilege around named topics and document provenance, keeping secrets out of model-controlled arguments while providing OS-like services through one runtime.

  • State and privilege: Named topics scope state and privilege across tabs, app sessions, bash PTYs, and management hubs.Filesystem listing is restricted to tabs, secrets to app scope, and the daemon serializes commands per topic.
  • Trust model: Privilege follows document provenance: local files and installed apps may run CLI actions, whereas remote SFMD may invoke HTTP actions only.Link-installed content remains remote and cannot reach the shell.
  • Secrets: Credentials remain in a restricted per-app store, and caller-supplied values cannot resolve stored variables in command arguments.The runtime rejects any variable appearing in a command argument to prevent injected instructions from exfiltrating keys.
  • OS services: String supplies OS-like services—including persistent shells, event inboxes, guarded editing, credential storage, and atomic document packages—through one grammar.Agent-to-agent messaging can use curl between inboxes because the services share the same interface.
  • Implementation: String is implemented as about 17.8k lines of TypeScript across parser, compiler, daemon-client, and runtime packages.The daemon binds to loopback, with a documented boundary of the same host and operating-system user.

4 Evaluation

Across 87 practitioner tasks and six models, String apps matched curated-skill success while reducing token use, with fixed residency and staged disclosure improving efficiency and action selection.

  • Task success and token economy: 51.8% versus 50.5% average success, compared with 33.3% without skills, with equal or higher observed success on five of six models.The comparison used 87 tasks across eight domains, each paired with curated skills.
  • Task success and token economy: 33.5% fewer tokens were used among completed episodes across models ranging from GPT-5.5 to Haiku 4.5.The consistency across model families suggests the savings were not specific to one model.
  • Where the differences come from: String reduced a representative procedure from 13 tool calls assembling a toolchain to 2 calls invoking a declared action.String also incorporated discovery into reading the rendered environment instead of requiring a separate retrieval decision.
  • Residency under tool scale: 53 resident tokens remained constant for String across 100 OpenAPI services, versus 103,518 for full schemas and 3,291 for a one-line index.The full-schema baseline exceeded a 200k context window near 190 apps; actual execution reduced tokens by 93.5% for Sonnet 4.6 and 91.8% for Haiku 4.5.
  • Staging is causal, not just economical: Adding three-tier staging improved dispatch accuracy by 10–37 points across six model-by-scale cells and reduced wrong-action selection from 28% to 2%.Moving tier-2 detail one turn early reduced accuracy by 11.6 points on Sonnet and 23.3 on Haiku, with 95% confidence intervals excluding zero.
  • Co-design: the interface as a training target: Fine-tuning four open-weight models on production trajectories improved success on three models and cut generated tokens by 51.9–78.9% on 20 held-out tasks.The result suggests the OS-layer interface can provide a stable training target across model families.
  • Threats to validity: The evaluation is internal, compares end-to-end systems rather than isolating packaging from rendering, and reports token reductions only among completed episodes.Replication requires the released benchmark tasks, OpenHands harness, runtime, and apps; author-written ports are auditable pair by pair.

5 Related work

String is positioned against standardized tool interfaces, retrieval, skill libraries, and agent–computer interfaces by moving capability description into a rendered page.

  • Related work: Existing tool interfaces standardize capability connection but leave descriptions resident, while retrieval shrinks residency without replacing the schema contract.Skill libraries package procedures but assume an execution environment; prior agent–computer-interface work shows that the interface itself affects performance.

6 Limitations and conclusion

The conclusion frames String as a rendering discipline that exposes procedural knowledge through a partial, uniform interface while reducing interface context and token use.

  • Limitations and conclusion: String v0.1 is single-user, loopback-only, and unauthenticated, with signing, capabilities, audit, and permission prompts still planned.The paper concludes that String matches curated-skill benefits while cutting tokens by a third and reducing always-resident context from 103,518 tokens to 53.

A Command reference

The command reference organizes String around navigation, actions, state, editing, shell access, packages, and events.

  • Navigation: Navigation uses /open, /back, /refresh, /close, /nav, /ls, /info, /source, and /help.Targets may be paths, URLs, shortcuts, apps, hubs, or blocks.
  • Actions: Actions use /act, /act.<id>, and /tool:<name>[.<act>] with flags, positional arguments, shortcuts, and help.The action interface supports both named actions and tool-specific actions.
  • State: State is managed with /set for variables, including persistent app-topic variables and fenced multiline forms.The reference distinguishes session-style variables from $VAR forms for app topics.
  • Editing: Editing provides /edit, /write, /append, /replace, /verify, and checksum-guarded per-topic /undo.Replacement can target exact matches, all matches, blocks, or line ranges.
  • Shell: Shell access uses stateless /exec or persistent PTY topics named bash:<name>.The two forms distinguish one-off execution from persistent shell sessions.
  • Packages and events: Packages are installed with /install, while events are inspected and managed through /events, /events.read, /events.ack, and /events.clear.Installation supports app or tool modes, aliases, links, and path, URL, or GitHub sources.

B Worked transcript

The worked transcript shows an agent installing a String app, opening its partial Markdown view, and invoking a typed action through runtime-rendered replies.

  • The transcript separates agent-written command lines from runtime-rendered replies enclosed in context frames.
  • The runtime reports installation by copying the weather app and exposes its local package path.
  • Opening the app returns a partial Markdown view with named actions and an /act help entry.
  • The agent invokes the current-weather action with latitude and longitude arguments and receives formatted conditions.

C Deployment lessons

Three months of production use across 41 public apps exposed shell-heavy adoption, the need for provenance-based trust boundaries, and silent parameter loss as a critical failure mode.

  • 41 public apps produced 151 CLI actions versus 49 HTTP actions, making shell support central to String’s agentic OS.
  • Silent parameter loss caused no crash but removed author-declared flags, amounting to quiet miscompilation when documents are programs.
  • Provenance makes the trust boundary legible: local files may shell, whereas remote pages may invoke HTTP but not the shell.
  • Figure 2 contrasts styled HTML for humans with partial Markdown for agents from the same SFMD page.

D Porting example: a skill and its String app

The porting example converts a procedural PDF skill into a String app while preserving its operation set, exposing procedures as declared actions instead of requiring agents to retype implementation code.

  • The transformation preserves task-level operations without adding or removing operations or introducing task-level hints.
  • The original PDF skill is a 295-line guide with companion documents covering libraries, command-line tools, and sample code.
  • The String app turns the skill’s operations into declared actions such as extract_text, extract_tables, metadata, and OCR.
  • Agents call /act.extract_tables rather than reimplementing PDF code, while interpreter details and argument plumbing remain outside context.
  • The port preserves all operations: seven bundled scripts remain unchanged, while ten sample-code operations are collected into one script.

E Small-model fine-tuning detail

Fine-tuning four open-weight models on production trajectories was evaluated on 20 held-out tasks, with success improving for three models and token use falling across every row. The study frames this as initial evidence that String’s stable interface can be learned across model families and scales.

  • Setup: Four open-weight models were fine-tuned on production trajectories and evaluated before and after on the same 20 held-out tasks.The models were Qwen3.5-4B, Qwen3.6-27B, Gemma 4-E4B, and Gemma 4-31B.
  • Setup: The held-out set included String apps absent from training trajectories, testing whether models learned the grammar rather than memorized an app.
  • Results: Qwen3.5-4B improved from 12/20 to 14/20 solved, Gemma 4-E4B from 13/20 to 16/20, and Gemma 4-31B from 16/20 to 18/20.Qwen3.6-27B remained at 17/20.
  • Results: Tokens per task fell by half to four-fifths in every model row, including the row where success did not improve.The fine-tuned models reduced exploratory opens, malformed commands, and retries by navigating directly to the acting command.
  • Scope: The study is an initial proof of concept because success on 20 tasks resolves only to 5pp and all models were trained on trajectories from one deployment.The authors plan larger trajectory and held-out sets plus standard benchmarks to test generalization beyond their deployment.
Loading 2608.28027v1…