Get an ASMP server and client running in a few minutes.
cd sdks/python && pip install -e . && pip install uvicornfrom asmp import ASMPWorkflow, TransitionDef, create_app
transitions = [
TransitionDef(from_state="INIT", action="start", to_state="DONE"),
]
workflow = (
ASMPWorkflow("my-wf", "INIT", transitions, base_url="http://localhost:8000")
.hint("INIT", "Start here.")
.hint("DONE", "Done.")
)
app = create_app(workflow)
# Run: uvicorn app:app --reloadThen start the server:
uvicorn app:app --reload --port 8000cd sdks/typescript && npm install && npm run buildimport { createApp, ASMPWorkflow } from "asmp-sdk"; // or from "./src/index.js"
import { serve } from "@hono/node-server";
const transitions = [{ from_state: "INIT", action: "start", to_state: "DONE" }];
const workflow = new ASMPWorkflow("my-wf", "INIT", transitions, "http://localhost:3000")
.hint("INIT", "Start here.")
.hint("DONE", "Done.");
const app = createApp(workflow);
serve({ fetch: app.fetch, port: 3000 });Run with npx tsx server.ts or compile and run with Node.
You can drive a run with any HTTP client. Replace <run_id> with the value from the first response.
curl -X POST http://localhost:8000/runs \
-H "Content-Type: application/json" \
-d '{"data":{}}'Response: 201, Location: .../runs/<run_id>, body is the initial State Frame.
curl http://localhost:8000/runs/<run_id>Use the href from next_states in the frame, or:
curl -X POST http://localhost:8000/runs/<run_id>/transitions/start \
-H "Content-Type: application/json" \
-d '{}'- Add tools and resources to a state.
- Attach an agent skill to a state.
- Use the TypeScript client or Python client with a registry and config.
- Run the server on Workers/Supabase/Convex (TypeScript) with the fetch handler.