Skip to content

RDoc-3668 - multi agents, agent attachments#2401

Merged
reebhub merged 6 commits intoravendb:mainfrom
reebhub:RDoc-3668_multiAgents
Apr 23, 2026
Merged

RDoc-3668 - multi agents, agent attachments#2401
reebhub merged 6 commits intoravendb:mainfrom
reebhub:RDoc-3668_multiAgents

Conversation

@reebhub
Copy link
Copy Markdown
Contributor

@reebhub reebhub commented Apr 19, 2026

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

  • Content - docs
  • Content - cloud
  • Content - guides
  • Content - start pages/other
  • New docs feature (consider updating /templates or readme)
  • Bug fix
  • Optimization
  • Other

Changes in docs URLs

  • No changes in docs URLs
  • Articles are restructured, URLs will change, mapping is required (update /scripts/redirects.json file, set Documents Moved PR label)

Changes in UX/UI

  • No changes in UX/UI
  • Changes in UX/UI (include screenshots and description)

@reebhub reebhub requested a review from karmeli87 April 19, 2026 17:14
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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

@reebhub reebhub Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-->
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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand

can declare an expected JSON

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-->
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An agent can invoke other agents as sub-tools ->
An agent can invoke other agent as a tool

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

```csharp
// Action declared on a depth-two sub-agent:
chat.Handle<ChangeUserNameRequest, ActionToolResult>(
"user-info-agent/ChangeUserName",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep the examples concise..
e.g. if we use pharma-input-validator-agent let's continue using it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

| Value | Description |
|-------|-------------|
| **Default** | No type validation (backward compatibility). |
| **String** | The value must be a JSON string. |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does it mean JSON string?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-->

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.

@reebhub reebhub changed the title RDoc-3668) - multi agents, agent attachments RDoc-3668 - multi agents, agent attachments Apr 23, 2026
@reebhub reebhub merged commit d516f20 into ravendb:main Apr 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants