Skip to content
AGENT SDK · OPEN-SOURCE

Code your agent. Keep your runtime.

A TypeScript SDK. Apache-2.0 local runtime. Your AI provider keys. Walk away anytime.

28 AI providers. Local or cloud. Same Agent and Run API across both.

  • 28LLM providers
  • 8Streaming event types
  • 5MCP precedence sources
  • Local + CloudRuntimes
  • TypeScript-strictAPI
  • Apache-2.0License
$ npm install @theokit/sdk

There is a version of your agent that doesn't sit in a chat window. You don't open a panel. You don't type a prompt. You commit code, and the agent runs — the same way every other piece of your stack runs. That agent is built with `@theokit/sdk` — and when you decide to leave, the runtime leaves with you.

What you get

Concretely, what ships.

An agent in your CI

Wire it into a workflow, hand it the diff, get a PR description back. Runs inline against the working tree.

An agent on a schedule

A cron expression and a prompt — runs every morning, every commit, every Friday at 5. POSIX cron with IANA timezones.

An agent in your backend

Stream events into a WebSocket, surface tool calls to your UI, retain conversation across turns.

Your provider, your keys

Multi-provider underneath — Anthropic, OpenAI, Google. Local agents run end-to-end against your keys.

No lock-in by design

SDK Apache-2.0. Local runtime Apache-2.0. Cloud opt-in. Walk-away cost zero.

Feel it
typescript
import { Agent } from "@theokit/sdk";

const agent = await Agent.create({
  apiKey: process.env.THEOKIT_API_KEY!,
  model: { id: "composer-2" },
  local: { cwd: process.cwd() },
});

const run = await agent.send("Summarize what this repository does");
for await (const event of run.stream()) {
  if (event.type === "assistant") console.log(event.message.content);
}

One file. Local runtime. Streaming events. Same shape on the cloud.

What you'd ship

Things you would actually build.

  • 01PR description writer. Triggered on push, scans the diff, drafts the description.
  • 02Nightly code reviewer. Runs at 2 AM, opens issues for code smells.
  • 03Internal codebase Q&A. A Slack bot that knows your repo.
  • 04Customer support copilot. Embedded in your dashboard.
  • 05CI gate. Reject PRs that fail a quality check expressed as an agent prompt.
  • 06Sandbox runner. One agent per user request, isolated by repo.
Why TheoKit-SDK

How it compares.

The agent SDK shape is converging across the ecosystem — Agent, Run, streaming events look the same whether you reach for Claude's SDK, Cursor's SDK, or this one. The difference is what runs underneath.

Capability@theokit/sdkClaude Agent SDKCursor SDKVercel AI SDK
SDK sourceApache-2.0OpenProprietaryOpen (MIT)
Local agent runtimeApache-2.0 (via pi/)Anthropic-hostedCursor-hostedCaller-provided
LLM providerMulti-provider — bring your own keysAnthropic-onlyOpenAI + Anthropic (vendor-routed)Multi (caller wraps)
Cloud runtimeOpt-in (self-host or TheoCloud)Anthropic cloud onlyCursor cloud onlyCaller-hosted
Walk-away costZero — fork the runtime, keep shippingTied to AnthropicTied to CursorLow (you already host)

Most agent SDKs ship open; most agent runtimes don't. This one does — end to end, real runtime not vendor cloud.

Why now

The SDK shape is converging — Agent, Run, streaming events look the same everywhere. The next fight is about which runtime sits underneath. We made ours Apache-2.0.

Status

Honest claims only.

  • Local runtime — the tested path. Multi-provider, MCP precedence, subagents, hooks, async resource management, typed errors.
  • Cloud runtime — backed by TheoCloud.
  • Memory & Skills — public contract locked in docs.md. Runtime implementation expands with the contract.

Code your agent. Keep your runtime.

$ npm install @theokit/sdk

Read the docs → github.com/usetheodev/theokit-sdk

Want managed runtime? theo login