Create a new backend block following the Block SDK Guide. Guides through provider configuration, schema definition, authentication, and testing. TRIGGER when user asks to create a new block, add a new integration, or build a new node for the graph editor.
Install
npx skillscat add significant-gravitas/autogpt/new-block Install via the SkillsCat registry.
SKILL.md
New Block Creation
Read docs/platform/block-sdk-guide.md first for the full guide.
Steps
- Provider config (if external service): create
_config.pywithProviderBuilder - Block file in
backend/blocks/(fromautogpt_platform/backend/):- Generate a UUID once with
uuid.uuid4(), then hard-code that string asid(IDs must be stable across imports) Input(BlockSchema)andOutput(BlockSchema)classesasync def runthatyields output fields
- Generate a UUID once with
- Files: use
store_media_file()with"for_block_output"for outputs - Test:
poetry run pytest 'backend/blocks/test/test_block.py::test_available_blocks[MyBlock]' -xvs - Format:
poetry run format
Rules
- Analyze interfaces: do inputs/outputs connect well with other blocks in a graph?
- Use top-level imports, avoid duck typing
- Always use
for_block_outputfor block outputs