agentsecure.identity
Look up or register agent identities in the local Community Mesh store, returning metadata or agent lists and writing an audit event on registration.
Instructions
Look up or register identities in the local Community Mesh store. By default, agent_id returns exists plus that identity's metadata (or exists=false if unknown); omitting agent_id returns an agents array sorted by ID. Set register=true with a non-empty agent_id to create or overwrite its record and write an audit event; returns the saved identity. Registration replaces rather than merges metadata. Identity labels, trust_level, and allowed_scopes do not authenticate callers or grant permissions. Example: {"agent_id": "backend-agent"}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Display name for registration; defaults to agent_id. Ignored on lookup. | |
| team | No | Team label for registration; defaults to empty. Used when counting approvals assigned to this team; ignored on lookup. | |
| type | No | Agent classification for registration; defaults to coding_agent. Metadata only; ignored on lookup. | |
| owner | No | Owner label for registration; defaults to empty. Does not verify ownership; ignored on lookup. | |
| agent_id | No | Local Mesh ID to look up or register. Omit/empty to list identities when register=false; non-empty required when register=true. Not inferred from the environment or authenticated. | |
| register | No | Defaults to false (lookup only). True creates or overwrites the agent_id record using the metadata below, including defaults for omitted fields. | |
| workspace | No | Workspace label for registration; defaults to local. Does not select a filesystem directory; ignored on lookup. | |
| trust_level | No | Trust label for registration; defaults to local. Metadata only, not a security boundary; ignored on lookup. | |
| allowed_scopes | No | Scope labels to store at registration; defaults to []. Informational only, not enforced by Mesh policy; ignored on lookup. |