Skip to content

Asana: Get an agent

Asana agents.getAgent: arguments, response, policy and SDK examples.

← Agents operations · Get started

Operation asana.getagent

Provider route: GET /agents/{agent_gid}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/asana with npm, or alter-sdk-asana with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { AsanaIntegration } from "@alter-ai/asana";
async function execute(input: Parameters<AsanaIntegration["agents"]["getAgent"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new AsanaIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.agents.getAgent(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_asana import AsanaIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = AsanaIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.agents.get_agent(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.agent_gidstringRequired within parent
queryobjectOptionalAdditional keys: not allowed
query.opt_prettybooleanOptional
query.opt_fieldsarrayOptional
query.opt_fields[]stringEach itemOne of: behavior_guidance, description, name, photo, photo.image_1024x1024, photo.image_128x128, photo.image_21x21, photo.image_27x27, photo.image_36x36, photo.image_60x60, resource_subtype, workspace

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRoot
$ (allOf 1)objectAll variants apply
$ (allOf 1).dataModelOptionalExpand Get an agent — response body — data data — Agent Response
$ (allOf 2)ModelAll variants applyExpand Get an agent — response body — data

Referenced models: Get an agent — response body — data data — Agent Response, Get an agent — response body — data

Get an agent — response body — data data — Agent Response
FieldTypePresenceDescription and constraints
$JSONRoot
$ (allOf 1)ModelAll variants applyExpand Get a list of agents in a workspace — response body — data, next page data item
$ (allOf 2)objectAll variants apply
$ (allOf 2).descriptionJSONOptional
$ (allOf 2).description (anyOf 1)stringAlternativeA brief description of what the agent does.
Read only: true
$ (allOf 2).description (anyOf 2)nullAlternative
$ (allOf 2).behavior_guidanceJSONOptional
$ (allOf 2).behavior_guidance (anyOf 1)stringAlternativeA description of the agent's behavior.
Read only: true
$ (allOf 2).behavior_guidance (anyOf 2)nullAlternative
$ (allOf 2).workspaceJSONOptionalThe workspace this agent is instantiated within.
Read only: true
$ (allOf 2).workspace (allOf 1)ModelAll variants applyExpand Update a workspace — request body — body data
$ (allOf 2).workspace (allOf 2)objectAll variants apply
$ (allOf 2).photoJSONOptional
$ (allOf 2).photo (anyOf 1)ModelAlternativeExpand Get an agent — response body — data data photo image 1024x1024, image 128x128, image 21x21, image 27x27, image 36x36, image 60x60
$ (allOf 2).photo (anyOf 2)nullAlternative

Referenced models: Get a list of agents in a workspace — response body — data, next page data item, Update a workspace — request body — body data, Get an agent — response body — data data photo image 1024x1024, image 128x128, image 21x21, image 27x27, image 36x36, image 60x60

Get an agent — response body — data
FieldTypePresenceDescription and constraints
$objectRoot
dataModelRequired within parentExpand Get an agent — response body — data data — sdk__Agent Response

Referenced models: Get an agent — response body — data data — sdk__Agent Response

Get a list of agents in a workspace — response body — data, next page data item
FieldTypePresenceDescription and constraints
$objectRootA generic Asana Resource, containing a globally unique identifier.
gidstringOptionalGlobally unique identifier of the resource, as a string.
Read only: true
resource_typestringOptionalThe base type of this resource.
Read only: true
resource_subtypestringOptionalThe subtype of the agent. `asana_teammate` is an Asana-built teammate.
Known values: asana_teammate
Read only: true
namestringOptionalThe display name of the agent.
Read only: true
Update a workspace — request body — body data
FieldTypePresenceDescription and constraints
$objectRootA *workspace* is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
gidstringOptionalGlobally unique identifier of the resource, as a string.
Read only: true
resource_typestringOptionalThe base type of this resource.
Read only: true
namestringOptionalThe name of the workspace.
Get an agent — response body — data data photo image 1024x1024, image 128x128, image 21x21, image 27x27, image 36x36, image 60x60
FieldTypePresenceDescription and constraints
$objectRootA map of the agent's avatar image in various sizes, or null if no photo is set.
Read only: true
image_21x21stringOptionalPNG image at 21x21 pixels.
Format: uri
image_27x27stringOptionalPNG image at 27x27 pixels.
Format: uri
image_36x36stringOptionalPNG image at 36x36 pixels.
Format: uri
image_60x60stringOptionalPNG image at 60x60 pixels.
Format: uri
image_128x128stringOptionalPNG image at 128x128 pixels.
Format: uri
image_1024x1024stringOptionalJPEG image at 1024x1024 pixels.
Format: uri
Get an agent — response body — data data — sdk__Agent Response
FieldTypePresenceDescription and constraints
$objectRootA generic Asana Resource, containing a globally unique identifier.
gidstringOptionalGlobally unique identifier of the resource, as a string.
Read only: true
resource_typestringOptionalThe base type of this resource.
Read only: true
resource_subtypestringOptionalThe subtype of the agent. `asana_teammate` is an Asana-built teammate.
Known values: asana_teammate
Read only: true
namestringOptionalThe display name of the agent.
Read only: true
descriptionJSONOptional
description (anyOf 1)stringAlternativeA brief description of what the agent does.
Read only: true
description (anyOf 2)nullAlternative
behavior_guidanceJSONOptional
behavior_guidance (anyOf 1)stringAlternativeA description of the agent's behavior.
Read only: true
behavior_guidance (anyOf 2)nullAlternative
workspaceJSONOptionalThe workspace this agent is instantiated within.
Read only: true
workspace (allOf 1)ModelAll variants applyExpand Get a tag — response body — data data workspace
workspace (allOf 2)objectAll variants apply
photoJSONOptional
photo (anyOf 1)ModelAlternativeExpand Get an agent — response body — data data photo image 1024x1024, image 128x128, image 21x21, image 27x27, image 36x36, image 60x60
photo (anyOf 2)nullAlternative

Referenced models: Get an agent — response body — data data photo image 1024x1024, image 128x128, image 21x21, image 27x27, image 36x36, image 60x60, Get a tag — response body — data data workspace

Get a tag — response body — data data workspace
FieldTypePresenceDescription and constraints
$objectRootA generic Asana Resource, containing a globally unique identifier.A generic Asana Resource, containing a globally unique identifier.
A *workspace* is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
gidstringOptionalGlobally unique identifier of the resource, as a string.
Read only: true
resource_typestringOptionalThe base type of this resource.
Read only: true
namestringOptionalThe name of the workspace.

SDK function policy ID: asana.getagent. Catalog operation: asana:getAgent. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.