Framework-agnostic agent tracing backend and Python SDK for mining repeated execution patterns into candidate skills.
Project description
Agent Skill Compiler
Agent Skill Compiler is a framework-agnostic tracing backend and Python SDK for collecting agent runs, normalizing tool and routing events, and mining repeated execution patterns into candidate skills.
It is designed to work with:
- custom agent runtimes
- Agno
- Microsoft Agent Framework
- any Python-based framework that can call the generic tracing helpers
This package ships the backend API and SDK only. The frontend is deployed separately here:
Install
Core package:
pip install agent-skill-compiler
With Agno adapter support:
pip install "agent-skill-compiler[agno]"
For Microsoft Agent Framework, install the framework package alongside this SDK:
pip install agent-skill-compiler
pip install agent-framework --pre
What You Deploy
The recommended deployment model is:
- deploy
agent-skill-compileras your tracing and analysis API - instrument your backend agents with the SDK
- deploy your frontend separately from skills-compiler
Auth Model
- trusted backend writes:
public_key+secret_key - frontend reads:
public_key - admin provisioning: optional
ASC_ADMIN_TOKEN
Never expose the secret_key in browser code.
Run The API
Local Python
agent-skill-compiler serve
Docker
cp .env.example .env
docker compose up --build
Useful endpoints:
GET /GET /docsGET /api/healthzPOST /api/admin/projects
Create A Project
export ASC_ADMIN_TOKEN=change-me
curl -X POST http://localhost:8000/api/admin/projects \
-H "Content-Type: application/json" \
-H "X-ASC-Admin-Token: change-me" \
-d '{
"name": "Support API",
"slug": "support-api",
"key_name": "backend"
}'
Example response:
{
"project": {
"project_id": "...",
"name": "Support API",
"slug": "support-api",
"created_at": "..."
},
"public_key": "asc_pk_...",
"secret_key": "asc_sk_...",
"key_name": "backend"
}
Base Client
from agent_skill_compiler import SkillCompilerClient
client = SkillCompilerClient(
base_url="http://localhost:8000",
public_key="asc_pk_your_project_public_key",
secret_key="asc_sk_your_project_secret_key",
)
run = client.start_run(
task_name="customer_followup",
input_text="Review this customer issue and prepare next steps.",
metadata={"service": "support-api", "workflow": "support_triage"},
)
tool_call = client.record_event(
run_id=run.run_id,
agent_name="ResearchAgent",
action_name="search_docs",
action_kind="tool_call",
input_payload={"query": "latest billing escalation policy"},
)
client.record_event(
run_id=run.run_id,
agent_name="ResearchAgent",
action_name="search_docs",
action_kind="tool_result",
output_payload={"documents": ["billing-policy-v2"]},
parent_event_id=tool_call.event_id,
)
client.finish_run(run_id=run.run_id, status="success")
client.close()
Generic Framework Integration
Use the generic helpers for any custom framework or homegrown orchestration layer:
from agent_skill_compiler import SkillCompilerClient, trace_run
client = SkillCompilerClient(
base_url="http://localhost:8000",
public_key="asc_pk_...",
secret_key="asc_sk_...",
)
with trace_run(
client,
task_name="ticket_triage",
input_text="Please investigate this support issue.",
metadata={"framework": "custom"},
) as run:
tool_call = run.tool_call(
agent_name="Coordinator",
action_name="search_docs",
arguments={"query": "refund policy"},
)
run.tool_result(
agent_name="Coordinator",
action_name="search_docs",
result={"documents": ["refund-policy-v2"]},
parent_event_id=tool_call.event_id,
)
run.final_output(
agent_name="Responder",
output="Escalate to billing operations.",
)
Agno Integration
Use the Agno adapter to wrap a normal agent.run(...) call and automatically capture tool activity through Agno tool hooks:
from agno.agent import Agent
from agent_skill_compiler import SkillCompilerClient, run_agno_agent
client = SkillCompilerClient(
base_url="http://localhost:8000",
public_key="asc_pk_...",
secret_key="asc_sk_...",
)
response = run_agno_agent(
agent,
client,
input="Summarize the latest billing escalation guidance.",
task_name="billing_guidance",
metadata={"framework": "agno"},
)
Microsoft Agent Framework Integration
Microsoft Agent Framework is the new successor to Semantic Kernel and AutoGen. Agent Skill Compiler integrates with it through official middleware hooks.
from agent_skill_compiler import AsyncSkillCompilerClient, create_agent_framework_middleware
client = AsyncSkillCompilerClient(
base_url="http://localhost:8000",
public_key="asc_pk_...",
secret_key="asc_sk_...",
)
middleware = create_agent_framework_middleware(
client,
task_name="weather_assistant",
metadata={"framework": "microsoft-agent-framework"},
)
# Pass `middleware=middleware` when constructing the agent or on a specific run.
The adapter uses:
- agent middleware for run start and finish
- function middleware for tool call and tool result capture
Frontend Usage
Your separate frontend should use the public_key only and read project-scoped data from the deployed API.
Primary frontend endpoints:
GET /api/runs?public_key=asc_pk_...GET /api/runs/{run_id}?public_key=asc_pk_...GET /api/skills?public_key=asc_pk_...POST /api/analyze?public_key=asc_pk_...
Frontend repo:
Public API
Top-level exports:
SkillCompilerClientAsyncSkillCompilerClienttrace_runtrace_run_asyncrun_agno_agentcreate_agent_framework_middleware
Notes
- SQLite is used for local-first persistence.
- Candidate skills are heuristic suggestions derived from repeated event subsequences.
- HTML reporting remains available through the report endpoints and CLI.
License
MIT
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
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 agent_skill_compiler-0.2.0.tar.gz.
File metadata
- Download URL: agent_skill_compiler-0.2.0.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
777654f09c3ca330ab0e889cf7b9f7979e69fddc090bd53f56adac4fa4c547b5
|
|
| MD5 |
0d0485209ec9fb2da922d29f98cfc718
|
|
| BLAKE2b-256 |
d9f4891e037c21cf671542c5c39f54c3f4a73392890424f0e8840bb36b7ec4b6
|
File details
Details for the file agent_skill_compiler-0.2.0-py3-none-any.whl.
File metadata
- Download URL: agent_skill_compiler-0.2.0-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
869a6c9cbde626e9ef0a3c7a34382afc274e9a581b1f3220c0f83406f6eea953
|
|
| MD5 |
b078941199a59a1368e4cc6a05de44e4
|
|
| BLAKE2b-256 |
67559f583777cf910e620485aba931bff53d934527a81fd517f2d485b933c2f3
|