Skip to main content

Task-driven compiler for agent skill libraries.

Project description

Dynamic Skill Compiler

Dynamic Skill Compiler (DSC) is a task-driven compiler for agent skills. It takes a natural-language task, retrieves candidate skills from a local skill library, builds a skill graph, and emits a compact, dependency-aware skill package for execution.

What DSC Does

  • Decomposes a task into subgoals and required capabilities.
  • Retrieves local skill assets and their declared relationships.
  • Extracts relevant skill fragments instead of passing whole skill files.
  • Builds a graph over similar_to, belong_to, compose_with, and depend_on relationships.
  • Runs compiler passes to select, repair, augment, and prune the skill set.
  • Produces a CompiledSkillPackage with selected skills, execution order, coverage metrics, and pass traces.

Repository Layout

src/dynamic_skill_compiler/   Core DSC compiler package
tests/                        Compiler and experiment integration tests
experiments/                  Benchmark runners and local skill libraries
reports/                      DSC design notes

The benchmark runners under experiments/ are kept as evaluation harnesses for ScienceWorld, ALFWorld, and WebShop. They are intentionally separate from the core compiler package.

Quick Start

Install from a local checkout:

python -m pip install -e .

After the package is published to PyPI, users can install it with:

python -m pip install dynamic-skill-compiler

Semantic embedding support is optional:

python -m pip install "dynamic-skill-compiler[semantic]"
from dynamic_skill_compiler import (
    CompilerConfig,
    DynamicSkillCompiler,
    LocalEnvironment,
    LocalSkillLibraryRetriever,
)

retriever = LocalSkillLibraryRetriever("experiments/src/skills/scienceworld")
compiler = DynamicSkillCompiler(
    retriever=retriever,
    config=CompilerConfig(),
)

compiled = compiler.compile(
    "Your task is to measure the temperature of an unknown substance.",
    environment=LocalEnvironment(benchmark="scienceworld"),
)

print([skill.asset.name for skill in compiled.compiled_skills])
print(compiled.execution_order)
print(compiled.metrics.coverage_score)

CLI

The package installs a dsc command for quick local compilation:

dsc "Measure the temperature of the unknown object." \
  --skills-dir experiments/src/skills/scienceworld \
  --pretty

The command prints a JSON summary containing selected skills, execution order, coverage metrics, compiler pass traces, and dropped-skill reasons.

Build And Publish

Build source and wheel distributions:

python -m pip install ".[dev]"
python -m build
python -m twine check dist/*

Publish to TestPyPI first:

python -m twine upload --repository testpypi dist/*

Publish to PyPI:

python -m twine upload dist/*

Use a PyPI API token via TWINE_USERNAME=__token__ and TWINE_PASSWORD=pypi-... or through your local .pypirc.

Tests

PYTHONPATH=src python -m unittest discover -s tests -p "test_*.py"

PYTHONPATH=src:experiments/src .venv-experiments/bin/python \
  experiments/test_runtime_execution_guard.py

Branches

  • main: standalone DSC codebase.
  • codex/v0321: latest DSC development branch mirrored into main.

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

dynamic_skill_compiler-0.1.0.tar.gz (49.7 kB view details)

Uploaded Source

Built Distribution

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

dynamic_skill_compiler-0.1.0-py3-none-any.whl (40.7 kB view details)

Uploaded Python 3

File details

Details for the file dynamic_skill_compiler-0.1.0.tar.gz.

File metadata

  • Download URL: dynamic_skill_compiler-0.1.0.tar.gz
  • Upload date:
  • Size: 49.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for dynamic_skill_compiler-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9571f9bdf685a12bf780c7d8be44b41bb129d11ca19dd55d317fcf0b6ea2d2f2
MD5 de332815dcef5ab00a0ca887b8470769
BLAKE2b-256 c120dfcab7c68994c0b44fe23b9cda316454301a7b78e8614114c06accbef1f2

See more details on using hashes here.

File details

Details for the file dynamic_skill_compiler-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dynamic_skill_compiler-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67c76856774ac8575502b1197f927f786393daa61a80e542c511fdae73a32f89
MD5 4dd3215598de5bf7abd7500955893d97
BLAKE2b-256 0b043321f8739879d46bcd4499b3bcf04fde29932dd3bb0e7d8c239f8d3b415f

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