Resources and Actions
Add Resources and Actions to a Blueprint so that Balto can read from and write to external systems.
This page explains how to add Resources and Actions to a Project Blueprint and how Balto uses them. A Resource reads data from an external system. An Action creates or changes data in an external system.
Bobsled AI uses the word tools for all operations that Balto calls while it answers a request. Resources and Actions define direct external reads and writes, so you don't create a separate tool file. Tools aren't data models. A direct Resource returns one record or a bounded search result without exposing a reusable tabular relation.
Choose a definition
The following table shows which definition and Balto operation fit each need:
Use a direct Resource for a small lookup, search, or transient response. Use a live model when the API data needs declared columns, SQL queries, joins, lineage, or reusable semantics. Use a pipeline for bulk extraction or scheduled data movement. A Project Resource isn't a pipeline.
Before you begin
- To add a Resource or an Action, or to let Balto run an Action, you need the Maintainer role on the Project. A Reader can let Balto call read-only integration tools. For more information, see Roles and permissions.
- Make sure that the Project has a connection and an integration for the external system.
- Store credentials in Project secrets, not in Blueprint files.
- Balto uses only the deployed Project definitions for direct Resource and Action calls. Publish the selected Draft before you test a new operation.
Add a Resource
A Project Resource is a read-only integration operation. Store a local Resource in a type: resource file, usually at resources/<integration>/<name>.yml. A Resource in another folder must name its integration.
A Resource can provide these read methods:
- Lookup: Returns one record for an exact input, such as a user ID.
- Query: Returns a bounded set of records for a search or filter.
To add a Resource with Balto, do the following:
- Start a chat in the correct Project.
- Describe the read operation and its required inputs.
- Ask Balto to add the Resource to the Blueprint Draft.
- Click Changes, and then review the Resource file.
- Validate and publish the Draft. For more information, see Drafts, versions, and deployments.
You can also add the file directly with Edit YAML. Use the Blueprint schema, and fix all validation errors before you save a version.
Use a Resource
Name the deployed integration and Resource when you know them, as in the following request:
Find the name for user ID
123with theidentity-api/usersResource.
Balto uses lookup_resource for this request. For a search, give the search text, filter, and result limit:
Search the
support/ticketsResource for open login issues. Return no more than 20 records.
Balto uses query_resource for this request. Bobsled AI supplies the Project context, connection, and secrets. Balto reports when a result is missing, limited, too large, rate limited, or blocked by a cost rule.
A direct Resource call isn't a model query. For a deployed live or on-read model, ask Balto to find the model with get_blueprint_models and query its sqlAddress with run_query, not lookup_resource or query_resource.
Add an Action
An Action is a write operation. Store a local Action in a type: action file, usually at actions/<name>.yml. An Action can use an API or webhook request. For example, it can send a POST request to create an issue. Don't model a write as a Resource, because a Resource is read-only.
To add an Action with Balto, do the following:
- Start a chat in the correct Project.
- Describe the exact write, the target integration, and the required inputs.
- Ask Balto to add the Action to the Blueprint Draft.
- Click Changes, and then review the Action file and its secret references.
- Validate and publish the Draft. For more information, see Drafts, versions, and deployments.
Use an Action
Give Balto the exact effect that you want, as in the following request:
Create a Jira issue for the stale customer table with the
jira/create_issueAction.
Balto runs the Action in these stages:
- Balto creates a fresh preview. The preview identifies the target host, operation, effect, and input fields. If preview creation fails, Bobsled AI doesn't execute the Action. Resolve the provider, connection, or input problem, and then request a new preview.
- Balto sends the exact preview through the structured approval gate. The approval control in the message box sets whether Bobsled AI asks you first, but running an Action always asks, in every mode. For more information, see Approval mode.
- Bobsled AI executes the Action. It rejects the execution when the Action, input, deployed version, or preview fingerprint changes. After a change, Balto must create another preview.
If an Action result is unclear, don't repeat the request. A second call can repeat the write.
Add reusable guidance
Balto can call a Resource or Action without a Project Skill. Add a Project Skill when Balto needs repeatable usage rules. A Project Skill can identify an operation, map a model field to an input, and define result checks. It can't grant access or remove approval.
What's next
- To create, test, and publish usage rules, see Skills.
- To model API data with declared columns, see Live models.
- To move data in bulk, see Configure and run pipelines.
