agentleFS
AWSKnown publisherawslabs/social-messaging-agent-runtime-toolkit/blueprints/personal-assistant/AGENTS.md

social-messaging-agent-runtime-toolkit / personal-assistant

AGENTS.md4 starsChanged 8 days agoApache-2.0View on GitHub

A general-purpose WhatsApp assistant with conversation memory, per-user state, scheduling, skills, and rich/voice/image media tools. This blueprint is a full-featured Strands agent. It remembers facts about each user, schedules reminders and tasks, loads skills on demand, sends interactive WhatsApp messages (buttons, lists, media, location), replies with voice notes, and generates images. It understands inbound audio (transcribed), images (described via Claude vision), and documents (PDF content extracted). Use it when you want a capable assistant out of the box and intend…

  • Installs packages

The file

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Read this file and SOCIALAGENT_GUIDE.md before changing the project.

    line 9
  2. Very specific:

    Do not edit socialagent_runtime/: it is a vendored copy that socialagent runtime update replaces.

    line 12
  3. Very specific:

    Test locally with socialagent dev before deploying, and ask before socialagent deploy, socialagent destroy or anything that sends real …

    line 14

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Personal Assistant Blueprint

A general-purpose WhatsApp assistant with conversation memory, per-user state, scheduling, skills, and rich/voice/image media tools.

This blueprint is a full-featured Strands agent. It remembers facts about each user, schedules reminders and tasks, loads skills on demand, sends interactive WhatsApp messages (buttons, lists, media, location), replies with voice notes, and generates images. It understands inbound audio (transcribed), images (described via Claude vision), and documents (PDF content extracted). Use it when you want a capable assistant out of the box and intend to customize from there.

Rules for AI assistants

  1. Read this file and SOCIALAGENT_GUIDE.md before changing the project; the guide covers tools, skills, scheduling, notifications and deploys.
  2. Agent-side code (agent.py, src/) imports only socialagent_runtime, its own src/ modules and libraries in requirements.txt; handler Lambdas (handlers/) import socialagent and handlers/shared/. Do not mix the two.
  3. A tool that sends a WhatsApp message during a turn uses socialagent_runtime.notify inside the entrypoint's socialagent_notify_context(); never call the notification Lambda directly from a tool.
  4. Do not edit socialagent_runtime/: it is a vendored copy that socialagent runtime update replaces. Change behavior in your own code instead.
  5. Hard-code no account IDs, ARNs, phone numbers or model IDs; configuration lives in socialagent.<env>.yaml. The model is MODEL_ID under agent.environment there, which reaches the agent and the webhook together; src/model.py only names the default when it is unset, so do not edit it to change the model.
  6. Test locally with socialagent dev before deploying, and ask before socialagent deploy, socialagent destroy or anything that sends real messages.

Files and directories

PathWhat it is
agent.pyThe agent entrypoint running inside the AgentCore Runtime. Builds a Strands Agent with the Bedrock model from src/model.py, a system prompt with live time + skill index, the tool list from src/tools, and an AgentCore session manager. Wraps the turn in socialagent_notify_context() so in-band sends are queued and returned in SocialAgentResponse.
requirements.txtPython dependencies for the agent container (bedrock-agentcore[strands-agents], boto3, aws-opentelemetry-distro).
DockerfileBuilds the ARM64 AgentCore Runtime image — copies agent.py, src/, and vendored socialagent_runtime/, installs requirements, runs under opentelemetry-instrument.
socialagent.dev.yamlProject config for local dev and deploy (project name, region, environment, phone_number_id). socialagent config sync fills in outputs.
templates.yamlWhatsApp message templates for this stack (reminder_clean, task_completed), kept transactional/UTILITY. Sync with socialagent templates sync.
src/Agent-side code that runs inside the runtime container.
src/__init__.pyMarks src as a package.
src/skills.pySkill loader — parses YAML frontmatter from src/skills/*.md, builds the system-prompt skill index, auto-includes flagged skills, lists the scheduler operations declared in frontmatter that schedule_recurring accepts (agent.py passes RECURRING_OPERATIONS), and serves skill content via load_skill(name).
src/skills/Markdown skill files (greeting.md, memory.md, rich_messages.md, scheduling.md) with YAML frontmatter. Listed in the system prompt and loaded on demand by the agent.
src/tools/Strands @tool wrappers plus recipe-provided tool implementations.
src/tools/__init__.pyDefines and assembles socialagent_tools — memory tools (remember/recall/forget/list_remembered), scheduling tools (schedule_reminder/schedule_task/schedule_recurring/cancel_schedule/list_schedules), load_skill, and the media tools that wrap the recipe implementations below.
src/tools/rich_messages.pyRecipe-provided implementation (from the rich-messages recipe) — builds interactive WhatsApp payloads (buttons, lists, media, location).
src/tools/voice_reply.pyRecipe-provided implementation (from the voice-reply recipe) — text-to-speech via Amazon Polly, delivered as a WhatsApp voice note.
src/tools/generate_image.pyRecipe-provided implementation (from the generate-image recipe) — image generation via Bedrock, delivered as a WhatsApp image.
handlers/Lambda Control Layer handlers (run inside AWS Lambda).
handlers/webhook.pyInbound messages with media support: transcribes audio, describes images via Claude vision, extracts PDF/document content, and invokes the runtime. Implements @app.on_media.
handlers/notification.pyOutbound message + template delivery.
handlers/scheduler.pyEventBridge scheduled events (reminders, agent tasks).
handlers/event.pyExternal events via API Gateway.
handlers/shared/Code packaged into every handler Lambda zip; import as from shared... import .... Lambda-side helpers only — never agent tools or skills.

Note: socialagent init also copies the vendored socialagent_runtime/ package into the project root (notify, state, scheduler, messages, phone, config), which the tools in src/tools/ call during a turn.

Extension points

  • Tools — add a new @tool function in src/tools/__init__.py and append it to the socialagent_tools list. Tools receive tool_context.invocation_state["phone"] to scope per-user state. Drop in additional recipe tools with socialagent recipe add <name>, then wire them in __init__.py.
  • Skills — add a markdown file under src/skills/ with YAML frontmatter (name, description, optional auto_include, optional operations). It is auto-listed in the system prompt and loadable via the load_skill tool. No code change needed.
  • Scheduler operations — write the handler in handlers/scheduler.py with @app.on_schedule("<operation>"), add the operation to RECURRING_OPERATIONS in src/tools/__init__.py with the data field the handler reads (None if it reads no text), and declare it in a skill's operations: block so the model knows when to use it. schedule_recurring accepts only the map's operations: the runtime image does not ship handlers/, so the map is the agent's copy of the handler registry. A declaration alone only describes an operation, and one with no map entry is left out of the prompt. Do not name an operation health_check, send_text, send_template or send_message: the scheduler Lambda runs those itself, before it looks up the handlers, so a handler under one never runs.
  • System prompt — edit SYSTEM_PROMPT_TEMPLATE in agent.py.
  • Model — set MODEL_ID under agent.environment in socialagent.<env>.yaml; MODEL_ID=... socialagent dev sets it for a local run (the YAML is not read there). Unset, src/model.py names the default.
  • Media handling — adjust how inbound audio/image/document messages are converted to text in handlers/webhook.py (@app.on_media).
  • External events — add @app.on_event("<event>") handlers in handlers/event.py.
  • Templates — add WhatsApp templates to templates.yaml and sync them.
  • Template language — handlers/scheduler.py's TEMPLATE_LANGUAGE constant (default es_MX) controls the language passed to ctx.send_template for scheduled reminders/task-completion templates, and the hardcoded fallback text next to it is Spanish too. This blueprint defaults to Spanish; change TEMPLATE_LANGUAGE (and the fallback string) if your target users speak a different language.

Run locally

From the scaffolded project directory:

uv pip install -r requirements.txt        # install dependencies (no pyproject.toml, so not uv sync)
uv run socialagent dev --entrypoint agent.py     # local REPL; no deployed stack (model calls still need Bedrock credentials)

socialagent dev runs the Strands agent loop locally and stubs AWS-backed calls (memory, state, notify, media), so you can exercise tools and skills before deploying.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.