TEMPLATE

Personal Assistant

24/7 AI assistant with persistent memory, knowledge base, and scheduled tasks. Remembers every conversation. Always on.

agent.ts
import { Agent } from "oncell";
const agent = new Agent("assistant", {
instructions: `You are a personal AI assistant.
Search your knowledge base before answering.
Remember important information the user shares.
Be helpful, concise, and friendly.`,
model: "kimi-k3",
tools: ["files", "memory"],
});
agent.chat(async ({ message, user }) => {
// Recall this user's past conversations
const history = await agent.memory.forUser(user.id).get("history");
// Search knowledge base for relevant context
const docs = await agent.files.search(message);
const reply = await agent.llm(message, {
context: docs,
history,
});
// Remember this conversation
await agent.memory.forUser(user.id).append("history", {
user: message,
assistant: reply.text,
ts: new Date().toISOString(),
});
return reply;
});
// Morning briefing — runs every day at 8am
agent.schedule("briefing", "daily 8am", async () => {
return agent.llm("Summarize yesterday's conversations and pending items.");
});
export default agent;

DEPLOY

$ npx oncell deploy assistant
DEPLOY NOW

WHAT YOU GET

Persistent memory per user
Knowledge base with search
Scheduled daily tasks
Conversation history
Chat UI included
24/7 uptime, $0 idle