Tags
A tag is a name with a value, such as user=alice. Meshes, agents, access points, conversations and requests have tags. Memory, boundaries, model set rules and MCP tunnel subscriptions read them. This guide explains each kind of tag, how callers send tags, and what reads them.
What a tag is
A tag has a name and a value. A list of tags can have the same name more than once, for example team=support and team=billing. So one name can have several values.
Partite Mesh checks these rules on conversation tags and request tags:
| Rule | |
|---|---|
| Name | 1 to 255 bytes. Letters a to z and A to Z, digits, and the characters _ - . [ ] /. No spaces. |
| Value | Up to 4 KiB of UTF-8 text. A value can be empty. |
| Count | Up to 32 tags on a conversation, and up to 32 on each request. |
Names and values are case-sensitive. User and user are two different names.
A tag that breaks a rule is refused with 400. The problem document’s param is tags, or the name of the header.
Partite Mesh doesn’t check tags in configuration, such as mesh or agent tags. Keep to the same rules there, so that the names match.
Kinds of tags
| Tags | Where they are set | What reads them |
|---|---|---|
| Mesh tags | Tags in the mesh settings. They are not versioned, so a change applies to every version at once. | Boundaries, as mesh.tags |
| Agent tags | Tags on the agent. They are versioned, so a change makes a new agent version. | Model set rules, rubric evaluators |
| Access point tags | Tags on the access point, under Access > Access points | Boundaries, as caller.access_point.tags |
| Conversation tags | By the caller, when the conversation starts. Also by schedules and boundaries. | Memory, boundaries, MCP tunnel subscriptions |
| Request tags | By the caller, with each request. Also by boundaries. | Memory, boundaries |
Access point tags are not copied onto conversations. A boundary can copy them. See Trust.
Model providers, model profiles and model sets also take tags in Terraform and the GraphQL API. Nothing reads those tags.
Sending tags
Conversation API
Send tags in the JSON body:
tagsonPOST /conversationssets the conversation tags.tagsonPOST /conversations/{conversation_id}/requestssets the request tags.
"tags": [{"name": "user", "value": "alice"}, {"name": "team", "value": "support"}]When POST /conversations also has input, you can’t send request tags for that first request. To send request tags with the first message, start the conversation without input. Then send the message to POST .../requests with tags.
The Conversation API reads tags only from the body. It doesn’t read the tag headers. See Conversation API.
AG-UI and MCP
AG-UI and MCP take tags in headers:
| Header | Sets |
|---|---|
Partite-Conversation-Tags | The tags of a new conversation |
Partite-Request-Tags | The tags of the request |
The header format:
- Each tag is
name=value. - Separate tags with commas, or send the header more than once. Spaces before and after each tag are dropped.
- The value is everything after the first
=. Soquery=a=bhas the valuea=b. A tag with no=has an empty value. - Percent-encode
,,%, non-ASCII characters, and spaces at the start or end of a value. A+stays a+. - A name can repeat, as in
env=staging,env=prod. - An empty tag is an error, so don’t end the header with a comma.
- All lines of one header together can be at most 8 KiB.
Partite-Request-Tags: user=alice,team=support
Partite-Request-Tags: range=1%2C2,note=caf%C3%A9These lines give the request four tags: user=alice, team=support, range=1,2 and note=café. A client generated from an OpenAPI definition may encode each tag whole, = included, such as user%3Dalice. Partite Mesh reads that the same way.
In AG-UI, the first run of a thread creates the conversation. Partite-Conversation-Tags applies only to that run. Later runs on the thread ignore it. Partite-Request-Tags applies to each run that sends a message. A run that answers a task continues the task’s request, so it sets no request tags. See Client Tasks and AG-UI.
In MCP, each tool call creates a conversation, unless the Partite-Conversation-External-Id header names one that exists. Partite-Conversation-Tags applies only when the call creates the conversation. Partite-Request-Tags applies to every tool call.
Converse
In Converse, press Tags to set the conversation tags before the first message. Set Request tags under the message form. They go with every message until you change them.
Schedules and webhooks
A schedule puts its Conversation tags on every conversation it starts. It also adds schedule_id, the ID of the schedule, and scheduled_for, the time of the run in UTC. These two names are reserved, so a schedule can set up to 30 tags of its own. The request a schedule sends has no request tags. See Schedules.
A conversation that a webhook starts has no tags.
Conversation tags and request tags
Conversation tags are set when the conversation starts. They never change after that. A later request can’t add, change or remove them.
Request tags belong to one request. A request doesn’t get the request tags of earlier requests.
The API returns the conversation tags in the tags field of the conversation. The tags field of a request has only that request’s own tags.
Each reader decides which tags it reads:
| Reader | Reads |
|---|---|
| Memory | The conversation tags and the request tags, as one list |
| Boundaries | conversation.tags and request.tags, apart |
| MCP tunnel subscriptions | The conversation tags only |
Memory joins the two lists, so one name can get values from both. For example, a conversation tagged user=alice with a request tagged user=bob gives memory both alice and bob under user.
What reads tags
Memory
Memory reads the conversation tags and the request tags together. Where memory settings say request tag, they mean this joined list. Memory calls a tag’s name its key.
- Ingest. Each conversation turn is stored with the conversation tags and the request tags. A Sliced scope with the key
userfiles the turn under each value ofuserthat the turn has. - Identify speakers by tag. The store takes the speaker’s name from the first value of that tag.
- Tagged, with a value from a request tag. An injection or a query tool reads the memories filed under the values of that tag. Several values are alternatives, so it reads the memories of any of them. When neither the request nor the conversation has the tag, the injection reads nothing, and the agent doesn’t get the query tool.
- Write tools. “every request tag” puts all of the conversation and request tags on the fact. “request tag” puts the tags with the keys you name.
See Memory and Interaction Profiles.
Boundaries
Boundary expressions read tags as a map from each name to a list of values:
| Variable | Holds |
|---|---|
mesh.tags | The mesh tags |
caller.access_point.tags | The access point’s tags, when the caller came through one |
conversation.tags | The conversation tags |
request.tags | The request tags |
A name that no tag has reads as an empty list. So "support" in mesh.tags["team"] is false for a mesh with no team tag. To test whether a name is there, write "team" in mesh.tags. conversation.tags["customer"].only() gives the one value, and fails when there are no values or more than one.
A Set tags modification on Conversation create or Request create sets the tags that are stored. A string sets one value, a list sets several, and an empty list removes the tag. The values replace the caller’s values for that name. The rules of the same action still read the tags the caller sent. Later actions read conversation.tags as it was stored, after the modifications.
Conversations that a webhook or a schedule starts skip Conversation create and Request create, so no modification sets their tags.
See Boundaries.
Model set rules
The Tag conditions of a model set rule match the agent tags. Every condition must match. Mesh, conversation and request tags play no part. So each agent version gets the same rule on every request.
Give an agent each tag name once. When a name repeats, model set rules see only its last value. A rule with two conditions on the same name never matches.
See Model Sets.
MCP tunnel subscriptions
The criteria of a tunnel subscription are tags. A relay on the subscription serves the conversations whose tags include every criterion. Only conversation tags count, not request tags. See MCP Tunnel and Resources.
Rubric evaluators
Each evaluator in a rubric, under Observability > Rubrics, can have tags. An evaluator with tags scores only the steps of agents that have at least one of those tags. A judge with the scope Request/Response ignores the tags. See Evaluations.
Traces don’t show or filter by tags.
Trust
A caller can send any tags. A caller with an API key is usually your own server, and you decide what it sends. A caller that comes through an access point is a person or a client with a token. It can put any tags in the body or the headers.
When a tag decides whose memories apply, or which customer a tool acts for, take the tag from the caller’s identity. Set it with a boundary. The Boundaries examples set the user conversation tag from caller.subject.
That modification sets only the conversation tag. The caller could still send user=bob as a request tag, and memory would then read Bob’s memories as well. So also remove user from each request. These two entries of modifications work together:
[
{
"name": "user-from-token",
"action": "CONVERSATION_CREATE",
"when": "caller.kind == \"access_point\"",
"setTags": [{ "name": "user", "expression": "caller.subject" }]
},
{
"name": "no-user-on-requests",
"action": "REQUEST_CREATE",
"when": "caller.kind == \"access_point\"",
"setTags": [{ "name": "user", "expression": "[]" }]
}
]Other values can come from the caller’s identity in the same way. For example, caller.claims.tenant reads a claim of the token, and caller.access_point.tags["tenant"] reads the access point’s tenant tag. When the token has no such claim, the expression fails and the conversation is refused.