RDoc-3668 - multi agents, agent attachments#2401
Conversation
…agent creation API page
…ation API page references, overview, security concerns
| When this agent is used as a **sub-agent** and a parent agent invokes it without | ||
| providing a value for one of its parameters, the default behavior is for the | ||
| parent's LLM to generate a value. | ||
| For parameters that represent trusted values - a user identifier, a session token, an account number - this is not safe: the model can invent a value. |
There was a problem hiding this comment.
it is not only about 'trusted values', it can be also to scope the agent e.g. we have queries scoped by user, we don't want the parent agent "invent" a user id and get someone's else info
There was a problem hiding this comment.
-->
When an agent is used as a sub-agent and a parent agent invokes it without
providing a value for one of its parameters, the default behavior is for the
parent's LLM to generate a value.
This is unsafe whenever the parameter's value must come from a trusted source - for example, a user identifier that scopes queries to the caller's own data, a session token, or an account number.
A parent LLM that is free to invent the value can return a plausible-looking id that belongs to a different user, causing the sub-agent to run its scoped queries against that user's records.
(also updated in the multi agents and security concerns pages)
|
|
||
| #### Declaring a parameter's value type | ||
|
|
||
| `AiAgentParameter` can declare an expected JSON value type for the parameter. |
There was a problem hiding this comment.
I don't understand
can declare an expected JSON
There was a problem hiding this comment.
-->
You can declare the expected value type of an agent parameter.
When a type is declared, the server validates the value provided when the conversation starts against this type.
On a mismatch, the server throws an InvalidCastException with a descriptive message and aborts the conversation start.
When no type is declared, no validation is performed.
|
|
||
| ### Sub-agents as tools | ||
|
|
||
| An agent can invoke other agents as sub-tools. To do this, reference the target |
There was a problem hiding this comment.
An agent can invoke other agents as sub-tools ->
An agent can invoke other agent as a tool
| ```csharp | ||
| // Action declared on a depth-two sub-agent: | ||
| chat.Handle<ChangeUserNameRequest, ActionToolResult>( | ||
| "user-info-agent/ChangeUserName", |
There was a problem hiding this comment.
I think we should keep the examples concise..
e.g. if we use pharma-input-validator-agent let's continue using it
| | Value | Description | | ||
| |-------|-------------| | ||
| | **Default** | No type validation (backward compatibility). | | ||
| | **String** | The value must be a JSON string. | |
There was a problem hiding this comment.
-->
| Value | Description |
|---|---|
| Default | No type validation (backward compatibility). |
| String | The value must be a string. |
| Number | The value must be a number. |
| Boolean | The value must be a boolean. |
| ArrayOfString | The value must be an array of strings. |
| ArrayOfNumber | The value must be an array of numbers. |
| ArrayOfBoolean | The value must be an array of booleans. |
| Null | The value must be null. |
… agents are used, updated the security concerns accordingly
Issue link
RDoc-3781 document AI agent attachments
RDoc-3668 document multi agent
RDoc-3777 update AI agents Studio page
Additional description
...Include details of the change made, paste screenshots if necessary. Anything that may be useful for the reviewers...
Type of change
/templatesor readme)Changes in docs URLs
/scripts/redirects.jsonfile, setDocuments MovedPR label)Changes in UX/UI