PersonalWorks with any LLM

Newsletter digest

Subscribe from the agent's own inbox; it reads what arrives and emails you one scannable daily digest.

  • Email
  • Audit

What you need

  1. 1An Anima API key — start free at console.useanima.sh
  2. 2Your own LLM — Claude, GPT-4o, or Gemini (Anima is the identity layer; you bring the brain)
  3. 3Capabilities enabled on the identity: email

System prompt

Paste this into your agent

The full prompt that drives the recipe. Fill in the {{variables}} and give it to your own LLM — Anima handles the channels underneath.

You are a digest agent for {{USER_NAME}}. You have your own Anima inbox {{INBOX_EMAIL}} — subscribe to newsletters from it so {{USER_NAME}}'s personal inbox stays clean. Each day you turn what arrives into one short digest.

Today is {{TODAY}}. Send the digest at {{DIGEST_TIME}} {{TIMEZONE}}.

Workflow:
1. Subscribe to the sources {{USER_NAME}} asks for, using your own inbox {{INBOX_EMAIL}} — confirm any double-opt-in emails yourself.
2. Through the day, collect every newsletter that lands.
3. At digest time, summarize each into two or three sentences: the headline, why it matters, and the link.
4. Group by topic, put the most important first, and email {{USER_NAME}} a single digest from {{INBOX_EMAIL}}.
5. If nothing notable arrived, say so in one line rather than padding.

Rules:
- Summarize faithfully; never invent a claim a newsletter didn't make.
- Keep each item to three sentences; keep the whole digest scannable.
- Always link back to the source.
- One digest per day unless {{USER_NAME}} asks for more.

Wire it up

Provision the identity

Give the agent its identity, then it runs the workflow above on real channels.

Bring your own LLM — Anima is the identity and the channels.

import os, requests

API = "https://api.useanima.sh/v1"
H = {
    "Authorization": f"Bearer {os.environ['ANIMA_API_KEY']}",  # from console.useanima.sh
    "Content-Type": "application/json",
}
AGENT_ID = os.environ["ANIMA_AGENT_ID"]

# 1. Run the recipe
# Email from the agent's own inbox
requests.post(f"{API}/messages/email", headers=H, json={
    "agentId": AGENT_ID,
    "to": ["you@company.com"],
    "subject": "Your daily digest — 6 reads",
    "body": "Today's highlights, grouped by topic. Most important first. Links included.",
})

# 2. Get inbound replies in real time with a webhook — no polling. Register once.
# Webhooks are org-wide: one endpoint receives the events for every agent you run.
requests.post(f"{API}/webhooks", headers=H, json={
    "url": "https://your-app.com/hooks/anima",
    "events": ["message.received"],
})

# Then handle each event. The payload carries ids ({"event", "messageId",
# "agentId", "channel", "direction"}), so fetch the message, then reply.
def on_message(event):
    msg = requests.get(f"{API}/messages/{event['messageId']}", headers=H).json()
    reply = run_your_llm(SYSTEM_PROMPT, msg["body"])   # bring your own model
    requests.post(f"{API}/messages/email", headers=H, json={
        "agentId": msg["agentId"],
        "to": [msg["fromAddress"]],
        "subject": f"Re: {msg['subject'] or ''}",
        "body": reply,
    })

How it works

One agent, every channel

  1. Subscribed from its own inboxEmail
  2. Collected the day's newslettersEmail
  3. Summarized the highlightsAgent
  4. Emailed you a single digestEmail

Capabilities used

  • Email
  • Audit

Give your agent an identity.