Skip to content

Commit 5f81860

Browse files
committed
feat: add chapter on Agent Collaboration
1 parent 9904005 commit 5f81860

File tree

3 files changed

+30
-8
lines changed

3 files changed

+30
-8
lines changed

docs/arc/01-dsl/Features/agent_collaboration.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Agent Collaboration
33
---
44
# Agent Collaboration
55

6-
**COMING SOON** in version 0.122.0
6+
From version 0.122.0
77

88
This page describes ways in which multiple agents can communicate and collaborate with each other.
99

@@ -27,12 +27,14 @@ val result: String = askAgent("assistant-agent", input = "a question").getOrNull
2727
2828
A common use case is to place the `callAgent` function in an LLM Function
2929
and let the Agent decide itself when to call the other agent. This creates a more dynamic and flexible system
30-
where agents can autonomously determine when they need assistance from other specialized agents.
30+
where agents can autonomously determine when they need assistance from other agents.
3131

3232
Example of a supervisor agent that can call other agents:
3333

3434
```kts
35-
agent {
35+
36+
// supervisor-agent.agent.kts
37+
agent {
3638
name = "supervisor-agent"
3739
tools { +"call_agent" }
3840
prompt {
@@ -42,17 +44,30 @@ Example of a supervisor agent that can call other agents:
4244
Call the "weather-agent" if you need weather information.
4345
Call the "booking-agent" if you need to book a hotel.
4446
"""
45-
}
46-
}
47-
48-
// Define a function that the agent can use to call other agents
47+
}
48+
}
49+
50+
// weather-agent.agent.kts
51+
agent {
52+
name = "weather-agent"
53+
// ...
54+
}
55+
56+
// booking-agent.agent.kts
57+
agent {
58+
name = "booking-agent"
59+
// ...
60+
}
61+
62+
// call_agent.functions.kts - Define a function that the agent can use to call other agents.
4963
function(
5064
name = "call_agent",
5165
description = "Calls an Agent.",
5266
params = types(string("name", "the name of the agent to call."))
5367
) { (name) ->
5468
val currentConversation = get<Conversation>()
5569
val result = callAgent(name.toString(), input = currentConversation).getOrNull()
70+
5671
// Extract just the content from the assistant's message or return an error message
5772
result?.latest<AssistantMessage>()?.content ?: "Failed to call agent $name!"
5873
}

docs/arc/24-mcp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Model Context Protocol (MCP)
22

3-
**COMING SOON** in version 0.122.0
3+
From version 0.122.0
44

55
The Model Context Protocol (MCP) is an open protocol that enables the
66
integration of LLM Agents with external tools and data sources.

static/arc2/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ <h3>Manual Setup</h3>
119119
<p>Add Arc Agents to any JVM application you are developing.</p>
120120
<p><a href="/lmos/docs/arc/manual_setup/" class="button small wide smooth-scroll-middle">Manual Setup</a></p>
121121
</section>
122+
<section>
123+
<h3>Agent Collaboration</h3>
124+
<p>Find out the different ways agents can communicate with each other.</p>
125+
<p>
126+
<a href="/lmos/docs/arc/dsl/Features/agent_collaboration/" class="button small smooth-scroll-middle">Agent Collaboration</a>
127+
</p>
128+
</section>
122129
<section>
123130
<h3>Memory</h3>
124131
<p>Extend the power of your AI Agent by providing it memory.</p>

0 commit comments

Comments
 (0)