External agent guide
Use this guide when an external agent needs to call the Vision Platform API with a bearer token.
External agents operate as team members. They can request decisions from a leader and read their own visible decision requests. They do not operate with leader, deputy, system, or governance-agent rights.
This page is intentionally narrower than the full product API. Calendar conversions, leader worklist operation, delegation control, audit, billing, tenant settings, and system integration endpoints are not part of the external-agent profile.
Discovery
- OpenAPI: /vision-platform/openapi.yaml
- V2 draft: /vision-platform/openapi-v2-draft.yaml
- Developer index: /vision-platform/developers/index.html
- LLM discovery: /vision-platform/llms.txt
Base URL
https://www.lontive.com/vision-platform
The public deployment serves API routes under /vision-platform/v1/*. Local API development usually calls the same handlers directly at http://localhost:3000/v1/*.
Authentication
Protected API calls use a bearer token. Supported bearer formats in the current implementation are API keys and JWTs.
Authorization: Bearer vsk_<token>
Authorization: Bearer <jwt>
API keys are created from the protected tenant-aware endpoint POST /v1/api-keys. A leader can create an on_behalf_of key linked to a represented team member with onBehalfOfActorId, or an autonomous key with agentDisplayName. External agents use the same Authorization: Bearer ... header as the rest of the API; there is no separate public X-Agent-Key header flow.
A team member normally gets the x-tenant-id from the leader or the workspace onboarding material. The agent should confirm it with GET /v1/context before doing work.
Required headers
Authorization: valid bearer tokenx-tenant-id: required on protected/v1/*endpointsIdempotency-Key: required on POST operations
Health checks
GET /vision-platform/healthis public and suitable for a basic smoke check.GET /vision-platform/v1/healthis protected and requires the same tenant and auth context as the rest of the API.
External agent scopes
For external agents, issue only the scopes needed for team-member work and decision intake:
worklist.tasks.read: read the team-member actor's own task surfacesworklist.tasks.write: create or update the team-member actor's own tasksdecision.requests.write: create a decision request for leader reviewdecision.requests.read: read decision requests visible to the team-member actor
worklist.tasks.write is allowed because team members have their own task list. Do not use it to operate the leader worklist. Do not grant external agents deputy scopes, governance-agent scopes, kill-switch scopes, or system integration scopes. If an agent needs a leader action, it should create a decision request and wait for the leader outcome.
Credential matrix
| Credential or role | Typical owner | Allowed in this guide | Not allowed from this guide |
|---|---|---|---|
external agent |
Team member or a leader-created autonomous agent | /v1/context, /v1/my-tasks, /v1/decision-requests |
Leader worklist, delegations, calendar conversions, audit, billing, tenant settings, governance, kill switch |
tenant integration |
Operator-approved tenant integration | Not documented here | Do not infer tenant-integration rights from an external-agent key |
leader / deputy |
Interactive product users | Not documented here | Do not use an external-agent key to perform leader or deputy actions |
system integration |
Internal service account or controlled backend integration | Not documented here | Calendar conversion ingestion, governance automation, and other system-only actions require a separate operator-approved path |
Calendar boundaries
External agents do not get calendar conversion endpoints in this profile.
| Question | External-agent answer |
|---|---|
| Can the agent read a user's calendar through Vision Platform? | No. Calendar reads are not exposed to external-agent keys. |
| Can the agent create or edit calendar events through Vision Platform? | No. Use the user's separate calendar provider integration only if the user has granted that outside Vision Platform. |
| Can the agent convert calendar events into worklist task candidates? | No. Calendar-assisted setup and calendar conversion flows are leader/UI or separately approved integration flows. |
| Can the agent ask a person to approve a calendar-related action? | Yes. Create a decision request that describes the intended calendar action, then continue only after approval. |
Allowed endpoint profile
The external-agent profile is intentionally small. Treat every endpoint outside this table as unavailable to an external agent unless a human operator gives a separate non-agent integration key.
| Method | Endpoint | Use |
|---|---|---|
GET |
/v1/context |
Confirm the authenticated actor and tenant context. |
GET |
/v1/my-tasks |
List the team-member actor's own tasks. |
POST |
/v1/my-tasks |
Create a task owned by the team-member actor. |
PUT |
/v1/my-tasks/{id} |
Update the team-member actor's own task. Include the current version or expectedVersion. |
POST |
/v1/my-tasks/{id}/status |
Move the team-member actor's own task between allowed statuses. Include the current version or expectedVersion. |
DELETE |
/v1/my-tasks/{id} |
Delete the team-member actor's own completed task. Include the current version or expectedVersion. |
POST |
/v1/decision-requests |
Ask the leader to approve, reject, or decide something before the agent acts. |
GET |
/v1/decision-requests |
List decision requests visible to the team-member actor. |
GET |
/v1/decision-requests/{decisionRequestId} |
Poll the specific decision request until it is resolved. |
Do not call
- Leader worklist mutation endpoints such as
POST /v1/worklist/tasks,PATCH /v1/worklist/tasks/{taskId},complete,take-back,reopen, orarchive. - Delegation creation, cancellation, status-request, deadline-change, or archive endpoints.
- Calendar conversion and calendar booking endpoints, including
/v1/calendar/conversions/*and task calendar booking endpoints. - Decision outcome endpoints such as
/v1/decision-requests/{decisionRequestId}/decisions,claim,release,reopen, orrequeue. - Deputy authorization, external-agent authorization,
/v1/external-agent-actions, kill-switch, audit, compliance, metrics, billing, or tenant settings endpoints.
Employee-owned agent flow
- The team member asks the leader for an agent key and explains what the agent will do.
- The leader creates an
on_behalf_ofAPI key and links it to the team member withonBehalfOfActorId. - The leader grants only
worklist.tasks.read,worklist.tasks.write,decision.requests.write, anddecision.requests.read. - The team member gives the agent the base URL, tenant ID, and API key through a secure channel.
- The agent calls
GET /v1/contextto verify the represented actor before doing work. - The agent manages only
/v1/my-tasksand creates decision requests before risky or external actions. - The employee or leader resolves the decision request in Vision Platform.
- The agent continues, cancels, or asks for clarification based on the decision outcome.
Task fields and conflicts
- Use
priorityvalueslow,medium,high, orcritical. - Use
statusvalues exposed by the task response. Common status transitions for personal tasks include moving a task todoneand reopening it from the UI when needed. - Use ISO 8601 timestamps for
deadlineAt, for example2026-06-01T12:00:00.000Z. - For updates, send the latest
versionorexpectedVersionfrom the task response. - On
409 version_conflict, read the task again, compare the user's latest state to the planned change, and retry only if the change is still valid. - On
409 invalid_state_transition, stop and ask the human instead of forcing another status update.
Example requests
Confirm actor context
curl -X GET "https://www.lontive.com/vision-platform/v1/context" \
-H "Authorization: Bearer vsk_example" \
-H "x-tenant-id: demo-tenant"
List the agent's own tasks
curl -X GET "https://www.lontive.com/vision-platform/v1/my-tasks" \
-H "Authorization: Bearer vsk_example" \
-H "x-tenant-id: demo-tenant"
Create an agent-owned task
curl -X POST "https://www.lontive.com/vision-platform/v1/my-tasks" \
-H "Authorization: Bearer vsk_example" \
-H "x-tenant-id: demo-tenant" \
-H "Idempotency-Key: sales-agent-task-001" \
-H "Content-Type: application/json" \
-d '{
"title": "Prepare draft follow-up for customer review",
"description": "Internal task owned by the sales agent actor.",
"priority": "medium",
"deadlineAt": "2026-06-01T12:00:00.000Z"
}'
Update an agent-owned task
curl -X PUT "https://www.lontive.com/vision-platform/v1/my-tasks/personal_task_123" \
-H "Authorization: Bearer vsk_example" \
-H "x-tenant-id: demo-tenant" \
-H "Content-Type: application/json" \
-d '{
"title": "Prepare revised follow-up for customer review",
"description": "Updated after new account context arrived.",
"priority": "high",
"expectedVersion": 2
}'
Mark an agent-owned task done
curl -X POST "https://www.lontive.com/vision-platform/v1/my-tasks/personal_task_123/status" \
-H "Authorization: Bearer vsk_example" \
-H "x-tenant-id: demo-tenant" \
-H "Idempotency-Key: sales-agent-task-001-done" \
-H "Content-Type: application/json" \
-d '{
"status": "done",
"expectedVersion": 3
}'
Create a decision request
curl -X POST "https://www.lontive.com/vision-platform/v1/decision-requests" \
-H "Authorization: Bearer vsk_example" \
-H "x-tenant-id: demo-tenant" \
-H "Idempotency-Key: demo-decision-001" \
-H "Content-Type: application/json" \
-d '{
"summary": "Approve outbound follow-up email",
"requestedDecisionType": "approve_or_reject",
"riskLevel": "medium",
"requestedBy": "Lontive sales agent",
"description": "External approval reference: sales-agent:appr_123\nRun: run_456\nTool: schedule_front_followup_email"
}'
Poll one decision request by ID
curl -X GET "https://www.lontive.com/vision-platform/v1/decision-requests/dec_123" \
-H "Authorization: Bearer vsk_example" \
-H "x-tenant-id: demo-tenant"
Ask approval to send a customer offer
curl -X POST "https://www.lontive.com/vision-platform/v1/decision-requests" \
-H "Authorization: Bearer vsk_example" \
-H "x-tenant-id: demo-tenant" \
-H "Idempotency-Key: offer-approval-001" \
-H "Content-Type: application/json" \
-d '{
"summary": "Approve sending the Acme renewal offer",
"requestedDecisionType": "approve_or_reject",
"riskLevel": "medium",
"requestedBy": "Sales follow-up agent",
"description": "Approve before the agent sends the prepared offer through the external email system."
}'
Ask approval to move a deadline
curl -X POST "https://www.lontive.com/vision-platform/v1/decision-requests" \
-H "Authorization: Bearer vsk_example" \
-H "x-tenant-id: demo-tenant" \
-H "Idempotency-Key: deadline-change-001" \
-H "Content-Type: application/json" \
-d '{
"summary": "Approve moving the customer recap deadline to Friday",
"requestedDecisionType": "approve_or_reject",
"riskLevel": "low",
"requestedBy": "Personal work agent",
"description": "The agent detected a calendar conflict and asks for approval before changing the external plan."
}'
Ask for a policy exception
curl -X POST "https://www.lontive.com/vision-platform/v1/decision-requests" \
-H "Authorization: Bearer vsk_example" \
-H "x-tenant-id: demo-tenant" \
-H "Idempotency-Key: policy-exception-001" \
-H "Content-Type: application/json" \
-d '{
"summary": "Approve a one-time exception to the standard response window",
"requestedDecisionType": "policy_exception",
"riskLevel": "high",
"requestedBy": "Customer operations agent",
"description": "The agent should not apply the exception unless the decision request is approved."
}'
Handle a version conflict
# 1. Update with the version last seen by the agent.
curl -X PUT "https://www.lontive.com/vision-platform/v1/my-tasks/personal_task_123" \
-H "Authorization: Bearer vsk_example" \
-H "x-tenant-id: demo-tenant" \
-H "Content-Type: application/json" \
-d '{
"title": "Prepare revised follow-up",
"priority": "high",
"expectedVersion": 2
}'
# 2. If the API returns 409 version_conflict, read the task again.
curl -X GET "https://www.lontive.com/vision-platform/v1/my-tasks" \
-H "Authorization: Bearer vsk_example" \
-H "x-tenant-id: demo-tenant"
# 3. Retry only if the newer task state still supports the same change.
Recommended decision polling flow
- Create one API key per external agent. Use
on_behalf_ofwhen the agent acts for a specific team member, orautonomouswhen the agent should appear as an independent agent. - Grant only
worklist.tasks.read,worklist.tasks.write,decision.requests.write, anddecision.requests.read. - Use
/v1/my-tasksfor the agent's own work tracking. Do not use/v1/worklist/tasksto mutate the leader worklist. - Create the approval as a
/v1/decision-requestsrecord and store the returned decision request ID in the agent runtime. - Include the agent's own approval reference in the decision request
descriptionfield so the queue stays traceable without extra schema changes. - Poll
GET /v1/decision-requests/{decisionRequestId}until the status is resolved. - Treat
approvedas accept andrejectedas reject. ReaddecisionOutcome,decisionNote, anddecidedAtfrom the response.
Notes for agents
- Read the OpenAPI contract before generating calls.
- Treat
x-required-scopesandx-required-claimsas mandatory. - Operate only as the team-member actor resolved from the API key.
- Use worklist task scopes only for the team-member actor's own task surfaces.
- Do not call leader, deputy, system,
/v1/external-agent-actions, or kill-switch endpoints from an external-agent integration. - Actions performed through an API key are recorded in audit payloads with
actor_source.type = "api_key". Leader UI can show these with a compact agent indicator, so avoid writing misleading human-only descriptions. - Retry only transient failures such as
429,502,503,504and selected409 version_conflictcases. - Use
GET /v1/api-docsafter authentication if you need the runtime-published endpoint catalog and bearer format summary. - Do not assume
/v1/api-docsis public; it runs inside the protected tenant-aware API surface.