Skip to main content

Kartikeya

Skanda · Murugan — the six-faced commander of the divine armies, born to lead the devas. The engine that marshals and runs a fleet's tasks. Colloquially: Kart.

A standalone, host-agnostic task queue + sandboxed worker. Submit shell (or, optionally, LLM-workflow) tasks to a queue; a worker claims them and runs each in a bubblewrap sandbox with an explicit mount/credential/network policy.

Kartikeya is the execution engine extracted from the Willow fleet (willow-2.0/core/kart_*) and made to stand on its own — no fleet, no specific host, no required database server.

Status

Extracted and published. The sandbox/worker/execute core is fully landed (sandbox.py, worker.py, execute.py, queue.py), tested, and released on PyPI as kartikeya (0.0.9) — pip install kartikeya, or pip install willow-mcp, which floors it at >=0.0.9,<1.0.0. The cap is a real compatibility range rather than decoration: bump-minor-pre-major is false here, so a breaking change cuts 1.0.0 instead of hiding in a minor. The staged lift in docs/DESIGN.md is done through stage 4; stage 5 (willow-2.0 deleting its core/kart_* copy) is tracked in willow-mcp#111.

Design goals

  • Host-agnostic. The only coupling — "where do tasks live" — is a small TaskQueue interface a host implements. Kartikeya owns the sandbox, worker loop, lanes, and command scan; the host owns storage and file roots.
  • Zero-infra by default. Ships a reference SqliteTaskQueue, so pip install kartikeya can execute tasks with no Postgres and no fleet.
  • Backend-swappable. SQLite (bundled), Postgres, or a custom backend behind the same interface.
  • Sandboxed and network-gated. Tasks run network-isolated unless the stored task text carries a # allow_net directive; credentials reach only network- enabled tasks. (Who is allowed to write that directive is the host's call — see the security note in docs/DESIGN.md.)

Install

pip install kartikeya            # base: shell tasks, SQLite backend
pip install "kartikeya[postgres]"  # + Postgres backend helpers
pip install "kartikeya[llm]"       # + LLM-workflow task type

Quickstart

Resource caps (memory + PID limits) prefer a delegated cgroup parent. On a fresh install, run once:

kartikeya setup-cgroup    # installs ~/.config/systemd/user/kart.slice
kartikeya cgroup-status   # should print ready: /sys/fs/cgroup/...

systemd worker (operative): a shell profile export does not reach a user-service kart worker. After setup-cgroup succeeds, wire the parent into the worker environment and restart:

systemctl --user set-environment KART_CGROUP_PARENT=/sys/fs/cgroup/.../kart.slice
systemctl --user restart <your-kart-worker-unit>

(Or set Environment=KART_CGROUP_PARENT=... in a drop-in for the worker unit.)

The export line printed by setup-cgroup is for CLI / interactive runs only. Without a delegated parent, Kart falls back to task-scoped prlimit/ulimit inside the sandbox (PID cap by default; virtual-memory cap only with KART_RLIMIT_USE_AS=1). WILLOW_KART_NO_RLIMIT=1 disables caps entirely (escape hatch only).

Coming with stage 2 — once the worker core lands, this section documents kartikeya worker end to end (submit → worker runs → poll).

License

MIT © Sean Campbell

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kartikeya-0.0.11.tar.gz (84.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kartikeya-0.0.11-py3-none-any.whl (50.2 kB view details)

Uploaded Python 3

File details

Details for the file kartikeya-0.0.11.tar.gz.

File metadata

  • Download URL: kartikeya-0.0.11.tar.gz
  • Upload date:
  • Size: 84.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for kartikeya-0.0.11.tar.gz
Algorithm Hash digest
SHA256 830bf04c81a4f237e52395e1c1fcebfe39604e9ceea408d1f48fe263c3227bea
MD5 d0ebe3a0f84bb64abaf0f37a2935583a
BLAKE2b-256 04be4514f92a6a9b2c057c2de633bdd77e478192f1054a04a65f32bc3b7038a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for kartikeya-0.0.11.tar.gz:

Publisher: release.yml on willow-memory/kartikeya

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kartikeya-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: kartikeya-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 50.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for kartikeya-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 ad0e4612ed330acbbc92da498bec1d3cad4512d607f7cc45ece16271bae6b0fa
MD5 9711976bbedf1ebb57212fd3f6496178
BLAKE2b-256 2e749bf26e7e89f763ab30fbeb60dd8cab76cf06e344ccb8822971d0effcfc36

See more details on using hashes here.

Provenance

The following attestation bundles were made for kartikeya-0.0.11-py3-none-any.whl:

Publisher: release.yml on willow-memory/kartikeya

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.11 This release

2 files

0.0.10

2 files

0.0.9

2 files

0.0.7

2 files

0.0.5

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page