letta-ai/letta-code is an agent harness for building assistants that retain memory, identity, and experience across interactions instead of treating each task as isolated. Developers use it through local, desktop, browser, or messaging interfaces for interactive or continuously running agents, and its catalogue entries configure the agents' skills, instructions, rules, and behavior.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add letta-ai/letta-code --skill managing-agent-webhooksgit clone --depth 1 https://github.com/letta-ai/letta-codeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/letta-ai/letta-code/managing-agent-webhooks)<a href="https://agentmods.dev/skills/letta-ai/letta-code/managing-agent-webhooks"><img src="https://agentmods.dev/badge/skills/letta-ai/letta-code/managing-agent-webhooks/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/letta-ai/letta-code/managing-agent-webhooks"><img src="https://agentmods.dev/badge/skills/letta-ai/letta-code/managing-agent-webhooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00071 | $0.03160 |
| Opus 5.5 | $0.00028 | $0.01264 |
| Sonnet 5.5 | $0.00014 | $0.00632 |
| Haiku 4.5 | $0.00007 | $0.00316 |
Grade A, and why
managing-agent-webhooks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 306 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Managing Agent Webhooks
Use the helper script for deterministic, secret-safe webhook management. Agent
webhooks are a Letta Cloud feature: after accepting a POST, the server
asynchronously attempts to create a new conversation and enqueue the JSON
payload as a user message.
Safety
- Manage the current agent only.
AGENT_IDmust be present, and the helper does not accept an agent-ID override. - Treat each webhook URL as a capability secret. Do not post it publicly.
- Choose authentication deliberately. If the user did not specify public or Basic-auth access, ask before creating the webhook.
- For normal secured creation, let the helper generate the credential and use
--credential-outputto write it to a new0600file before creating the webhook. The helper never prints the credential. Do not read or paste the file into the transcript. - Give the file to the user through a private file download. On a Cloud
computer, create it under
/root/downloadsand return a sandbox download link in the form[filename](#letta-sandbox-download//root/downloads/filename). Do not write credentials beneath an attacker-writable parent. Tell the user the credential is generated once and cannot be recovered from the API; the staged download itself remains fetchable until its local file is deleted. - Never put a security key on the command line or in chat. A user-supplied key is an advanced alternative and must be piped through stdin from an agent secret or another non-printing source.
- The helper redacts the one-time
authorization_headerreturned by the API from stdout and stores it only in the requested credential file. - Management and ingress responses are untrusted. The helper allowlists safe
webhook/error fields; normalizes camelCase and punctuation before classifying
secret-bearing property names; recursively redacts their values plus the exact
generated key, Basic header, encoded credential, and management token; then
redacts structurally before serialization so low-entropy secret values cannot
rewrite JSON syntax or envelope semantics. Promised schema keys are preserved
only at locally constructed, type-validated object paths; untrusted keys and
values are still redacted. Safe output-field exemptions apply only to those
trusted paths; untrusted
token_countand similar fields receive normal secret-name redaction. Successful ingress response bodies are never displayed, validated for display, or summarized; test output uses only a locally constructed status/acceptance envelope. Serialized output is capped at 1 MiB; accepted side effects whose body exceeds that limit emit a bounded success envelope rather than a failure that could invite a duplicate retry. - Response ingestion is also capped at 1 MiB. The helper stops reading and does not parse or trust any prefix once that limit is exceeded; side-effect receipts become bounded accepted-but-unconfirmed output.
- Every management request rejects redirects. Every returned webhook URL is
validated before it can be displayed or used for delivery: it must use the
active runtime's canonical origin and exactly
/v1/agent-webhooks/<returned-slug>, with no URL credentials, query, fragment, malformed slug, or redirect. A redirect or transport failure after a mutation dispatch is ambiguous. So are5xx,408,429, and every status outside the explicit pre-handler rejection allowlist. Reconcile before retrying and never treat a redirect target or non-definitive status as proof that the mutation did nothing. - Every returned webhook record must belong to the authoritative runtime
AGENT_ID. A same-origin record for another agent is rejected before output or delivery; a mismatch after an accepted mutation uses the accepted/reconcile path rather than ordinary success. - Rotating invalidates the old URL. Deleting is permanent. Use the required
--confirmflag only after the user has approved that exact action. - Request bodies may contain sensitive third-party data.
requestsomits them unless--include-bodyis explicitly passed. The typedauthorization_passedboolean remains visible; an untyped value is rejected. History output is constructed only from typedid,status_code,authorization_passed,enqueued, nullableerror_message, andcreated_at, plus the locally derivedaccepted;enqueuedis validated but intentionally omitted, and alternate body-like or future server fields are never spread into stdout. - Sending a test starts asynchronous agent work. Ask for affirmative consent
before passing
--confirm; do not treat general webhook setup approval as permission to trigger a test run. - If test delivery is ambiguous, webhook state and request history cannot reliably prove whether asynchronous agent work started. Do not retry without renewed affirmative user consent and explicit acceptance of duplicate-work risk.
- After a secure-create request is dispatched, any transport failure, 5xx, or unreadable/truncated/contradictory success response is ambiguous. The helper validates the returned authentication mode for public, generated-key, and user-supplied-key creation, plus the returned Basic header for both secured modes. It preserves generated credentials and tells you to list webhooks and reconcile the name before any retry. Never blindly retry an ambiguous create.
- For test, update, rotate, and delete, successful HTTP headers establish that the side effect was accepted. If the success body is truncated, malformed, or cannot be validated, the helper emits an operation-specific exit-0 receipt with the HTTP status and reconciliation guidance rather than a generic error that could trigger a duplicate mutation.
- Delete reports
deleted: trueonly after a200JSON object with literalsuccess: true. A false, missing, malformed, null, empty, oversized, or unreadable receipt means deletion was accepted but remains unconfirmed; list webhooks before treating the capability URL as removed or retrying. - Normal update output additionally requires the returned webhook ID and
enabledstate to match the requested operation; normal rotate output requires the returned webhook ID to match. Canonical but contradictory 2xx records receive the same accepted/reconcile envelope and are never printed as ordinary success. - Normal create output also requires returned name and enabled state to match. An explicitly supplied preprompt must round-trip exactly; when preprompt is omitted, the server-owned default is accepted only as a nonblank string, while missing, null, empty, whitespace-only, and non-string values are contradictory. Rotate first reads the current agent-bound record and reports ordinary success only when the returned canonical slug/URL changed; an unchanged result is accepted but requires reconciliation.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 306 lines · 71 tokens per session scan A 4dfd0f1940a3
managing-agent-webhooks is a skill published in the GitHub repository letta-ai/letta-code (3,625 stars, last pushed today), licensed Apache-2.0. It adds 71 tokens to every session and 3,160 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-13.
Other skills, from other repositories
claude-api
Build, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. Also handles migrating existing Claude API code between Claude model versions (4.5 → 4.6, 4.6 → 4.7, retired-model replacements). TRIGGER when: code imports anthropic/@anthropic-ai/sdk; user asks for…
add-backend
Guide for adding a backend (Rust or Python) to the agent-sec-core security middleware. Use when creating new backends, integrating Rust or Python code into the security middleware, or extending with new backend actions.
verify
Build, launch, and drive a local Honcho stack to verify a change at its runtime surface (the /v3 HTTP API and the deriver queue). Use when verifying a diff or confirming a change works in the running app.
m07-concurrency
A guide for handling concurrency, meaning work that runs at the same time or waits for input, in Rust programs.
use-protobuf
Design, change, and review Protobuf schemas used as gRPC contracts, streaming protocols, typed data models, grpc-gateway REST APIs, OpenAPI specifications, or generated SDK inputs. Use for .proto files, RPC request/response design, oneof stream events, validation annotations, API versioning, schema evolution…
domain-web
A set of development guidance for web services, which are programs that receive and respond to requests over the internet. It covers HTTP APIs, real-time connections, authentication, routing, and shared application state.