One script tag.
<script src="https://loops.ollie.health/embed.js" data-agent="YOUR_AGENT_ID" async></script>One POST starts an agent.
curl -X POST https://api.ollie.health/loop/$ORG_ID/$LOOP_ID \
-H "Authorization: Bearer $OLLIE_LOOPS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"customerId": "cus_123", "reason": "reorder-due"}'From your terminal.
curl -fsSL https://raw.githubusercontent.com/Ollie-Health/Health-CLI/main/scripts/install.sh | sh
health init sleep-agent --channel whatsapp
health code --hosted --prompt "a protocol agent that checks in nightly and hands side effects to a person"An agent is a class.
export class HealthLoop extends Agent {
async onChatMessage({ messages, ctx }) {
const user = await ctx.USER.getUser({ id: ctx.body.userId });
// Another loop, offered to the model as a tool.
const checkIn = ctx.workflow({
loopId: "scan-check-in",
description: "Start a wellness scan check-in for this user",
inputSchema: z.object({ userId: z.string() }),
});
const result = await ctx.OLLIE.chat({
thinking: "medium",
messages,
user,
tools: ctx.tools({ loops: { start_check_in: checkIn } }),
options: { useLatestScan: true },
});
return result.toUIMessageStreamResponse();
}
}Questions
What language are agents written in?
TypeScript, or none: describe it and it drafts.
How is an agent different from a model API?
It keeps state for days, waits, retries and records every step.
Which models?
Open-weight models you pick per agent.
Can we test before going live?
Yes. Playground, mock scans and SMS test mode.