Skip to main content

asterskills

Universal skills loader for AI agent frameworks with progressive disclosure

PyPI version Python 3.9+

The official Python SDK for the ask skills registry. Load AI agent skills into any framework with progressive disclosure support.

Features

  • Progressive Disclosure: Load skills at different levels (metadata, contract, summary, full)
  • Framework Adapters: Ready-to-use integrations for LangChain, CrewAI, AutoGen, Semantic Kernel
  • Type-Safe: Full type hints and Pydantic models
  • Async-First: Built on httpx for async HTTP
  • Smart Caching: Automatic caching with configurable TTL
  • Token Budget: Load skills within context budget constraints

Installation

pip install asterskills

# With framework adapters
pip install asterskills[langchain]
pip install asterskills[crewai]
pip install asterskills[autogen]
pip install asterskills[all]  # All adapters

Quick Start

from asterskills import SkillsLoader, LoadLevel

# Create a loader
loader = SkillsLoader()

# Load a skill with full content
skill = await loader.load("pdf-tools")
print(skill.metadata.name)  # 'pdf-tools'
print(skill.metadata.version)  # '2.1.0'

# Progressive disclosure - load only what you need
metadata = await loader.load("pdf-tools", level=LoadLevel.METADATA)  # ~50 tokens
contract = await loader.load("pdf-tools", level=LoadLevel.CONTRACT)  # ~300 tokens
summary = await loader.load("pdf-tools", level=LoadLevel.SUMMARY)    # ~500 tokens
full = await loader.load("pdf-tools", level=LoadLevel.FULL)          # Full content

# Load within a token budget
skill = await loader.load_with_budget("pdf-tools", max_tokens=500)

Framework Adapters

LangChain / LangGraph

from asterskills.adapters import AsterSkillTool, AsterToolkit
from langgraph.prebuilt import create_react_agent

# Single tool
pdf_tool = await AsterSkillTool.from_skill("pdf-tools")
agent = create_react_agent(model, tools=[pdf_tool])

# Multiple tools from search
toolkit = await AsterToolkit.from_search("code generation", limit=5)
agent = create_react_agent(model, tools=toolkit.get_tools())

# From category
toolkit = await AsterToolkit.from_category("testing", limit=10)

CrewAI

from crewai import Agent, Task, Crew
from asterskills.adapters import AsterCrewTool, create_crewai_tools

# Create tools
pdf_tool = await AsterCrewTool.from_skill("pdf-tools")
git_tool = await AsterCrewTool.from_skill("git-commit")

# Use in agent
researcher = Agent(
    role="Document Analyst",
    goal="Extract and analyze document contents",
    tools=[pdf_tool, git_tool],
    llm=llm
)

AutoGen

from autogen import AssistantAgent, UserProxyAgent
from asterskills.adapters import register_aster_skills

# Register skills with agent
assistant = AssistantAgent("assistant", llm_config=llm_config)
await register_aster_skills(
    assistant,
    skills=["pdf-tools", "git-commit", "code-review"],
)

# Skills are now available as functions
user_proxy = UserProxyAgent("user_proxy")
user_proxy.initiate_chat(assistant, message="Extract text from report.pdf")

Semantic Kernel

from semantic_kernel import Kernel
from asterskills.adapters import register_aster_plugin

kernel = Kernel()

# Register as plugin
await register_aster_plugin(kernel, "pdf-tools")

# Use in prompts
result = await kernel.invoke_prompt(
    "Extract the summary from {{$file_path}}",
    file_path="report.pdf"
)

Configuration

from asterskills import SkillsLoader, LoaderConfig

loader = SkillsLoader(LoaderConfig(
    api_key="aster_live_xxx",        # For private skills
    base_url="https://api.joinasterism.com/v1",  # Custom registry
    cache_ttl=3600,                # Cache duration in seconds
    debug=True,                    # Enable debug logging
    timeout=30.0,                  # Request timeout
))

Skill Execution

Execute skills in the hosted runtime:

# Synchronous execution
result = await loader.execute("pdf-tools", {
    "file_path": "document.pdf",
    "extract": "text"
})
print(result.outputs)  # {'text': '...', 'pages': 5}

# Async execution
result = await loader.execute("pdf-tools", {"file_path": "large.pdf"}, async_=True)
print(result.execution_id)  # 'exec-abc123'

# Check status
status = await loader.get_execution_status(result.execution_id)
print(status.status)  # 'completed'

Search and Discovery

# Search for skills
results = await loader.search("code generation", limit=10)
for skill in results:
    print(f"{skill.full_name}: {skill.description}")

# List by category
skills = await loader.list(category="testing", sort="downloads", limit=20)

Type Definitions

The SDK provides full type definitions for all skill components:

from asterskills import (
    LoadLevel,
    LoaderConfig,
    SkillMetadata,
    SkillContract,
    SkillParameter,
    CapabilityDeclaration,
    LoadedSkill,
    ToolDefinition,
    ExecuteResult,
)

API Reference

SkillsLoader

Method Description
load(name, level, version) Load a skill with progressive disclosure
load_with_budget(name, max_tokens) Load within token budget
search(query, limit) Search for skills
list(sort, limit, category) List popular skills
execute(name, inputs, async_) Execute in hosted runtime
get_execution_status(id) Check execution status
clear_cache() Clear skill cache

LoadLevel

Level Description ~Tokens
METADATA Name, version, description ~50
CONTRACT + inputs, outputs, capabilities ~300
SUMMARY + first section ~500
FULL Complete skill content Variable

License

MIT

Metadata

Release files for asterskills 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asterskills 1.0.0
File Size Uploaded Provenance
asterskills-1.0.0.tar.gz 18.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for asterskills 1.0.0
File Interpreter ABI Platform
asterskills-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.3 kB

Release files / asterskills-1.0.0.tar.gz

Download URL asterskills-1.0.0.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9650fdb4c11f2606b117b9cfc79518a5267e13cf13db7333ee809789d9baccee
BLAKE2b-256 checksum
How to use checksums
a3a6cbeeecc5de981fd351313cc9832d69110a2ca81eb1c2af59b6dc85942dfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release files / asterskills-1.0.0-py3-none-any.whl

Download URL asterskills-1.0.0-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
625adc7483037c1dda80dcd4fcfd4712e01f34c89d0fe2759050e079a0118899
BLAKE2b-256 checksum
How to use checksums
9378922997fd29ea5af97a87d34bf95c62c83d56c79019078a7e76e3e1303fd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Security for asterskills 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page