---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://segmentstream.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Records and actions

Define the records your team works on, the relationships between them and the actions people and agents may take.

## Model a record

An entity declares properties and relationships. A stored record has a stable identity. Relationships link the records of one entity to records of another. The ontology map shows how the entities in the deployed model connect.

The ontology as deployed: every entity with its fields, how they link, and the actions that change them.

## Change a record

A change to a stored record goes through an action. In the starter, a salesperson can run lead.changeStatus. A different member may be able to read the same lead while lacking permission to change it. Test both identities against the action itself. Hiding the button only changes what the screen shows.

## Use the model

Open the deployed workspace API schema to find the entity, action name and input types. Have the app and its agent call the same action. Verify the resulting record and its history, including who made the change. When bringing in records from another system, choose the source key and how to handle a replay before bulk loading.

[Explore the workspace API](https://segmentstream.com/docs/api/workspace)

[ ](https://segmentstream.com/docs/api/workspace)· [Import existing records](https://segmentstream.com/docs/import-existing-records)

[Read as Markdown ↗](https://segmentstream.com/docs/records-and-actions.md)
