Prosights.ai
Kyberna Agent SDK
Agentic SDK · Swift · 0.9.0 · MIT

Kyberna Agent SDK

A Swift package that drives Claude Code as an agent engine over its stream-json protocol, so a Mac application gets the agent loop, tools, hooks, permissions, sessions and MCP without implementing the loop itself. It came out of building Kyberna; it is what Kyberna runs on.

Repository and README Changelog →
Which to use

Kyberna

You want an agent working in your own tools today, with a console and rules. Install the app.

The SDK

You are building a Mac or Swift application that should run an agent loop without writing the loop. Add the package.

The CLI directly

You need one-off runs from a script and no typed wire, sessions or tests. Run Claude Code as a subprocess yourself.

Capabilities
Sessions — start, resume, multi-turn, steer a running turn, interrupt, pause, stop.
Tools — in-process Swift tools served to the engine as an MCP server; typed results.
Hooks and permissions — pre- and post-tool hooks; a permission callback for every call not pre-allowed.
Typed wire — every message and control request as Codable types; unknown fields ignored.
Test kit — a fake CLI that replays recorded conversations, so tests need no network and no account.
Zero dependencies — Apple frameworks only; macOS 15 or later; Swift 6.
Get started

Add the package by URL and tag; Swift Package Manager fetches it from the repository.

dependencies: [
    .package(url: "https://github.com/prosights-ai/kyberna-agent-sdk-swift", from: "0.9.0"),
],
targets: [
    .target(name: "MyAgent", dependencies: [
        .product(name: "AgentSession", package: "kyberna-agent-sdk-swift"),
    ]),
]

The README in the repository has the first-agent example, the compatibility table for Claude Code versions, and the test kit. Languages: Swift today; Python and .NET are planned. Issues and questions: the repository's issue tracker, or info@prosights.com.