Skip to main content

Pluggable skills for AI agents

Project description


SkillPacks

Pluggable skillsets for AI agents
Explore the docs »

View Demo · Report Bug · Request Feature

Skillpacks provide a means of fine tuning agents on tools, and the ability to hotswap learned skills at inference time.

Teach a model how to use a website | code base | API | database | application | ...   then swap in that learned layer the moment you need it.

Install

pip install skillpacks

Quick Start

Create an episode to record agent events

from skillpacks import Episode

episode = Episode(remote="https://foo.bar")

Take an action

from mllm import Router, RoleThread
from skillpacks import V1Action, V1EnvState
from agentdesk import Desktop

router = Router.from_env()
desktop = Desktop.local()

thread = RoleThread()
msg = f"""
I need to open Google to search, your available action are {desktop.json_schema()}
please return your selection as {V1Action.model_json_schema()}
"""
thread.post(role="user", msg=msg)

response = router.chat(thread, expect=V1Action)
v1action = response.parsed

action = desktop.find_action(name=v1action.name)
result = desktop.use(action, **v1action.parameters)

Record the action in the episode

event = episode.record(
    state=V1EnvState(),
    prompt=response.prompt,
    action=v1action,
    tool=desktop.ref(),
    result=result,
)

Mark actions as approved

# approve one
episode.approve_one(event.id)

# approve the event and all actions prior to it
episode.approve_prior(event.id)

# approve all
episode.approve_all()

Get all approved actions in an episode

episode = Episode.find(id="123")[0]
actions = episode.approved_actions()

Get all approved actions in a namespace

from skillpacks import ActionEvent

actions = ActionEvent.find(namespace="foo", approved=True)

Get all approved actions for a tool

actions = ActionEvent.find(tool=desktop.ref(), approved=True)

Tune a model on the actions (In progress)

from skillpacks.model import InternVLChat
from skillpacks.runtime import KubernetesRuntime

runtime = KubernetesRuntime()
model = InternVLChat(runtime=runtime)

result = model.train(actions=actions, follow=True, publish=True)

Integrations

Skillpacks is integrated with:

  • MLLM A prompt management, routing, and schema validation library for multimodal LLMs
  • Taskara A task management library for AI agents
  • Surfkit A platform for AI agents
  • Threadmem A thread management library for AI agents

Community

Come join us on Discord.

Backends

Thread and prompt storage can be backed by:

  • Sqlite
  • Postgresql

Sqlite will be used by default. To use postgres simply configure the env vars:

DB_TYPE=postgres
DB_NAME=skills
DB_HOST=localhost
DB_USER=postgres
DB_PASS=abc123

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

skillpacks-0.1.73.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

skillpacks-0.1.73-py3-none-any.whl (46.8 kB view details)

Uploaded Python 3

File details

Details for the file skillpacks-0.1.73.tar.gz.

File metadata

  • Download URL: skillpacks-0.1.73.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.1 Darwin/23.3.0

File hashes

Hashes for skillpacks-0.1.73.tar.gz
Algorithm Hash digest
SHA256 f60889b5b69b7047844511e280b67a08adb9c67a254a7ef4a5e062a1ce3cf349
MD5 87b49cc1a6d644b0a94445f96eec4417
BLAKE2b-256 d0d2e316d7268dcadbb17709deb4a07d5f4f265af63613f4032f2ae32da5d0f4

See more details on using hashes here.

File details

Details for the file skillpacks-0.1.73-py3-none-any.whl.

File metadata

  • Download URL: skillpacks-0.1.73-py3-none-any.whl
  • Upload date:
  • Size: 46.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.1 Darwin/23.3.0

File hashes

Hashes for skillpacks-0.1.73-py3-none-any.whl
Algorithm Hash digest
SHA256 01ed16de1bdcb61c059b09a9f6b44b57bf626c703ce3f636decaab3f509327c5
MD5 608ca1143b4a0fa90e32da3a6f9521b7
BLAKE2b-256 57993fdb8c9d9ef415c081ef031d76fc7060fd7d16f9ae9eed53b47f23c013c3

See more details on using hashes here.

Supported by

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