Create an agent, store user credentials, and get structured data back.Documentation Index
Fetch the complete documentation index at: https://docs.deck.co/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A Deck account (console.deck.co)
- A Deck API key
- Base URL:
https://api.deck.co/v2
Authorization header:
Set up your agent and tasks
Create an agent
Create an agent in the Console or through the API. Scope it to a single use case, like hotel reservations.
Request
Response
Create a task
Tasks define what the agent does, what task input it needs, and what output it returns. Tasks can be created in the Console with prompting or from a template. They can also be created through the API.Tasks start in
Request
Response
learning status. You can run tasks in any status, but success rates improve as the task progresses to test and then live. See Tasks for details on task statuses.Store credentials (optional)
Not all tasks require authentication. If the source requires a user to be logged in, you can store credentials ahead of time and pass them when running tasks. Deck encrypts and stores them in the Credential Vault so they can be reused across multiple task runs.| Method | Description |
|---|---|
username_password | Username and password |
none | No credentials needed |
Request
unverified status. It becomes verified the first time a task run successfully authenticates with it.
Response
Run a task
Run a task by providing the input. If the source requires authentication, pass acredential_id. Deck creates a session and executes the task. The input must match the task’s input schema.
Request
Run the task
Send a task run request with a
credential_id and input. The response comes back immediately with status: "queued". Deck creates a session and transitions the run to running once execution begins. The response includes a session_id you can reuse to run additional tasks without re-authenticating.If the source requires verification during execution (MFA, security question), the task run pauses with interaction_required status. See Handling interactions for details.Receive results
When the task completes, Deck sends a If a task run fails,
task_run.completed or task_run.failed event to your event destination. You can also poll GET /v2/task-runs/{task_run_id} until status is no longer queued or running. Task runs typically take seconds to minutes depending on complexity. We recommend polling every 5 seconds. The output contains structured data matching the task’s output schema.Response
status is failed and the errors array contains details.What’s next
Building your auth flow
Build a frontend for collecting credentials.
Handling interactions
Respond to MFA and verification prompts during execution.
Events
Subscribe to real-time notifications.