Automate Anthropic with TypeScript
Create and operate Claude Managed Agents, hosted environments, sessions, events, threads, and resources. Start automations from signed agent, environment, and session webhooks.
import { automation, onInvocation, withPrerequisites } from "automate.ax"
import { anthropic } from "automate.ax/anthropic"
export default automation("Run a Claude agent", () => {
withPrerequisites(onInvocation(), () => {
anthropic.runAgent({
agent: "agent-id",
environmentId: "environment-id",
initialEvents: [{
type: "user.message",
content: [{ type: "text", text: "Review the repository" }],
}],
})
})
})What you can do
Actions
- Create, version, update, and archive Claude agents
- Manage hosted cloud environments and session resources
- Start, inspect, update, archive, and delete sessions
- Send messages, outcomes, confirmations, results, and interrupts
- Run one durable turn through a correlated webhook completion
Triggers
- Any agent, environment, or session lifecycle event
- Session start, idle, reschedule, budget, and termination events
- Thread and outcome-evaluation events
- Agent and environment create, update, archive, and delete events