You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blog/2024-11-27-definition-of-agent.mdx
+21-16Lines changed: 21 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,33 +6,33 @@ tags: []
6
6
---
7
7
import { Tweet } from'react-tweet'
8
8
9
-
Simon Willison is fond of asking the question "What is an agent?", it appears that there are many possible definitions of what an agent is. Does this make the term pointless?
9
+
Simon Willison is fond of asking the question "What is an agent?". There appear to be many possible definitions of what an agent is. Does this make the term useless?
10
10
11
11
<!--truncate-->
12
12
13
13
<Tweetid="1843290729260703801" />
14
14
15
15
## Agents in general
16
16
17
-
Russell and Norvig define an agent as *"anything that can be viewed as perceiving its environment through sensors and acting upon that environment through effectors"*. This definition is intentionally broad, R&N were attempting to define AI as a field of study and viewed it as synonymous with the study of agents.
17
+
Russell and Norvig (R&N) define an agent as *"anything that can be viewed as perceiving its environment through sensors and acting upon that environment through effectors"*. This definition is intentionally broad, R&N were attempting to define AI as a field of study and viewed it as synonymous with the study of agents.
18
18
19
-
R&N also go on to define *goaldirected agents*, which are agents that are given goals to work towards rather than procedures for performing a task. Prompting with LLMs is almost always goal-directed, we specify to the LLM what we want it to do, not how to do it.
19
+
R&N also go on to define *goal-directed agents*, which are agents that are given goals to work towards rather than procedures for performing a task. Prompting with LLMs is almost always goal-directed, we specify to the LLM what we want it to do, not how to do it.
20
20
21
21
## Environments
22
22
23
-
The most important take-away from the R&N definition is that agents are defined in terms of their *environment*. LLM agents may have quite trivial environments, a simple chatbot can be consider an agent, but the only means the agent has of affecting its environment is through text responses to a human, and similarly the only feedback it receives is from the human responses.
23
+
The most important takeaway from the R&N definition is that agents are defined in terms of their *environment*. LLM agents may have quite trivial environments, a simple chatbot can be considered an agent, but the only means the agent has of affecting its environment is through text responses to a human, and similarly the only feedback it receives is from the human responses.
24
24
25
-
They key to having useful agents, is in providing rich environments to the agents. [Shunyu Yao](https://www.latent.space/p/shunyu) made this point very well on the latent.space podcast.
25
+
The key to having useful agents is in providing rich environments to the agents. [Shunyu Yao](https://www.latent.space/p/shunyu) made this point very well on the latent.space podcast.
26
26
27
27
## Agentic Systems
28
28
29
-
Another term du jour is *agentic*. I really like this term as a relative adjective, a software system can be more or less agentic. Harrison Chase (Founder of LangChain etc) replied to Simon's tweet "The more agentic an application is, the more an LLM decides the control flow of the application".
29
+
Another term du jour is *agentic*. I really like this term as a relative adjective, a software system can be more or less agentic. In that vein, Harrison Chase (Founder of LangChain etc.) made the suggestion "The more agentic an application is, the more an LLM decides the control flow of the application" in response to Simon's tweet.
30
30
31
31
<Tweetid="1843292549521473957" />
32
32
33
-
This term is useful when thinking about implementations of an LLM-based system. For a given task there is usually a spectrum of possible implementations, ranging from a heavily engineered system where the LLM is used for small fixed tasks (as a function), to a fully agentic system where the LLM is equipped with an environment that allows the task to be completed in a completely goal-directed manner.
33
+
This term is useful when thinking about implementations of an LLM-based system. For a given task, there is usually a spectrum of possible implementations. At one end are heavily engineered systems where the LLM is used for small fixed tasks (as a function). At the other end are fully agentic systems where the LLM is equipped with an environment that allows for completely goal-directed task completion.
34
34
35
-
For instance, RAG can be broadly split into non-agentic RAG where the retrieval is performed by software and then provided to the LLM as context, and agentic-RAG where the LLM is provided with tools and performs its own retrieval.
35
+
For instance, Retrieval-Augmented Generation (RAG) can be broadly split into non-agentic RAG where the retrieval is performed by software and then provided to the LLM as context, and agentic-RAG where the LLM is provided with tools and performs its own retrieval.
36
36
37
37
I recommend Travis Fisher's blog post on the [Agentic Spectrum](https://transitivebullsh.it/agentic-spectrum) for more on the idea of agentic as a relative term.
38
38
@@ -41,30 +41,35 @@ I recommend Travis Fisher's blog post on the [Agentic Spectrum](https://transiti
41
41
42
42
## Agentic Loop
43
43
44
-
A term that I have been using is the **agentic loop**. This is any loop of the form Act (on the environment) -> Feedback (from the environment) -> (Re)Act The standard tool-usage loop is an example of an agentic loop.
44
+
A term that I have been using is the **agentic loop**. This is any loop of the form Act (on the environment) -> Feedback (from the environment) -> (Re)Act. The standard tool-usage loop is an example of an agentic loop.
45
+
45
46
Libraries like LangGraph are designed to make implementing agentic loops easier.
46
47
47
48

48
49
49
50
50
51
# Composition of Agents
51
52
52
-
Now down to my current working definition of an Agent
53
+
Let me present my current working definition of an Agent
53
54
54
55
> **An agent is a software component that composes like an agent**
55
56
56
57

57
58
58
-
This definition is interesting to me because it defines an agent in terms of how it looks from the outside, rather than the definition of "agentic" which is defined in terms of how the system is implemented.
59
+
Although it appears circular, this definition is interesting to me because it defines an agent in terms of how it looks from the outside, rather than the definition of "agentic" which is defined in terms of how the system is implemented.
59
60
60
-
First, lets step back and consider what "composition" means. In this context, we're just referring to the process where a (software) system is built from smaller components. This happens at all scales, from the composition of functions to make new functions, up to the Internet itself which is an extremely complex composition of many different components.
61
+
First, let's step back and consider what "composition" means. In this context, we're just referring to the process where a (software) system is built from smaller components. This happens at all scales, from the composition of functions to make new functions, up to the Internet itself which is an extremely complex composition of many different components.
61
62
62
-
At the smallest scale, it's interesting to think about how agentic building blocks can be composed. The easiest thing to do is to treat an LLM call like a function. We know how to compose functions, and we can easily compose LLM-based functions with ordinary software functions so this a productive mode of development and has been the dominant mode in these early years of the LLM-era. The presence of agentic loops doesn't fundamentally change this mode of composition, we can wrap the agentic parts of the system so that they appear to the rest of the system as a function.
63
+
At the smallest scale, it's interesting to think about how agentic building blocks can be composed. The easiest thing to do is to treat an LLM call like a function. We know how to compose functions, and we can easily compose LLM-based functions with ordinary software functions so this is a productive mode of development and has been the dominant mode in these early years of the LLM-era. The presence of agentic loops doesn't fundamentally change this mode of composition, we can wrap the agentic parts of the system so that they appear to the rest of the system as a function.
63
64
64
-
However, there are more agentic methods of composition. For instance, we can compose conversational agents by simply allowing them to talk to each other. This brings a very different range of patterns than software developers are used to, often with ideas from how humans are composed to work towards goals (teams, supervisors, specialists etc), and a new set of changes
65
+
However, there are more agentic methods of composition. For instance, we can compose conversational agents by simply allowing them to talk to each other. This brings a very different range of patterns than software developers are used to, often with ideas from how humans are composed to work towards goals - teams, supervisors, specialists etc.
65
66
66
-
We can also think about the composition of larger agentic systems. Anthropic's MCP provide's a good example of this. The Claude desktop agent can now interface with other agentic software, for example cursor, we could imagine a scenarios where I'm using the composer agent in cursor, and I need to give the cursor agent some info I read in a blog post that I bookmarked. Perhaps the cursor agent could communicate with claude, which may in turn invoke a google chrome agent that can search my bookmarks, and in a goal-directed manner they co-operate to perform the task.
67
+
We can also think about the composition of larger agentic systems. [Anthropic's MCP](https://modelcontextprotocol.io/) provides a good example of this. The Claude desktop agent can now interface with other agentic software, for example cursor, we could imagine a scenario where I'm using the composer agent in Cursor, and I need to give the cursor agent some info I read in a blog post that I bookmarked. Perhaps the cursor agent could communicate with claude, which may in turn invoke a Google Chrome agent that can search my bookmarks, and in a goal-directed manner they co-operate to perform the task.
67
68
68
-
A final thing to think about in agentic composition, is that through LLMs codewriting abilities it is possible for LLMs to build their own glue code to facilitate integration with other systems/agents. A great example of this (and perhaps my favourite paper of the year) is the [Agora Protocol](https://agoraprotocol.org/)
69
+
A final thing to think about in agentic composition is that through LLMs' code-writing abilities it is possible for LLMs to build their own glue code to facilitate integration with other systems/agents. A great example of this (and perhaps my favourite paper of the year) is the [Agora Protocol](https://agoraprotocol.org/) which demonstrates how agents can dynamically negotiate protocols between agents which bypass LLM calls completely.
69
70
70
71

72
+
73
+
# Conclusion
74
+
75
+
While *Agent* may be a redundant term when it comes to defining software systems, it is a useful term when thinking about how software systems can be linked together. We're moving toward a future where agents won't just be isolated components but participants in a rich ecosystem of interacting systems, and we'll need to develop new vocabulary, patterns, and ideas to describe and build this future.
0 commit comments