skills/ash/SKILL.md
Deploy and orchestrate hosted AI agents with Ash. Covers: creating an Ash client, deploying agents, managing sessions (create, pause, resume, end), sending messages, streaming SSE responses, sandbox isolation, multi-turn conversations, real-time text deltas, error handling, and working with files in agent workspaces. Works with TypeScript (@ash-ai/sdk) and Python (ash-ai-sdk) SDKs.
npx skillsauth add ash-ai-org/ash-ai ashInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Ash is an open-source system for deploying and orchestrating hosted AI agents. You deploy agents to a server, create sessions, and interact via REST API + SSE streaming.
Before writing code, determine what you're building:
references/sessions.mdreferences/error-handling.mdreferences/api-reference.mdTypeScript:
npm install @ash-ai/sdk
Python:
pip install ash-ai-sdk
TypeScript:
import { AshClient } from '@ash-ai/sdk';
const client = new AshClient({
serverUrl: 'http://localhost:4100',
apiKey: 'your-api-key', // optional in local dev mode
});
Python:
from ash_ai import AshClient
client = AshClient(
server_url="http://localhost:4100",
api_key="your-api-key", # optional in local dev mode
)
TypeScript:
const session = await client.createSession('my-agent');
console.log(session.id); // "a1b2c3d4-..."
console.log(session.status); // "active"
Python:
session = client.create_session("my-agent")
print(session.id) # "a1b2c3d4-..."
print(session.status) # "active"
TypeScript:
import { extractTextFromEvent } from '@ash-ai/sdk';
for await (const event of client.sendMessageStream(session.id, 'Hello!')) {
if (event.type === 'message') {
const text = extractTextFromEvent(event.data);
if (text) console.log(text);
} else if (event.type === 'error') {
console.error('Error:', event.data.error);
} else if (event.type === 'done') {
console.log('Turn complete.');
}
}
Python:
for event in client.send_message_stream(session.id, "Hello!"):
if event.type == "message":
data = event.data
if data.get("type") == "assistant":
for block in data.get("message", {}).get("content", []):
if block.get("type") == "text":
print(block["text"])
elif event.type == "error":
print(f"Error: {event.data['error']}")
elif event.type == "done":
print("Turn complete.")
TypeScript:
await client.endSession(session.id);
Python:
client.end_session(session.id)
The SSE stream carries three event types:
| Event | Description |
|-------|-------------|
| message | SDK message (assistant text, tool use, tool results, stream deltas) |
| error | Error during processing |
| done | Agent's turn is complete |
Enable includePartialMessages for character-by-character streaming:
TypeScript:
import { extractStreamDelta } from '@ash-ai/sdk';
for await (const event of client.sendMessageStream(session.id, 'Write a haiku.', {
includePartialMessages: true,
})) {
if (event.type === 'message') {
const delta = extractStreamDelta(event.data);
if (delta) process.stdout.write(delta);
}
}
Python:
for event in client.send_message_stream(
session.id, "Write a haiku.",
include_partial_messages=True,
):
if event.type == "message":
data = event.data
if data.get("type") == "stream_event":
evt = data.get("event", {})
if evt.get("type") == "content_block_delta":
delta = evt.get("delta", {})
if delta.get("type") == "text_delta":
print(delta.get("text", ""), end="", flush=True)
Sessions preserve conversation context across turns automatically:
TypeScript:
const session = await client.createSession('my-agent');
for await (const event of client.sendMessageStream(session.id, 'My name is Alice.')) {
// Agent acknowledges
}
for await (const event of client.sendMessageStream(session.id, 'What is my name?')) {
if (event.type === 'message') {
const text = extractTextFromEvent(event.data);
if (text) console.log(text); // "Your name is Alice."
}
}
await client.endSession(session.id);
Sessions have five states: starting → active → paused → active (resume) → ended.
// Pause (sandbox may stay alive for fast resume)
await client.pauseSession(session.id);
// Resume (warm path if sandbox alive, cold path restores from snapshot)
await client.resumeSession(session.id);
// End permanently
await client.endSession(session.id);
For full lifecycle details, see references/sessions.md.
Before running your code, verify:
http://localhost:4100, no trailing slash)ASH_API_KEY configuredclient.listAgents()done)error events (agent-level)| Topic | File |
|-------|------|
| SSE event types and stream handling | references/streaming.md |
| Session states and lifecycle | references/sessions.md |
| Full AshClient API reference | references/api-reference.md |
| Common errors and fixes | references/error-handling.md |
For complete documentation: https://docs.ash-cloud.ai/llms.txt
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.