---
# @generated by sylphx-gen. Do not edit.
title: "Get a goal"
description: "`agents.goals.get` (GET /v1/{name}): Reads the exact Goal, including its terminal receipt after a successor starts."
type: reference
product: agents
summary: "Reads the exact Goal, including its terminal receipt after a successor starts."
updated: 2026-09-28
nav: false
---

Reads the exact Goal, including its terminal receipt after a successor starts.

- **Path** `GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/agent_sessions/agent-session/goals/goal`
- **Scope** `agents:sessions`
- **Effect** `read` — nothing is written.
- **Collection** [goals](/docs/api/goals)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | The exact Goal name. Required. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | The exact Session-owned Goal name. |
| `uid` | `string` | The platform Resource UID; the conserved Goal UUID is its name's final id. Output only. |
| `meta` | `ResourceMeta` | Standard resource metadata. Output only. |
| `objective` | `string` | The objective, nonempty and at most 4,000 characters. Required. |
| `token_budget` | `int64` | Omit unless the caller explicitly requests a positive token budget. |
| `state` | `GoalState` | Lifecycle; an execution hold is represented separately. Output only. One of `working`, `waiting`, `completed`, `failed`. |
| `version` | `int32` | Optimistic acceptance-contract version, starting at one. Output only. |
| `tokens_used` | `int64` | Observed tokens charged exactly once per runtime step. Output only. |
| `usage_unavailable` | `bool` | Unknown usage holds execution when a token budget is enforced. Output only. |
| `owner_paused` | `bool` | Explicit owner pause; an unfinished Goal stays unfinished. Output only. |
| `impasse` | `bool` | Execution held after the required repeated observation of an impasse. Output only. |
| `receipt` | `SessionGoalReceipt` | The terminal observation, retained after another Goal becomes active. Output only. |
| `create_time` | `timestamp` | When this Goal was created. Output only. |
| `update_time` | `timestamp` | When this Goal last changed. Output only. |

### ResourceMeta

| Field | Type | What it is |
| --- | --- | --- |
| `generation` | `int64` | Increases by one on every change to `spec`. Output only. |
| `etag` | `string` | Strong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as `If-Match` or `etag` to make Update and Delete conditional; a mismatch fails with ABORTED / 409 `ETAG_MISMATCH`. Output only. |
| `create_time` | `timestamp` | When the Resource was created. Output only. |
| `update_time` | `timestamp` | When the Resource last changed. Output only. |
| `delete_time` | `timestamp` | Set while the Resource is being deleted. Output only. |
| `labels` | `map<string, string>` | Caller-writable, indexed labels (AIP-122 label rules). |
| `annotations` | `map<string, string>` | Caller-writable, unindexed annotations. |
| `display_name` | `string` | Caller-writable human-readable name. |
| `creator` | `string` | The principal that created the Resource. Output only. |

### SessionGoalReceipt

| Field | Type | What it is |
| --- | --- | --- |
| `stage` | `string` | The observed delivery stage. Required. |
| `target` | `string` | The concrete surface or artifact observed. Required. |
| `evidence` | `struct` | Nonempty structured evidence from that surface. Required. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/agent_sessions/agent-session/goals/goal" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"
```

**TypeScript**

```ts
const response = await sylphx.agents.goals.get({ name: 'orgs/acme/projects/shop/envs/production/agent_sessions/agent-session/goals/goal' })
```

**Rust**

```rust
let mut req = sylphx::agents::GetAgentSessionGoalRequest::default();
req.name = "orgs/acme/projects/shop/envs/production/agent_sessions/agent-session/goals/goal".to_string();
let response = sx.agents().goals().get(req).await?;
```

**CLI**

```bash
sylphx agents goals get orgs/acme/projects/shop/envs/production/agent_sessions/agent-session/goals/goal
```

**MCP**

```json
{ "method_id": "agents.goals.get", "args": {"name":"orgs/acme/projects/shop/envs/production/agent_sessions/agent-session/goals/goal"} }
```
