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, anddepend_onrelationships. - Runs compiler passes to select, repair, augment, and prune the skill set.
- Produces a
CompiledSkillPackagewith 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
On the first interactive dsc run, DSC asks whether to configure OpenAI
embeddings for semantic optimization. You can skip this and use local lexical
optimization only, or enter an API key/base URL to enable semantic matching.
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.
Configure semantic optimization explicitly:
dsc --configure
You can also use environment variables or CLI flags:
OPENAI_API_KEY=sk-... OPENAI_BASE_URL=https://api.example.com/v1 \
dsc "Measure temperature" --skills-dir path/to/skills --semantic on
Use --semantic off to force local lexical optimization without any prompt.
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.
Package metadata author is taomiao.
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 intomain.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dynamic_skill_compiler-0.1.1.tar.gz.
File metadata
- Download URL: dynamic_skill_compiler-0.1.1.tar.gz
- Upload date:
- Size: 52.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e9d409e281ed26f6337c8e07d151b9e9e0c04ffc815be8cc691742da43bc2cb
|
|
| MD5 |
2c5f64073f9c2d6ba5989a79b192a1a8
|
|
| BLAKE2b-256 |
e7a6e90859530d2ad3b2906e93f3f4a399e93513fa2ef243f7cd02ef02be7e13
|
File details
Details for the file dynamic_skill_compiler-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dynamic_skill_compiler-0.1.1-py3-none-any.whl
- Upload date:
- Size: 43.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be9f06be6fc47da31cc6ea2ac7f9d407d65ffa30cc85fcf6f2490b670abe61a2
|
|
| MD5 |
96a8a5b47f8044e4eca9710f3e7053d8
|
|
| BLAKE2b-256 |
0df40aeed07c9cd99123f051272fa01039a8cc12ccf28fee40f2ced6b9947a37
|