social-messaging-agent-runtime-toolkit / minimal
AGENTS.md4 starsChanged 8 days agoApache-2.0View on GitHub
A bare-bones WhatsApp echo agent — the smallest runnable SMART (Social Messaging Agent Runtime Toolkit) project and the recommended starting point for building your own agent from scratch. This blueprint wires the full SMART message path (inbound webhook, outbound notification, scheduler, and event Lambdas) to a trivial agent that echoes whatever the user sends. Everything works end to end, so you can replace the echo logic with your own agent and deploy immediately. Note: socialagent init also copies the vendored…
- 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/personal-assistant/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
Minimal Blueprint
A bare-bones WhatsApp echo agent — the smallest runnable SMART (Social Messaging Agent Runtime Toolkit) project and the recommended starting point for building your own agent from scratch.
This blueprint wires the full SMART message path (inbound webhook, outbound notification, scheduler, and event Lambdas) to a trivial agent that echoes whatever the user sends. Everything works end to end, so you can replace the echo logic with your own agent and deploy immediately.
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. - This agent has no tools. If you add one that sends a WhatsApp message during a turn, wrap the entrypoint's agent call in
socialagent_notify_context()and return its queue inSocialAgentResponse(seeSOCIALAGENT_GUIDE.md); 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. - 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 that runs inside the AgentCore Runtime. Defines a BedrockAgentCoreApp, an @app.entrypoint async def invoke(payload, context) that echoes payload["prompt"], logs the turn to AgentCore Memory via create_memory_client, and returns {"result": ...}. This is the file you replace with your own agent logic. |
requirements.txt | Python dependencies installed into the agent runtime container (bedrock-agentcore[strands-agents], boto3, aws-opentelemetry-distro). Add your agent's libraries here. |
Dockerfile | Builds the ARM64 container image for the AgentCore Runtime. Copies agent.py and the vendored socialagent_runtime/ package, installs requirements, and starts the app under opentelemetry-instrument. |
socialagent.dev.yaml | Project config for local dev and deploy (project name, region, environment, deployment type, phone_number_id). socialagent config sync populates outputs from Terraform. |
handlers/ | The Lambda Control Layer handlers. Each file builds an SocialAgentApp from SocialAgentConfig.from_env() and exports a handler. These run inside AWS Lambda, not the agent container. |
handlers/webhook.py | Inbound WhatsApp messages (via SNS). Parses the message and invokes the AgentCore Runtime. |
handlers/notification.py | Outbound message + template delivery (invoked by socialagent_runtime.notify). |
handlers/scheduler.py | EventBridge scheduled events. Contains a commented @app.on_schedule example. |
handlers/event.py | External events via API Gateway. Contains a commented @app.on_event example. |
handlers/shared/ | Code packaged into every handler Lambda zip. Import it as from shared.my_module import .... Use it for Lambda-side helpers (event parsing, CRM adapters) — never agent tools or skills. |
Note:
socialagent initalso copies the vendoredsocialagent_runtime/package into the project root. It is the Agent Runtime Package (notify,state,scheduler,messages,phone,config) your agent calls during a turn.
Extension points
- Agent logic — replace the echo body in
agent.py'sinvokefunction. Bring any agent framework (Strands, LangGraph, plain Bedrock calls); onlyagent.pyis framework-specific. - Tools and skills — this blueprint ships none. Add agent tools and skills under a
src/directory and wire them intoagent.py, or copy a ready-made tool withsocialagent recipe add <name>(e.g.rich-messages,voice-reply,generate-image). - Scheduled messages — uncomment and implement the
@app.on_schedule("<operation>")handler inhandlers/scheduler.pyfor proactive/recurring outreach. - External events — uncomment and implement the
@app.on_event("<event>")handler inhandlers/event.pyto receive events from outside systems via API Gateway. - Lambda-side helpers — add shared modules under
handlers/shared/. - Dependencies — add libraries to
requirements.txt.
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 # interactive local REPL (no deployed stack)socialagent dev runs the agent loop locally and stubs out AWS-backed calls, so you can iterate on agent.py before deploying.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

