# Core

Source: https://docs.autessa.com/docs/tools/core

> Core tool types: AutessaScript, API calls, LLM calls, scheduling, manager signals, and file content extraction.

# Core

The general-purpose building blocks every agent can use — run code, call HTTP APIs, prompt a model, schedule future work, and read file contents — with no connector required.

## AutessaScript **TOOL** `AUTESSA_SCRIPT`

Runs an [AutessaScript](/docs/autessascript.md) program in a hardened JavaScript sandbox — no file system, network sockets, threads, or process access; the script works through the platform bindings instead. All runtime variables (the agent's arguments plus environment variables such as `AUTESSA_COMPANY_ID`) are available to the script, making this the type to reach for when a task needs logic, branching, or several platform calls chained in one tool. `supportedLanguage` currently has a single value, `AUTESSASCRIPT`.

The script's final response string is returned to the agent verbatim; console output and errors are captured in the execution's debugging info.

### Example

```json title="Tool config"
{
  "toolType": "AUTESSA_SCRIPT",
  "supportedLanguage": "AUTESSASCRIPT",
  "script": "const orderId = '@@{ORDER_ID}';\nconsole.log('Processing order ' + orderId);\nJSON.stringify({ orderId: orderId, status: 'processed' });"
}
```

**Configuration fields**

- `supportedLanguage` (string (enum)) — Required string (enum) value.
- `script` (string) — Required string value.

## API Call **TOOL** `API_CALL`

Makes an HTTP request to an external API. Only `GET`, `POST`, and `PATCH` are allowed, `uriParams` are URL-encoded onto the query string, and a JSON `Content-Type` is added automatically when a body is present. Every URL is validated before the request is sent — requests to private networks, internal infrastructure, and non-HTTP(S) schemes are rejected with a validation error — and redirects (up to 5) are re-validated hop by hop. Requests time out after 60 seconds.

The result is `{"statusCode": ..., "body": ..., "headers": {...}}` with the raw response body as a string for the agent to interpret.

### Example

```json title="Tool config"
{
  "toolType": "API_CALL",
  "url": "https://api.example.com/v1/orders",
  "method": "POST",
  "headers": { "Authorization": "Bearer @@{EXAMPLE_API_TOKEN}" },
  "uriParams": { "expand": "customer" },
  "body": "{\"orderId\": \"@@{ORDER_ID}\", \"note\": \"@@{NOTE}\"}"
}
```

**Configuration fields**

- `url` (string) — Required string value.
- `method` (string) — Required string value.
- `headers` (object) — Required object value.
- `uriParams` (object) — Required object value.
- `body` (string) — Required string value.
- `allowedHosts` (array<string> · optional) — Optional host binding: exact hostnames (case-insensitive, no wildcards, schemes, paths or ports) this tool may call. When set and non-empty, a request (or any redirect hop) to another host fails before anything is sent. Null/empty = unrestricted (SSRF protection still applies).

## LLM Call **TOOL** `LLM_CALL`

Sends `promptTemplate` — with its `@@{...}` placeholders already resolved — to a model as a single prompt and returns the completion. `model` picks a capability tier by alias rather than a vendor model name: `SMALL_INSTRUCTION_FOLLOWING` (the default), `BIG_INSTRUCTION_FOLLOWING`, `BIG_INSTRUCTION_FOLLOWING_REASONING`, `VIBE_CODING`, `AUTESSA_120B`. Calls stream and consume LLM credits — an LLM Call invoked outside a conversation (from a trigger or scheduled event) is metered as its own AI task.

`imageUrl` supplies an image for a vision call: pass a presigned `https://` URL or a `data:` URL (the key of a file in Autessa storage, such as a table's `filePath` or an upload link's `s3Uri`, is presigned automatically; the older `s3://` form is still accepted), and the image is sent alongside the prompt with a vision-capable `model` such as `AUTESSA_120B`, so an image-only document with no extractable text can still be reasoned over. Calls time out after 120 seconds by default; raise the ceiling with `timeoutSeconds` for long generations run outside a conversation.

The result is `{"success": true, "content": ..., "usage": {"promptTokens": ..., "completionTokens": ..., "totalTokens": ...}}`.

### Example

```json title="Tool config"
{
  "toolType": "LLM_CALL",
  "promptTemplate": "Summarize the following support ticket in three bullet points:\n\n@@{TICKET_BODY}",
  "model": "SMALL_INSTRUCTION_FOLLOWING"
}
```

**Configuration fields**

- `promptTemplate` (string) — Required string value.
- `model` (object) — Required object value.
- `customModel` (object · optional) — Optional model on one of the company's own provider connections (bring your own key); `#model` runs when unset or when the connection is not in the running company. The company default model is deliberately NOT applied to this tool: an LLM_CALL without a customModel always runs `#model` (FirstPass pins AUTESSA_120B here).
- `timeoutSeconds` (integer) — Per-call timeout (seconds). Null = current default behavior (120s). Capped at 21600 (6h) so long jobs on the WORKER runtime aren't cut off.
- `maxOutputTokens` (integer) — Generation cap for this tool's completions. Null = omit, leaving the served model's own default — which for a self-hosted vLLM checkpoint can be effectively unbounded. A prompt tool that expects a short structured answer should set this, so a runaway completion cannot keep generating for minutes and hold the call open until its timeout.
- `thinking` (string) — Reasoning toggle for self-hosted vLLM models: `"ON"` / `"OFF"`, same values as the SIMPLE-agent row field. Null = omit `chat_template_kwargs` entirely, i.e. the server's `--default-chat-template-kwargs` decides — exactly the pre-existing behavior, so every tool that does not set this is byte-identical on the wire. Ignored (not an error) on hosted models, mirroring the agent path's gate.
- `imageUrl` (string · optional) — Optional image for a VISION call. When set (a presigned https URL or a `data:` URL), the user message carries an `image_url` content block alongside the prompt text — pair with a vision-capable `#model` (e.g. `AutessaModel#AUTESSA_120B`) so an image document with no extractable text can still be judged. Unset/blank preserves the existing text-only behavior exactly.
- `imageUrls` (string · optional) — Optional MULTI-image payload for a VISION call: a JSON ARRAY of url strings (e.g. `["s3://b/p1.jpg","s3://b/p2.jpg"]`), each an `s3://` URI, a presigned https URL, or a `data:` URL. Every entry becomes its own `image_url` content block after the prompt text, in array order. Merges with (does not replace) the singular `#imageUrl`: that one goes first, then these. A hard cap of 8 images total is applied — the vLLM serving config runs `--limit-mm-per-prompt {"image": 8`}, so a 9th block would be rejected by the model server. Extras are trimmed with a warning rather than failing the call, and a malformed array is warned about and treated as empty: a judgment with fewer images than hoped must degrade, not die. Held as a String rather than a `List` on purpose — it is the shape a templated `@@{...`} variable produces, and it keeps substitution identical to `#imageUrl`.

## Schedule Event **TOOL** `SCHEDULE_EVENT`

Creates a scheduled event that fires in the future — this is how an agent sets up its own follow-ups and recurring jobs. `scheduleSpec.pattern` picks the timing style: `EVERY` (`{"every": {"value": 30, "unit": "MINUTES"}}`, also `HOURS`/`DAYS`), `CRON` (`{"cron": {"expression": "0 9 ? * 2 *", "timezone": "America/Los_Angeles"}}`, a 6-field AWS cron in an IANA timezone), or `ONCE` (`{"once": {"at": "2026-07-04T09:00:00", "timezone": "America/Los_Angeles"}}`, a future local time). `actionType` picks what fires — `INVOKE_AGENT` (runs an agent with an input, via `agentConfig`), `INVOKE_TOOL` (executes a tool with static parameters, via `toolConfig`), or `UPDATE_AUTESSADB` (inserts or updates rows, via `autessaDbConfig`) — and only the matching config object is read. Passing an existing `eventId` updates that event instead of creating a new one; the event's name and description are generated automatically from the creating agent's context.

The result includes the handle you need for later edits: `{"success": true, "eventId": ..., "scheduleArn": ..., "eventName": ..., "scheduleExpression": ..., "actionType": ..., "enabled": ...}`.

### Example

```json title="Tool config"
{
  "toolType": "SCHEDULE_EVENT",
  "enabled": true,
  "scheduleSpec": {
    "pattern": "CRON",
    "cron": { "expression": "0 9 ? * 2 *", "timezone": "America/Los_Angeles" }
  },
  "actionType": "INVOKE_AGENT",
  "agentConfig": {
    "agentExecutionRequest": {
      "agentId": "V1StGXR8Z5",
      "input": "@@{WEEKLY_DIGEST_INSTRUCTIONS}"
    },
    "continueOnError": false,
    "description": "Monday morning digest run"
  }
}
```

**Configuration fields**

- `eventId` (string · optional) — Optional: Event ID for updating an existing scheduled event. If null, a new event is created.
- `eventName` (string · optional) — Optional: display name for the created event. Supports `@@{var`} placeholders resolved at invocation time. When blank, the executor auto-generates a name from the invoking agent/tool context.
- `enabled` (boolean · optional) — Optional: whether the event is enabled. Defaults to true.
- `scheduleSpec` (object) — Required: schedule specification (EVERY / CRON / ONCE).
- `actionType` (string (enum)) — Required: which action type fires when the event triggers.
- `agentConfig` (object) — Required when actionType = INVOKE_AGENT.
- `toolConfig` (object) — Required when actionType = INVOKE_TOOL.
- `autessaDbConfig` (object) — Required when actionType = UPDATE_AUTESSADB.

## Manager Signal **TOOL** `MANAGER_SIGNAL`

A control signal for sub-agents working under a manager: calling a signal tool (for example "Complete" or "Help") tells the manager the sub-agent has finished its task or needs assistance. The signal is intercepted by the manager's invocation layer rather than executed like a normal tool — the tool's name and description carry all the meaning, and the config has no fields. If one is ever executed directly, it acknowledges and does nothing.

### Example

```json title="Tool config"
{
  "toolType": "MANAGER_SIGNAL"
}
```

**Configuration fields**

_No configuration fields beyond `toolType`._

## Get File Content **TOOL** `GET_FILE_CONTENT`

Extracts the text content of a file so the agent can read it — PDFs and documents become text rather than raw bytes. `url` accepts the key of a file in Autessa storage (such as a table's `filePath` or an upload link's `s3Uri`; presigned automatically, and the older `s3://` form is still accepted) or an existing `https://` URL; external URLs pass SSRF validation first. Extraction runs server-side with a 5-minute budget for large files.

The result is `{"content": ...}` with the extracted text. To view an image or pass a file to the model as an attachment instead of text, use [Fetch and View](/docs/tools/media-web.md#fetch-and-view-).

### Example

```json title="Tool config"
{
  "toolType": "GET_FILE_CONTENT",
  "url": "@@{FILE_URL}"
}
```

**Configuration fields**

- `url` (string) — Required string value.

## Get File Content from Table **TOOL** `GET_FILE_CONTENT_FROM_TABLE`

Extracts text from a file stored in an [AutessaDB](/docs/guide/autessadb/tables.md) row: it looks up `rowId` in the table, reads the file in `fileColumnName` (which must be a FILE, IMAGE, VIDEO, or AUDIO column), and runs the same server-side extraction as [Get File Content](#get-file-content-) — without the agent ever handling a URL.

The result is `{"success": true, "rowId": ..., "filePath": ..., "content": ..., "contentLength": ...}`.

### Example

```json title="Tool config"
{
  "toolType": "GET_FILE_CONTENT_FROM_TABLE",
  "tableId": "V1StGXR8Z5",
  "rowId": "@@{ROW_ID}",
  "fileColumnName": "contract_pdf"
}
```

**Configuration fields**

- `tableId` (string (ID)) — Required string (ID) value. References an AutessaDB table by ID.
- `rowId` (integer) — Required integer value.
- `fileColumnName` (string) — Required string value.

## Related

- [Tool Types overview](/docs/tools.md)
- [AutessaScript reference](/docs/autessascript.md)
- [Tools guide](/docs/guide/agentic/tools.md)
- [AutessaDB tool types](/docs/tools/autessadb.md)
- [Media & Web tool types](/docs/tools/media-web.md)

