curl -X POST "https://app.runtm.com/api/agent-directives" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"type": "skill_v0",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Guides the agent through Fly.io deployments",
"content": {
"entry_md": "SKILL.md",
"files": [
{
"path": "SKILL.md",
"inline": "# Deploy to Fly.io\n\nStep-by-step deployment guide..."
}
]
}
}'
import requests
response = requests.post(
"https://app.runtm.com/api/agent-directives",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={
"type": "skill_v0",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Guides the agent through Fly.io deployments",
"content": {
"entry_md": "SKILL.md",
"files": [
{
"path": "SKILL.md",
"inline": "# Deploy to Fly.io\n\nStep-by-step guide...",
}
],
},
},
)
data = response.json()
print(f"Created: {data['directive']['id']}")
const response = await fetch(
"https://app.runtm.com/api/agent-directives",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "skill_v0",
name: "deploy-to-fly",
display_name: "Deploy to Fly.io",
description: "Guides the agent through Fly.io deployments",
content: {
entry_md: "SKILL.md",
files: [
{
path: "SKILL.md",
inline: "# Deploy to Fly.io\n\nStep-by-step guide...",
},
],
},
}),
}
);
const data = await response.json();
console.log(`Created: ${data.directive.id}`);
{
"directive": {
"id": "dir_abc123",
"type": "skill_v0",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Guides the agent through Fly.io deployments",
"organization_id": "org_abc123",
"owner_user_id": "user_xyz",
"content_kind": "inline",
"content_hash": "sha256:abcdef...",
"size_bytes": 256,
"source": {
"kind": "inline",
"uri": null,
"ref": null
},
"attachments": {
"repos": [],
"applies_to_all": false
},
"content": {
"entry_md": "SKILL.md",
"files": [
{
"path": "SKILL.md",
"inline": "# Deploy to Fly.io\n\nStep-by-step guide..."
}
]
},
"created_at": "2026-05-09T21:00:00Z",
"updated_at": null
}
}
Skills
Create Skill
Create a new agent directive (skill, MCP server, doc, hook, etc.)
POST
/
api
/
agent-directives
curl -X POST "https://app.runtm.com/api/agent-directives" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"type": "skill_v0",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Guides the agent through Fly.io deployments",
"content": {
"entry_md": "SKILL.md",
"files": [
{
"path": "SKILL.md",
"inline": "# Deploy to Fly.io\n\nStep-by-step deployment guide..."
}
]
}
}'
import requests
response = requests.post(
"https://app.runtm.com/api/agent-directives",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={
"type": "skill_v0",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Guides the agent through Fly.io deployments",
"content": {
"entry_md": "SKILL.md",
"files": [
{
"path": "SKILL.md",
"inline": "# Deploy to Fly.io\n\nStep-by-step guide...",
}
],
},
},
)
data = response.json()
print(f"Created: {data['directive']['id']}")
const response = await fetch(
"https://app.runtm.com/api/agent-directives",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "skill_v0",
name: "deploy-to-fly",
display_name: "Deploy to Fly.io",
description: "Guides the agent through Fly.io deployments",
content: {
entry_md: "SKILL.md",
files: [
{
path: "SKILL.md",
inline: "# Deploy to Fly.io\n\nStep-by-step guide...",
},
],
},
}),
}
);
const data = await response.json();
console.log(`Created: ${data.directive.id}`);
{
"directive": {
"id": "dir_abc123",
"type": "skill_v0",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Guides the agent through Fly.io deployments",
"organization_id": "org_abc123",
"owner_user_id": "user_xyz",
"content_kind": "inline",
"content_hash": "sha256:abcdef...",
"size_bytes": 256,
"source": {
"kind": "inline",
"uri": null,
"ref": null
},
"attachments": {
"repos": [],
"applies_to_all": false
},
"content": {
"entry_md": "SKILL.md",
"files": [
{
"path": "SKILL.md",
"inline": "# Deploy to Fly.io\n\nStep-by-step guide..."
}
]
},
"created_at": "2026-05-09T21:00:00Z",
"updated_at": null
}
}
Creates a new agent directive. It is live immediately: there is no draft or publish step. Creating it does not attach it anywhere, so nothing loads it until you attach it to a template, a repo, or the whole org.
Required scope:
context:write
Headers
string
required
Bearer token. Example:
Bearer runtm_xxxstring
Scope the directive to an organization.
Body
string
required
Directive type:
skill_v0, mcp_server_v0, doc_v0, network_rule_v0, allowlist_rule_v0, hook_v0.string
required
Unique name (1–128 chars). For hooks, must be a slug:
^[a-z0-9][a-z0-9-]{0,63}$.string
Human-readable name shown in the UI.
string
Short description of what this directive does.
object
required
Type-specific content payload. Shape depends on
type - see examples.Response
Returns201 with the created directive resource.
object
The created directive resource with
id, content_hash, content, attachments, and timestamps.curl -X POST "https://app.runtm.com/api/agent-directives" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"type": "skill_v0",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Guides the agent through Fly.io deployments",
"content": {
"entry_md": "SKILL.md",
"files": [
{
"path": "SKILL.md",
"inline": "# Deploy to Fly.io\n\nStep-by-step deployment guide..."
}
]
}
}'
import requests
response = requests.post(
"https://app.runtm.com/api/agent-directives",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={
"type": "skill_v0",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Guides the agent through Fly.io deployments",
"content": {
"entry_md": "SKILL.md",
"files": [
{
"path": "SKILL.md",
"inline": "# Deploy to Fly.io\n\nStep-by-step guide...",
}
],
},
},
)
data = response.json()
print(f"Created: {data['directive']['id']}")
const response = await fetch(
"https://app.runtm.com/api/agent-directives",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "skill_v0",
name: "deploy-to-fly",
display_name: "Deploy to Fly.io",
description: "Guides the agent through Fly.io deployments",
content: {
entry_md: "SKILL.md",
files: [
{
path: "SKILL.md",
inline: "# Deploy to Fly.io\n\nStep-by-step guide...",
},
],
},
}),
}
);
const data = await response.json();
console.log(`Created: ${data.directive.id}`);
{
"directive": {
"id": "dir_abc123",
"type": "skill_v0",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Guides the agent through Fly.io deployments",
"organization_id": "org_abc123",
"owner_user_id": "user_xyz",
"content_kind": "inline",
"content_hash": "sha256:abcdef...",
"size_bytes": 256,
"source": {
"kind": "inline",
"uri": null,
"ref": null
},
"attachments": {
"repos": [],
"applies_to_all": false
},
"content": {
"entry_md": "SKILL.md",
"files": [
{
"path": "SKILL.md",
"inline": "# Deploy to Fly.io\n\nStep-by-step guide..."
}
]
},
"created_at": "2026-05-09T21:00:00Z",
"updated_at": null
}
}