AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

AgentRunKit

mcp-tom-ryder-agentrunkit · by Tom-Ryder

Swift 6 agent SDK: type-safe tools, streaming, cloud + on-device inference via MLX on Apple Silicon

No reviews yet
0 installs
15 views
0.0% view→install

Install

$ agentstack add mcp-tom-ryder-agentrunkit

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-tom-ryder-agentrunkit)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of AgentRunKit? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

AgentRunKit

A Swift 6 SDK for building LLM-powered agents with type-safe tool calling.

Zero-dependency core · Full Sendable · Async/await · Cloud + Local · MCP


Quick Start

import AgentRunKit

let client = OpenAIClient.openAI(apiKey: "sk-...", model: "gpt-5.4")

let weatherTool = try Tool(
    name: "get_weather",
    description: "Get the current weather"
) { params, _ in
    "72°F and sunny in \(params.city)"
}

let agent = Agent(client: client, tools: [weatherTool])
let result = try await agent.run(userMessage: "What's the weather in SF?", context: EmptyContext())
if let content = result.content {
    print(content)
}

result.content is optional. Completed runs return finish-tool content, while structural terminal reasons such as max iterations or token budget exhaustion surface through result.finishReason with no final content.


Documentation

Full documentation including guides and API reference is available on Swift Package Index.


Runnable Example

Examples/AgentCode is an interactive terminal coding agent built with AgentRunKit. It demonstrates the full agent loop in a local workspace: streaming events, type-safe tools, approval-gated edits and command execution, bounded file access, transcript export, and deterministic offline mode.

cd Examples/AgentCode
swift run agent-code

By default it opens a bundled broken Swift package so you can ask it to fix failing tests. Set OPENAI_API_KEY for a live OpenAI-compatible provider, or run without a key to exercise the CLI with the offline test client.


Installation

Add to your Package.swift:

dependencies: [
    .package(url: "https://github.com/Tom-Ryder/AgentRunKit.git", from: "5.3.0")
]
.target(name: "YourApp", dependencies: ["AgentRunKit"])

For on-device inference, additional targets are available:

  • AgentRunKitMLX for MLX on Apple Silicon (links mlx-swift-lm)
  • AgentRunKitFoundationModels for Apple Foundation Models (iOS 26+ and macOS 26+, no external dependencies)

Features

  • Agent loop with configurable iteration limits and token budgets
  • Streaming with AsyncThrowingStream and @Observable SwiftUI wrapper
  • Type-safe tools with compile-time JSON schema validation
  • Sub-agent composition with depth control and streaming propagation
  • Context management: automatic compaction, pruning, token budgets
  • Checkpoint and resume: per-iteration snapshots, file or in-memory backends
  • Tool approval: human-in-the-loop policies with session allowlists
  • Structured output with JSON schema constraints
  • Multimodal input: images, audio, video, PDF
  • Text-to-speech with concurrent chunking and MP3 concatenation
  • MCP client: stdio transport, tool discovery, JSON-RPC
  • Extended thinking / reasoning model support

Providers

| Provider | Description | |----------|-------------| | OpenAIClient | OpenAI and compatible APIs (OpenRouter with reasoning replay, Groq, Together, Ollama) | | AnthropicClient | Anthropic Messages API with same-substrate continuity replay | | GeminiClient | Google Gemini API | | VertexAnthropicClient | Anthropic models on Google Vertex AI with same-substrate continuity replay | | VertexGoogleClient | Google models on Vertex AI | | ResponsesAPIClient | OpenAI Responses API with same-substrate continuity replay and OpenRouter factory | | FoundationModelsClient | Apple on-device (macOS 26+ / iOS 26+) | | MLXClient | On-device via MLX on Apple Silicon |


Requirements

| Platform | Version | |----------|---------| | iOS | 18.0+ | | macOS | 15.0+ | | Swift | 6.0+ | | Xcode | 26+ for local development and CI |


License

MIT License. See [LICENSE](LICENSE) for details.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.