{"version":"2.1.280","anchor":"plugin-sessionmessages-and-sessionusage-now-accept","canonical_anchor":"plugin-sessionmessages-and-sessionusage-now-accept","heading":"Plugin $.session.messages and $.session.usage now accept an agentId\/as parameter","tier":"use","area":"Plugins","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.280\/e\/plugin-sessionmessages-and-sessionusage-now-accept","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.280","markdown":"### Plugin `$.session.messages` and `$.session.usage` now accept an agentId\/as parameter\n\nPlugin session.messages and session.send can now target a specific agent via an agentId\/as parameter\n\n**What**\n\nThe plugin host operations `$.session.messages` and `$.session.send` now accept an optional `{agentId, as}` argument, where `as` must be `\"api\"` if it's given at all. Passing this lets a caller scope the call to a particular agent within a session, instead of always operating on the whole session.\n\n**Why**\n\nThis lets plugins and SDK integrations work with the messages or output of one specific agent rather than the entire session, which matters when a session involves multiple agents.\n\n- Area: Plugins\n- Names: `agentId`\n- Tier: Use it now\n- Useful: 2\/5\n- Signal: 2\/5"}