Skip to main content

Auto-discover repetitive tasks in your AI agent and transparently replace them with small, specialized, locally-trained models.

Project description

sploink

Auto-discover the repetitive tasks inside your AI agent, and transparently replace the expensive ones with small, specialized models trained on your own real traffic.

Status: Early. The connect/discover/route mechanism works locally, end to end, against Ollama and a local mlx_lm.server on Apple Silicon. No hosted version yet, no Linux/cloud GPU training path yet.

Why

Most of what an AI agent does day to day is the same narrow, repetitive task, over and over -- classify this, check that, draft a reply -- but every call goes to one expensive, general-purpose model regardless of whether the task actually needs that much capability. sploink finds those narrow tasks automatically, from your agent's real traffic, and lets you train a small local model specifically for one of them -- then transparently routes future calls to it, with no changes to your agent's code beyond one line.

Install

# Core install -- just the connect/discover/route layer
pip install sploink

# With local LoRA training support (Apple Silicon only, via mlx_lm):
pip install "sploink[train]"

Quickstart

The only integration line you ever write, regardless of what else you do:

import sploink
sploink.init(account_id="your_account")

# ...the rest of your existing agent code, completely unchanged...

This patches the OpenAI-compatible client your agent already uses. From that point on:

  • Every call gets logged.
  • The real tools=[...] schema on each call is read to discover the distinct tasks your agent actually performs -- no source-code parsing, works with any framework built on the openai Python SDK against an OpenAI-compatible backend.
  • If a task already has a trained adapter, matching calls are transparently routed to it instead of the generalist -- including bundled, multi-tool ReAct-style calls, split into a cheap "which tool" decision and a routed "what arguments" call under the hood.

Training a task (requires the train extra):

adapter_path = sploink.create_lora_adapter(
    task_name="classify_expense",
    system_prompt="...",
    train_examples=[(text, {"category": ..., "amount": ...}), ...],
    valid_examples=[...],
)

Once trained, the very next real call for that task routes to it automatically -- no further code change.

What this isn't (yet)

  • No hosted/cloud version -- everything here runs on your own machine.
  • No Linux or non-Apple-Silicon training path (mlx_lm is Mac-only).
  • No automatic quality gating before a newly trained adapter starts serving real traffic -- that's on the roadmap, not yet built.

Project details


Download files

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

Source Distribution

sploink-0.2.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

sploink-0.2.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file sploink-0.2.0.tar.gz.

File metadata

  • Download URL: sploink-0.2.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sploink-0.2.0.tar.gz
Algorithm Hash digest
SHA256 86cba81b9e3d3d19e336931b42b6d233255637507de23b317d26d395fd9fe463
MD5 36901c64b78149fe85b39a8554eb4213
BLAKE2b-256 30835c964af81d24cce851cacb709fd2314638ec14f9e6466de1065273b6b354

See more details on using hashes here.

File details

Details for the file sploink-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sploink-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sploink-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0609b063944745144bdc411502484ad701d083b13446f140b35e425fdbaff024
MD5 9ee981ab335bbd3948d6d76c2cc0c69a
BLAKE2b-256 ad3b7e46950879cd1d421c7862a4e8fc9c0d28d3ef9cd52491db918d81c5cb76

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page