skillpacks


Nameskillpacks JSON
Version 0.1.95 PyPI version JSON
download
home_pageNone
SummaryPluggable skills for AI agents
upload_time2024-12-19 18:23:56
maintainerNone
docs_urlNone
authorPatrick Barker
requires_python<4.0,>=3.10
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- PROJECT LOGO -->
<br />
<p align="center">
  <!-- <a href="https://github.com/agentsea/skillpacks">
    <img src="https://project-logo.png" alt="Logo" width="80">
  </a> -->

  <h1 align="center">SkillPacks</h1>

  <p align="center">
    Pluggable skillsets for AI agents
    <br />
    <a href="https://github.com/agentsea/skillpacks"><strong>Explore the docs »</strong></a>
    <br />
    <br />
    <a href="https://youtu.be/exoOUUwFRB8">View Demo</a>
    ·
    <a href="https://github.com/agentsea/skillpacks/issues">Report Bug</a>
    ·
    <a href="https://github.com/agentsea/skillpacks/issues">Request Feature</a>
  </p>
</p>

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** | **...** &nbsp; then swap in that learned layer the moment you need it.

## Install

```bash
pip install skillpacks
```

## Quick Start

Create an episode to record agent events

```python
from skillpacks import Episode

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

Take an action

```python
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

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

Mark actions as approved

```python
# 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

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

Get all approved actions in a namespace

```python
from skillpacks import ActionEvent

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

Get all approved actions for a tool

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

Tune a model on the actions (In progress)

```python
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](https://github.com/agentsea/mllm) A prompt management, routing, and schema validation library for multimodal LLMs
- [Taskara](https://github.com/agentsea/taskara) A task management library for AI agents
- [Surfkit](https://github.com/agentsea/surfkit) A platform for AI agents
- [Threadmem](https://github.com/agentsea/threadmem) A thread management library for AI agents

## Community

Come join us on [Discord](https://discord.gg/hhaq7XYPS6).

## 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:

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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "skillpacks",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Patrick Barker",
    "author_email": "patrickbarkerco@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/00/68/046785b454b16bcbe7a4251169be8779d0c0f3a4587d1de3356a9861a21b/skillpacks-0.1.95.tar.gz",
    "platform": null,
    "description": "<!-- PROJECT LOGO -->\n<br />\n<p align=\"center\">\n  <!-- <a href=\"https://github.com/agentsea/skillpacks\">\n    <img src=\"https://project-logo.png\" alt=\"Logo\" width=\"80\">\n  </a> -->\n\n  <h1 align=\"center\">SkillPacks</h1>\n\n  <p align=\"center\">\n    Pluggable skillsets for AI agents\n    <br />\n    <a href=\"https://github.com/agentsea/skillpacks\"><strong>Explore the docs \u00bb</strong></a>\n    <br />\n    <br />\n    <a href=\"https://youtu.be/exoOUUwFRB8\">View Demo</a>\n    \u00b7\n    <a href=\"https://github.com/agentsea/skillpacks/issues\">Report Bug</a>\n    \u00b7\n    <a href=\"https://github.com/agentsea/skillpacks/issues\">Request Feature</a>\n  </p>\n</p>\n\nSkillpacks provide a means of fine tuning agents on tools, and the ability to hotswap learned skills at inference time.\n\nTeach a model how to use a **website** | **code base** | **API** | **database** | **application** | **...** &nbsp; then swap in that learned layer the moment you need it.\n\n## Install\n\n```bash\npip install skillpacks\n```\n\n## Quick Start\n\nCreate an episode to record agent events\n\n```python\nfrom skillpacks import Episode\n\nepisode = Episode(remote=\"https://foo.bar\")\n```\n\nTake an action\n\n```python\nfrom mllm import Router, RoleThread\nfrom skillpacks import V1Action, V1EnvState\nfrom agentdesk import Desktop\n\nrouter = Router.from_env()\ndesktop = Desktop.local()\n\nthread = RoleThread()\nmsg = f\"\"\"\nI need to open Google to search, your available action are {desktop.json_schema()}\nplease return your selection as {V1Action.model_json_schema()}\n\"\"\"\nthread.post(role=\"user\", msg=msg)\n\nresponse = router.chat(thread, expect=V1Action)\nv1action = response.parsed\n\naction = desktop.find_action(name=v1action.name)\nresult = desktop.use(action, **v1action.parameters)\n```\n\nRecord the action in the episode\n\n```python\nevent = episode.record(\n    state=V1EnvState(),\n    prompt=response.prompt,\n    action=v1action,\n    tool=desktop.ref(),\n    result=result,\n)\n```\n\nMark actions as approved\n\n```python\n# approve one\nepisode.approve_one(event.id)\n\n# approve the event and all actions prior to it\nepisode.approve_prior(event.id)\n\n# approve all\nepisode.approve_all()\n```\n\nGet all approved actions in an episode\n\n```python\nepisode = Episode.find(id=\"123\")[0]\nactions = episode.approved_actions()\n```\n\nGet all approved actions in a namespace\n\n```python\nfrom skillpacks import ActionEvent\n\nactions = ActionEvent.find(namespace=\"foo\", approved=True)\n```\n\nGet all approved actions for a tool\n\n```python\nactions = ActionEvent.find(tool=desktop.ref(), approved=True)\n```\n\nTune a model on the actions (In progress)\n\n```python\nfrom skillpacks.model import InternVLChat\nfrom skillpacks.runtime import KubernetesRuntime\n\nruntime = KubernetesRuntime()\nmodel = InternVLChat(runtime=runtime)\n\nresult = model.train(actions=actions, follow=True, publish=True)\n```\n\n## Integrations\n\nSkillpacks is integrated with:\n\n- [MLLM](https://github.com/agentsea/mllm) A prompt management, routing, and schema validation library for multimodal LLMs\n- [Taskara](https://github.com/agentsea/taskara) A task management library for AI agents\n- [Surfkit](https://github.com/agentsea/surfkit) A platform for AI agents\n- [Threadmem](https://github.com/agentsea/threadmem) A thread management library for AI agents\n\n## Community\n\nCome join us on [Discord](https://discord.gg/hhaq7XYPS6).\n\n## Backends\n\nThread and prompt storage can be backed by:\n\n- Sqlite\n- Postgresql\n\nSqlite will be used by default. To use postgres simply configure the env vars:\n\n```sh\nDB_TYPE=postgres\nDB_NAME=skills\nDB_HOST=localhost\nDB_USER=postgres\nDB_PASS=abc123\n```\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Pluggable skills for AI agents",
    "version": "0.1.95",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eabab519bb87a20f465abc375a8c8a241f5ac863fa3cff1baf660ef2c186943f",
                "md5": "41c7e55f50590e40be8a91fde8f687e4",
                "sha256": "c87af632f13f87acc30521240ef8f93d7a6118bf3fd3175f20b925dff2090ded"
            },
            "downloads": -1,
            "filename": "skillpacks-0.1.95-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "41c7e55f50590e40be8a91fde8f687e4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 51277,
            "upload_time": "2024-12-19T18:23:54",
            "upload_time_iso_8601": "2024-12-19T18:23:54.906954Z",
            "url": "https://files.pythonhosted.org/packages/ea/ba/b519bb87a20f465abc375a8c8a241f5ac863fa3cff1baf660ef2c186943f/skillpacks-0.1.95-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0068046785b454b16bcbe7a4251169be8779d0c0f3a4587d1de3356a9861a21b",
                "md5": "a82bc22aaeb34df5d53f410fca755d1b",
                "sha256": "49f81a2d786aad086a26f56c006ee540ae616734df9b4750069b9403d3fff065"
            },
            "downloads": -1,
            "filename": "skillpacks-0.1.95.tar.gz",
            "has_sig": false,
            "md5_digest": "a82bc22aaeb34df5d53f410fca755d1b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 38639,
            "upload_time": "2024-12-19T18:23:56",
            "upload_time_iso_8601": "2024-12-19T18:23:56.374822Z",
            "url": "https://files.pythonhosted.org/packages/00/68/046785b454b16bcbe7a4251169be8779d0c0f3a4587d1de3356a9861a21b/skillpacks-0.1.95.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-19 18:23:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "skillpacks"
}
        
Elapsed time: 0.39678s