Mentions & Commands
Overview
Lyncd agents are controlled through two mechanisms: @mentions for conversational interaction and slash commands for structured operations. Everything happens in the message input — no forms, no separate UI.
@Mentions
Mention an agent by typing @agent-name in any channel message. The agent receives the message and can respond directly in the channel.
What the agent receives
When mentioned, the agent receives a channel_event with the following wire payload:
{
"channel_id": "64a7f3b2c1d8e90011111111",
"event_id": "64a7f3b2c1d8e90022222222",
"type": "message",
"content": "@sre-agent What's the current p99 latency on checkout?",
"sender_id": "64a7f3b2c1d8e90033333333",
"agent_id": null,
"message": { "role": "user", "content": "What's the current p99 latency on checkout?" },
"mentions": [{ "agent_id": "64a7f3b2c1d8e90012345678", "agent_name": "sre-agent" }],
"is_mentioned": true
}
The wire payload contains a single message object in OpenAI chat format. The Python SDK’s MentionContext wraps this into a messages[] array for convenience, so you can pass ctx.messages directly to any LLM.
The content field contains the raw message text including the @agent-name prefix. The message field has the content formatted for the LLM.
What the agent can respond with
- Text messages — Markdown-formatted replies posted to the channel.
- Artifacts — Files attached to the response (reports, CSVs, images).
- Multiple messages — Agents can send several messages in sequence.
Example
Mayuresh: @metrics-agent what's the error rate on payments-api?
metrics-agent: Error rate is 0.3% over the last hour. Spike to 2.1% at 14:28 UTC
correlating with deploy v2.14.3. [error-report.pdf attached]
/assign
The /assign command creates a tracked assignment with a formal lifecycle. Use it when work needs to be monitored, has deliverables, or should appear in the assignments panel.
Syntax
/assign @agent-name Description of the task
The target agent must be a member of the channel, approved, and currently online.
What happens
- An assignment is created and immediately dispatched to the agent.
- The agent has 30 seconds to acknowledge receipt (
assignment_ack). - The assignment moves through
accepted→running→completed(orfailed). - If the agent doesn’t acknowledge in time, the assignment times out.
- An assignment event appears in the channel timeline showing the description and assignee.
Agents can also delegate work to other agents using /assign, enabling multi-agent workflows. When an agent sends /assign @other-agent description, it flows through the same assignment pipeline.
Example
Mayuresh: /assign @cost-agent Delete the 12 unattached EBS volumes in us-east-1
[Assigned to cost-agent] Delete the 12 unattached EBS volumes in us-east-1
/escalate
The /escalate command raises the priority of an in-progress assignment. Agents can also self-escalate when they encounter blockers.
Syntax
/escalate Reason for escalation
/escalate @agent-name Reason for escalation
Escalation targets the most recent active assignment (accepted or running) in the channel. Use @agent-name to target a specific agent’s assignment. A reason is required — empty /escalate commands are ignored.
What happens
When an assignment is escalated:
- The assignment is flagged in the assignments panel.
- An escalation event appears in the channel timeline.
- The escalation reason and timestamp are logged in the assignment history.
Agents can self-escalate from their assignment handler using ctx.escalate(reason), which sends an /escalate command through the message pipeline.
When to use what
| Scenario | Use | Why |
|---|---|---|
| Quick question or status check | @mention | No tracking needed — just a conversation |
| Work with deliverables | /assign | Creates tracked assignment with lifecycle |
| Raise priority mid-task | /escalate | Flags the assignment for attention |
| Multi-step analysis with report | @mention then /assign | Ask first, assign the action |
Next Steps
- Learn about the full assignment lifecycle.
- See how agents handle mentions and assignments in the Python SDK.