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
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- blueprints/appointment-scheduler/AGENTS.mdAGENTS.md
- blueprints/minimal/AGENTS.mdAGENTS.md
- recipes/generate-image/AGENTS.mdAGENTS.md
- recipes/rich-messages/AGENTS.mdAGENTS.md
- recipes/voice-reply/AGENTS.mdAGENTS.md
- socialagent-admin-console/AGENTS.mdAGENTS.md
- blueprints/appointment-scheduler/CLAUDE.mdCLAUDE.md
- blueprints/minimal/CLAUDE.mdCLAUDE.md
- blueprints/personal-assistant/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- image_generationSkill
- rich_messagesSkill
- voice_replySkill
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
- Very specific: line 9
Read this file and SOCIALAGENT_GUIDE.md before changing the project.
- Very specific: line 12
Do not edit socialagent_runtime/: it is a vendored copy that socialagent runtime update replaces.
- Very specific: line 14
Test locally with socialagent dev before deploying, and ask before socialagent deploy, socialagent destroy or anything that sends real …
≈ “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.
Files
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
- Read this file and
SOCIALAGENT_GUIDE.mdbefore changing the project; the guide covers tools, skills, scheduling, notifications and deploys. - Agent-side code (
agent.py,src/) imports onlysocialagent_runtime, its ownsrc/modules and libraries inrequirements.txt; handler Lambdas (handlers/) importsocialagentandhandlers/shared/. Do not mix the two. - A tool that sends a WhatsApp message during a turn uses
socialagent_runtime.notifyinside the entrypoint'ssocialagent_notify_context(); never call the notification Lambda directly from a tool. - Do not edit
socialagent_runtime/: it is a vendored copy thatsocialagent runtime updatereplaces. Change behavior in your own code instead. - Hard-code no account IDs, ARNs, phone numbers or model IDs; configuration lives in
socialagent.<env>.yaml. The model isMODEL_IDunderagent.environmentthere, which reaches the agent and the webhook together;src/model.pyonly names the default when it is unset, so do not edit it to change the model. - Test locally with
socialagent devbefore deploying, and ask beforesocialagent deploy,socialagent destroyor anything that sends real messages.
Files and directories
| Path | What it is |
agent.py | The 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.txt | Python dependencies for the agent container (bedrock-agentcore[strands-agents], boto3, aws-opentelemetry-distro). |
Dockerfile | Builds the ARM64 AgentCore Runtime image — copies agent.py, src/, and vendored socialagent_runtime/, installs requirements, runs under opentelemetry-instrument. |
socialagent.dev.yaml | Project config for local dev and deploy (project name, region, environment, phone_number_id). socialagent config sync fills in outputs. |
templates.yaml | WhatsApp 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__.py | Marks src as a package. |
src/skills.py | Skill 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__.py | Defines 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.py | Recipe-provided implementation (from the rich-messages recipe) — builds interactive WhatsApp payloads (buttons, lists, media, location). |
src/tools/voice_reply.py | Recipe-provided implementation (from the voice-reply recipe) — text-to-speech via Amazon Polly, delivered as a WhatsApp voice note. |
src/tools/generate_image.py | Recipe-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.py | Inbound 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.py | Outbound message + template delivery. |
handlers/scheduler.py | EventBridge scheduled events (reminders, agent tasks). |
handlers/event.py | External 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 initalso copies the vendoredsocialagent_runtime/package into the project root (notify,state,scheduler,messages,phone,config), which the tools insrc/tools/call during a turn.
Extension points
- Tools — add a new
@toolfunction insrc/tools/__init__.pyand append it to thesocialagent_toolslist. Tools receivetool_context.invocation_state["phone"]to scope per-user state. Drop in additional recipe tools withsocialagent recipe add <name>, then wire them in__init__.py. - Skills — add a markdown file under
src/skills/with YAML frontmatter (name,description, optionalauto_include, optionaloperations). It is auto-listed in the system prompt and loadable via theload_skilltool. No code change needed. - Scheduler operations — write the handler in
handlers/scheduler.pywith@app.on_schedule("<operation>"), add the operation toRECURRING_OPERATIONSinsrc/tools/__init__.pywith the data field the handler reads (Noneif it reads no text), and declare it in a skill'soperations:block so the model knows when to use it.schedule_recurringaccepts only the map's operations: the runtime image does not shiphandlers/, 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 operationhealth_check,send_text,send_templateorsend_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_TEMPLATEinagent.py. - Model — set
MODEL_IDunderagent.environmentinsocialagent.<env>.yaml;MODEL_ID=... socialagent devsets it for a local run (the YAML is not read there). Unset,src/model.pynames 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 inhandlers/event.py. - Templates — add WhatsApp templates to
templates.yamland sync them. - Template language —
handlers/scheduler.py'sTEMPLATE_LANGUAGEconstant (defaultes_MX) controls the language passed toctx.send_templatefor scheduled reminders/task-completion templates, and the hardcoded fallback text next to it is Spanish too. This blueprint defaults to Spanish; changeTEMPLATE_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.
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
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.

