Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: None
Description of changes:
Adds a Python integration sample at
python/03-integrate/tools/mailveri: a single Strands agent that verifies every prospect email with MailVeri before it drafts outreach. I am connected to MailVeri.The sample shows two Strands patterns that are useful beyond email:
@toolmethods with shared state.MailVeriToolsexposesverify_emails,get_credit_balanceandsave_draftas bound tools, and they share the run's verification results.save_draftrejects any address that was not verified in this run or whose decision is notsend, so a model mistake cannot produce a draft for an invalid or unconfirmed address.How it works:
verified_outreach.pyloadsprospects.example.csv(or--prospects), builds a Bedrock-backed agent (defaultus.anthropic.claude-sonnet-4-6, overridable withBEDROCK_MODEL_ID) and runs it.verify_emailscalls the documentedPOST https://api.mailveri.com/v1/verify-mail/endpoint once per address, with a short pause to stay under the documented rate limit.VALIDmaps to send;INVALID,DISPOSABLEandFULL_INBOXto skip;ROLE_ACCOUNT,CATCH_ALLandUNKNOWNto review (role and catch-all can be opted in with env flags). If the account runs out of credits, it stops and returns the unchecked addresses.drafts.csvand every decision toverification_log.csv.MCPClientviauvx.Repository changes outside the sample folder:
samples.json: regenerated withnode generate-samples-manifest.mjs.generate-samples-manifest.mjs: oneTITLE_WORDSentry (mailveri: 'MailVeri') so the generated title is not "Mailveri". Happy to drop it if you prefer.samples-catalog.json, so it stays repository-only like the other03-integrate/toolssamples.The sample follows
.github/templates/use-cases/(basic script structure, README template sections, security notes and disclaimer). The architecture is a Mermaid diagram in the README instead of a PNG.Testing:
uv syncanduv run --group dev pytest tests: 20 passed on Python 3.10 and 3.13 withstrands-agents1.64.0. All MailVeri HTTP is mocked withrespx; the tests cover the decision table, out-of-credits and auth errors, thesave_draftgate, tool registration on a realAgent, and a directagent.tool.verify_emails(...)call.ruff checkandruff format --check: clean.node --test generate-samples-manifest.test.mjsandnode generate-samples-manifest.mjs --check: pass.MCPClientstarted the server withuvxand listed its tools.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.