Readonlyagent_Readonlyagent_Readonlyagent_Readonlyagent_ReadonlyschedulesAgent ID (agt_...) or lookup key of the agent whose health actions you want to list.
Optionalparams: { kind?: string[]; source?: string[]; status?: string[] }Query parameters.
Optionalkind?: string[]Filter results to actions of one or more kinds. Accepted values: "env_var" (a required secret or config value), "install" (an OAuth or integration install step), and "custom" (a platform-defined check). Omit to return all kinds.
Optionalsource?: string[]Filter results to actions from one or more lifecycle stages. Accepted values: "setup" (actions created during agent installation) and "health" (ongoing health checks). Omit to return actions from all stages.
Optionalstatus?: string[]Filter results to actions in one or more statuses. Accepted values: "pending", "completed", "skipped", and "degraded". Omit to return actions in all statuses.
Object containing a data array of health action objects for the specified agent.
Create a routine
Creates a new routine and attaches it to the specified agent. Routines define
how an agent responds to events or a cron schedule; the handler_type controls
which execution model is used.
The routine is created in "draft" status by default. To start processing
events immediately, either pass status: "active" or call the activate
endpoint after creation. Scheduled routines must run no more frequently than
once per hour. Requires app scope.
Agent ID (agt_...) that this routine will be attached to.
Request body.
Optionalacl?: {Access control list governing who can read or manage this routine.
Optionalconfig?: stringWorkflow config ID (cfg_...). Required when handler_type is "workflow_graph".
Optionaldescription?: stringOptional human-readable description of what this routine does.
Optionalevent_config?: Record<string, unknown>Mapping of event types to trigger configuration. Each key is an event type string; each value is an object with a "filters" map and an optional "dedupe_key_path" (a JSON path used to deduplicate events, e.g. "$.thread.id").
Optionalevent_type?: stringEvent type that triggers this routine. Deprecated — use event_config instead.
Execution model for this routine. One of "workflow_graph", "script", "preset", or "chain".
Optionallookup_key?: stringStable, unique key you assign to this routine for deterministic lookup. Must be unique within the app.
Optionalmetadata?: Record<string, unknown>Arbitrary key-value metadata you can attach to the routine. Not interpreted by the platform.
Human-readable display name for the routine.
Optionalpreset_config?: {Configuration passed to the preset at runtime. Used when handler_type is "preset".
Optionalpreset_name?: stringName of the registered preset to use. Required when handler_type is "preset".
Optionalschedule?: stringCron expression for time-triggered routines (e.g. "0 9 * * 1"). Must not be more frequent than once per hour.
Optionalscript?: stringInline script source. Required when handler_type is "script".
Optionalstatus?: stringInitial lifecycle status. One of "draft" or "active". Defaults to "draft".
Optionalsteps?: {Ordered list of steps for a chain handler. Required when handler_type is "chain"; must be omitted or empty otherwise. Each step must have exactly one handler body field (preset_name, script, or config) matching that step's handler_type.
Optionaltrigger_context?: stringContext in which the routine is triggered. One of "chat_session" or "event". Defaults to "event".
The newly created routine.
List working memory entries for an agent Returns a paginated list of working memory entries belonging to the specified agent. Entries are key-value pairs the agent stores for context between interactions. Results are ordered by creation time descending (newest first) and can be filtered with a substring search against the key name. Requires an app-scoped API key. The authenticated caller must have access to the app the agent belongs to. Returns 403 if the key is not app-scoped, and 404 if the agent does not exist within the accessible scope.
Agent ID (agt_...) whose working memory entries to retrieve.
Optionalparams: { page?: number; pageSize?: number; search?: string }Query parameters.
Optionalpage?: numberPage number to retrieve, starting at 1. Defaults to 1.
OptionalpageSize?: numberNumber of entries to return per page. Defaults to 25.
Optionalsearch?: stringSubstring filter applied to entry keys (case-insensitive). Omit to return all keys.
Paginated list of working memory entries for the agent.
Create an agent
Creates a new agent. Supports two mutually exclusive provisioning modes.
Template mode — pass template with the ID or lookup_key of an existing
AgentTemplate config. The agent's tools, routines, skills, and installations are
provisioned from that template's config_ref entries.
Bundle mode — pass template_bundle with a self-contained install payload
(AgentTemplate body plus every skill, script, and config it references). The entire
bundle commits in a single transaction; any failure rolls back the whole install and
the response includes installed_configs[] — one entry per persisted config.
Pass exactly one of template or template_bundle. If neither is supplied, name
is required and a blank agent is created. Requires authentication; when called under
a developer app scope (/developer/apps/:app/...), the caller must hold the app scope
for the target app.
Request body.
Optionalacl?: {Access control list controlling which users, teams, or orgs can read or manage this agent.
Optionalemail?: stringEmail address assigned to the agent. Used as the agent's contact identity.
Optionalidentity?: stringSystem-prompt identity string describing who the agent is. Passed verbatim to the model on each conversation turn.
Optionallookup_key?: stringStable, unique slug used to look up this agent by name instead of ID. Must be unique within the owning app or org.
Optionalmetadata?: Record<string, unknown>Arbitrary key-value map stored on the agent. Not interpreted by the platform.
Optionalmodel?: stringDefault AI model identifier for this agent, e.g. claude-sonnet-4-5. Overridden per-request when the caller specifies a model.
Optionalname?: stringDisplay name for the agent. Required when neither template nor template_bundle is provided.
Optionalorg?: stringOrganization ID (org_...) that should own this agent. Mutually exclusive with team and user.
Optionaloriginator?: stringFree-form label identifying the source or author of the agent, e.g. a user ID, a deploy pipeline, or a slug.
Optionalphone_number?: stringPhone number assigned to the agent in E.164 format, e.g. +15550001234.
Optionalprofile_picture?: { data: string; filename: string; mime_type: string }Profile picture to attach to the agent. All three subfields are required when this object is present.
Optionalteam?: stringTeam ID (team_...) that should own this agent. Mutually exclusive with org and user.
Optionaltemplate?: stringID (cfg_...) or lookup_key of an existing AgentTemplate config to provision from. Mutually exclusive with template_bundle.
Optionaltemplate_bundle?: {Self-contained install bundle containing an AgentTemplate plus all referenced skills and configs. The entire bundle is committed atomically. Mutually exclusive with template.
Optionaluser?: stringUser ID (usr_...) that should own this agent. Mutually exclusive with org and team.
The newly created agent. When template_bundle was supplied, the response also includes installed_configs[] — one entry per persisted config object, with key echoing the caller-supplied input identifier.
Delete an agent Permanently deletes an agent and all of its associated resources. This action cannot be undone. The authenticated caller must own the agent or hold sufficient permissions within its owning org or team. When called under a developer app scope, the caller must hold the app scope for the target app.
ID (agi_...) or lookup_key of the agent to delete.
Empty body. Returns HTTP 204 on success.
Export an agent as an AgentTemplate
Reconstructs an AgentTemplate config from a deployed agent and all of its
sub-resources (tools, routines, skills, installations). Returns the template
definition together with every dependent config file (scripts, workflows, skills,
schemas) and their raw content, producing a fully self-contained export bundle.
Use this endpoint to snapshot an agent's current configuration for backup,
migration, or to seed a new Solution template. Pass remove_identity: true to
strip instance-specific fields (email, phone number) before export.
The authenticated caller must own the agent or hold sufficient permissions within
its owning org or team. When called under a developer app scope, the caller must
hold the app scope for the target app.
ID (agi_...) or lookup_key of the agent to export.
Optionalparams: { removeIdentity?: boolean }Query parameters.
OptionalremoveIdentity?: booleanWhen true, strips instance-unique identity fields (email, phone_number) from the exported template so it can be reused as a generic blueprint.
Export bundle containing the reconstructed AgentTemplate and all dependent config files with their raw content.
Retrieve an agent
Returns the agent identified by ID or lookup_key. The authenticated caller must
own the agent or hold sufficient permissions within its owning org or team.
When called under a developer app scope, the agent must belong to that app. Use the
list endpoint to retrieve many agents at once.
ID (agi_...) or lookup_key of the agent to retrieve.
The requested agent.
Retrieve an agent's health profile
Returns an aggregate health profile for the specified agent, including an overall
status, a numeric health score, recent activity metrics, and a list of recommended
remediation actions.
The health check is computed on demand at request time. The checked_at timestamp
in the response reflects when the evaluation ran. Use this endpoint to surface
diagnostics about tool availability, model configuration, and runtime activity in
dashboards or monitoring workflows.
The authenticated caller must own the agent or hold sufficient permissions within
its owning org or team. When called under a developer app scope, the caller must
hold the app scope for the target app.
ID (agi_...) or lookup_key of the agent to evaluate.
Aggregate health profile for the agent, including status, score, activity metrics, and recommended actions.
List agents
Returns a paginated list of agents visible to the authenticated caller. Results are
ordered by creation time descending.
Use search to filter by name, org, team, or owner fields. Use user or org_id
to scope the list to a specific owner. Use template_config to find agents whose
last applied template matches a given config ID. Use solution_config to find
agents whose last applied template was imported as part of any of the given
Solution config IDs.
Pagination is page-based: pass page and page_size to navigate through large
result sets. When called under a developer app scope, only agents belonging to that
app are returned.
Optionalparams: {Query parameters.
OptionalorgId?: stringOrganization ID (org_...) to filter by. Returns only agents owned by this org.
Optionalpage?: numberPage number to retrieve, 1-indexed. Defaults to 1.
OptionalpageSize?: numberNumber of agents to return per page. Defaults to 25.
Optionalsearch?: stringFree-text search string matched against the agent name, org, team, and owner fields.
OptionalsolutionConfig?: string[]Solution config IDs (cfg_...) to filter by. Returns only agents whose last applied template was imported as part of any of the listed Solutions. Pass one or more IDs.
OptionaltemplateConfig?: stringConfig ID (cfg_...) or lookup_key of an AgentTemplate. Returns only agents whose last applied template matches.
Optionaluser?: stringUser ID (usr_...) to filter by. Returns only agents owned by this user.
Paginated list of agents matching the supplied filters.
Search an agent's knowledge base
Performs a semantic search over an agent's knowledge base and returns a ranked,
kind-discriminated list of matching items.
Two item kinds may appear in data:
"chunk" — chunk-level results from the agent's context store. Present for all agents."document" — document-level results. Present only when the agent has an active
archastro/knowledge installation.
Results from both kinds are scored with Reciprocal Rank Fusion (RRF), normalized to
be comparable across kinds, then merged into a single ranked list. On a relevance tie,
chunks appear before documents. The total number of results is capped at max_results
across both kinds.
Use mode to choose the retrieval strategy: "hybrid" (default) combines vector and
full-text search; "vector" and "fulltext" select each strategy independently.ID (agi_...) or lookup_key of the agent whose knowledge base to search.
Request body.
Optionalmax_results?: numberMaximum total results to return across all kinds. Chunks and documents are ranked together and the list is capped at this value. Defaults to 20; maximum is 100.
Optionalmode?: stringRetrieval strategy. One of "hybrid" (default), "vector", or "fulltext".
Natural-language search query used to retrieve relevant knowledge items.
Optionalrecency_days?: numberWhen set, restricts results to items indexed within the last N days.
Optionalsource_types?: string[]Array of source-type slugs used to filter chunk results, e.g. ["web", "file"]. Omit to include all source types.
Successful response
Create a thread for an agent
Creates a new thread owned by the specified agent. The thread is scoped to the
agent's identity and is immediately available for messaging.
The authenticated caller must have access to the agent's parent app. If your
API key is scoped to a specific app, pass that app's ID via the app parameter.
Attempting to create a thread for an agent you cannot access returns 404.
By default the platform may send an automatic welcome message into the new
thread. Pass skip_welcome_message: true to suppress this behavior.
Agent ID (agt_...). The thread will be owned by this agent.
Request body.
Optionalskip_welcome_message?: booleanWhen true, suppresses the automatic welcome message that the platform sends when a new thread is created. Defaults to false.
Attributes for the new thread.
The newly created thread.
Update an agent
Updates one or more fields on an existing agent. Only the fields you supply are
changed; omitted fields retain their current values.
To clear the agent's default model, pass model as an empty string. The
authenticated caller must own the agent or hold write permissions within its owning
org or team. When called under a developer app scope, the caller must hold the app
scope for the target app.
ID (agi_...) or lookup_key of the agent to update.
Request body.
Optionalacl?: {Replacement access control list. Fully replaces the existing ACL.
Optionalemail?: stringNew email address for the agent.
Optionalidentity?: stringReplacement identity system-prompt string describing who the agent is.
Optionallookup_key?: stringNew lookup_key slug. Must be unique within the owning app or org.
Optionalmetadata?: Record<string, unknown>Replacement key-value metadata map. The entire map is replaced, not merged.
Optionalmodel?: stringNew default AI model identifier, e.g. claude-sonnet-4-5. Pass an empty string to clear the agent's default model.
Optionalname?: stringNew display name for the agent.
Optionalorg?: stringOrganization ID (org_...) to transfer ownership to.
Optionaloriginator?: stringReplacement originator label identifying the source or author of the agent.
Optionalphone_number?: stringNew phone number for the agent in E.164 format, e.g. +15550001234.
Optionalprofile_picture?: { data: string; filename: string; mime_type: string }Replacement profile picture. All three subfields are required when this object is present.
Optionalteam?: stringTeam ID (team_...) to transfer ownership to.
Optionaluser?: stringUser ID (usr_...) to transfer ownership to.
The updated agent with all current field values.
Upgrade an agent from an AgentTemplate Upgrades an existing agent by reconciling it against an AgentTemplate from a Solution. Supports two modes:
"reapply" (default) — re-applies the agent's currently tracked template,
picking up any changes the template author has made since the last apply."replace" — moves the agent to a different template. template is required
in this mode.
Set dry_run: true to compute and return the full upgrade diff (adds, updates,
removes, noops) without writing any changes. The response includes a
review_fingerprint you can pass back via expected_review_fingerprint on the
live apply to guard against the diff changing between review and execution.
Safe overrides (name, email, phone_number, metadata, identity,
originator, model) let you pin instance-specific values that should not be
overwritten by the template during the upgrade.
The authenticated caller must own the agent or hold write permissions within its
owning org or team. When called under a developer app scope, the caller must hold
the app scope for the target app.ID (agi_...) or lookup_key of the agent to upgrade.
Request body.
Optionaldry_run?: booleanWhen true, computes and returns the full upgrade diff without persisting any changes. Use with expected_review_fingerprint to guard the live apply.
Optionalemail?: stringInstance-specific email address override. Pins this value so the template upgrade does not overwrite it.
Optionalexpected_review_fingerprint?: stringStale-review guard. Pass the review_fingerprint returned by a prior dry_run response to ensure the diff has not changed between review and live apply. Returns an error if the fingerprint no longer matches.
Optionalidentity?: stringInstance-specific identity system-prompt override. Pins this value so the template upgrade does not overwrite it.
Optionalmetadata?: Record<string, unknown>Instance-specific metadata override. Pins this value so the template upgrade does not overwrite it.
Optionalmode?: "reapply" | "replace"Upgrade mode. "reapply" (default) refreshes the agent's tracked template; "replace" moves the agent to a different template (requires template).
Optionalmodel?: stringInstance-specific default model override. Pins this value so the template upgrade does not overwrite it. Pass an empty string to clear the model.
Optionalname?: stringInstance-specific name override. Pins this value so the template upgrade does not overwrite it.
Optionaloriginator?: stringInstance-specific originator label override. Pins this value so the template upgrade does not overwrite it.
Optionalphone_number?: stringInstance-specific phone number override in E.164 format. Pins this value so the template upgrade does not overwrite it.
Optionaltemplate?: stringID (cfg_...) or lookup_key of the target AgentTemplate config. Optional in "reapply" mode; required in "replace" mode.
The upgrade outcome, including the updated agent, the source Solution and template summaries, and the full diff (upgrade_result) with status, dry-run flag, aggregate counts, and a per-resource change list. When dry_run is true, agent is null and no changes are persisted.
List health actions for an agent Returns all health actions associated with a given agent. Health actions represent required or recommended steps — such as setting environment variables, completing OAuth installations, or running custom verifiers — that an agent needs to reach a healthy state. Results are not paginated; the full list for the agent is returned. Use the
source,status, andkindfilters to narrow results to the subset your UI or workflow needs. Multiple values for the same filter are treated as OR (e.g. passing two statuses returns actions matching either). The caller must be authenticated and scoped to the app that owns the agent.