feat: Add Agent Blueprints API support - #1687
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Original prompt from Devin Bot
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Greptile SummaryAdds Agent Blueprints support to the existing Agents SDK module.
Confidence Score: 5/5The PR appears safe to merge with no concrete changed-code defects identified. The new endpoint methods, public models, serializers, pagination behavior, and tests are internally aligned with the SDK’s existing service-boundary conventions. Important Files Changed
|
Description
Adds SDK support for the new Agent Blueprints REST endpoints on the existing
Agentsmodule, per the OpenAPI spec committed in workos/workos#70678:agents.createBlueprint/listBlueprints/getBlueprint/updateBlueprint/deleteBlueprint(/agents/blueprints(/:agent_blueprint_id))agents.mintToken(POST /agents/blueprints/:agent_blueprint_id/tokens) — supportsuser_delegated,autonomous,agent_delegated, andrefreshvariants;intentis a plain string in the requestagents.listInstances/getInstance/deleteInstance(/agents/instances(/:agent_instance_id))agents.listInstanceSessions/getInstanceSession/revokeInstanceSession(/agents/sessions(/:agent_instance_session_id),POST .../revoke)List endpoints return
AutoPaginatableand follow the existing serializer/deserializer (snake_case ↔ camelCase) conventions. Instance kinds usedelegated | autonomousper the spec.Endpoint status:
agent-blueprints-public-apifeature flag).POST /agents/blueprints/:id/tokens/validateis NOT included — it is added by the still-unmerged workos/workos#70610 and is not in the docs PR's committed spec.Tests mirror the existing
agents.spec.tsfixture style.npm run lint,npx tsc --noEmit,npm run build, and full Jest suite pass locally.Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
Link to Devin session: https://app.devin.ai/sessions/5e94e57d8ee94e0187e2bb46867e3954
Open in Devin Desktop: https://app.devin.ai/desktop/session/5e94e57d8ee94e0187e2bb46867e3954?variant=devin
Requested by: @m0tzy