# Runtype Sdk Marathon

> Use when working with the Runtype TypeScript or Python SDK, FlowBuilder, BatchBuilder, EvalBuilder, CLI commands, Marathon long-running agent tasks, playbooks, model fallback, built-in CLI tools, sandboxes, code-first stored/upsert/virtual agents or flows, local tools, hidden parameters, or source-controlled Runtype workflows.

- Skill: `hashgraph-online-awesome-codex-plugins/runtype-sdk-marathon` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add hashgraph-online-awesome-codex-plugins/runtype-sdk-marathon`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hashgraph-online-awesome-codex-plugins/runtype-sdk-marathon/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: hashgraph-online (https://skillmd.com/u/hashgraph-online-awesome-codex-plugins)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/hashgraph-online-awesome-codex-plugins/runtype-sdk-marathon

---


# Runtype SDK And Marathon

Use this skill for code-first Runtype workflows, the CLI, and Marathon. Use
`runtype-build-product` when the user is designing hosted product resources through MCP.

## SDK Guidance

Fetch live docs when available:

- `get_platform_documentation(topic="sdk-reference")`
- `get_platform_documentation(topic="types-flow-steps")`
- `get_platform_documentation(topic="types-entities")`
- `get_platform_documentation(topic="flow-step-types")`

Code-first modes:

- Stored: create persistent agents/flows in Runtype.
- Upsert on execute: code is the source of truth and overwrites the Runtype copy when run.
- Virtual: the definition is supplied per execution without creating a saved agent/flow.
  Execution logs, traces, and retention policies still apply; this is not a zero-retention mode.

Default to stored or upsert for production workflows because dashboard inspection, logs,
evals, and versioning are easier. Use virtual for tests, one-offs, or temporary generated flows; verify retention separately
for privacy-sensitive workloads.

Use local tools when execution must happen in the user's browser or server. Use hidden
parameters when auth context, tenant ids, or sensitive request data must not appear in the
model-visible tool schema.

## CLI Setup

Install or run directly:

```bash
npm install -g @runtypelabs/cli
npx @runtypelabs/cli@latest <command>
```

Check auth before changing it:

```bash
runtype auth status
```

That checks stored login/signup state only. If `RUNTYPE_API_KEY` is configured, verify
it with `runtype auth whoami --no-tty` instead and reuse that account. Otherwise reuse
a stored authenticated account; for a pending signup follow its `next` command. New
accounts use `runtype auth register --email <email>` then `runtype auth verify <code>`.
Browser-only `runtype auth login` requires the user's interactive terminal, not a coding
harness. For existing-account or installation recovery, follow
`https://runtype.ai/.well-known/agent.md`. Never ask for API keys in chat; have the user
configure credentials privately. `RUNTYPE_API_KEY` authenticates CLI commands in CI.

Common commands include `runtype agents list`, `runtype dispatch`, `runtype flows create`,
`runtype records create`, `runtype schedules`, `runtype models`, `runtype batch`,
`runtype eval`, `runtype persona`, `runtype products init`, and
`runtype validate-product`.

For command flags not listed here, run `runtype --help` or
`runtype marathon --help` instead of expanding this skill with CLI reference text.

## Marathon

Marathon is the CLI harness for long-running research, code editing, and build tasks. It
streams progress, can run multiple sessions, manages continuation context, supports
playbooks, and can use sandboxes.

Examples:

```bash
runtype marathon researcher \
  --goal "Research recent AI announcements and summarize them" \
  --tools firecrawl \
  --max-sessions 2

runtype marathon "Code Editor" \
  --goal "Refactor the auth module and run tests"

runtype marathon calculator \
  --goal "Build a calculator in 3D and deploy it publicly" \
  --sandbox daytona
```

Built-in CLI tools exposed by `--tools` include `exa`, `firecrawl`, and `dalle`. The CLI
validates requested tool ids and model compatibility at startup.

## Playbooks

Playbooks live in `.runtype/marathons/playbooks/` in the current repo or the user's home
directory. Use them for repeatable workflows with milestones, models, fallback models,
completion criteria, and rules.

Use playbooks when the task has durable phases such as research, build, verify, and
polish. Keep rules explicit about file scope, verification, and deployment expectations.

If the umbrella `runtype` skill is installed alongside this focused skill, its durable
references provide deeper working-mode guidance. This skill must still work when
installed by itself; prefer live MCP docs over local sibling files.

