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: agents/introduction.mdx
+15-9Lines changed: 15 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,24 +4,30 @@ title: Introduction
4
4
5
5
## What are Agents?
6
6
7
-
**Agents** are intelligent programs that solve problems autonomously.
7
+
**Agents** are AI programs that operate autonomously.
8
8
9
-
Agents have memory, domain knowledge and the ability to use tools (like searching the web, querying a database, making API calls). Unlike traditional programs that follow a predefined execution path, Agents dynamically adapt their approach based on the context and tool results.
9
+
The core of an Agent is a model, the tools it has access to, and instructions to guide its behavior.
10
10
11
-
Instead of a rigid binary definition, let's think of Agents in terms of agency and autonomy.
11
+
- The **model** acts as the **brain** of the Agent - helping it reason, act, and respond to the user. Better the model, smarter the Agent.
12
+
-**Tools** are the **body** of the Agent - enabling it to interact with the real world. "Tool-use" is what makes these systems "Agentic".
13
+
-**Instructions** guide the **behavior** of the Agent. Better the model, better it is at following instructions.
12
14
13
-
-**Level 0**: Agents with no tools (basic inference tasks).
14
-
-**Level 1**: Agents with tools for autonomous task execution.
15
-
-**Level 2**: Agents with knowledge, combining memory and reasoning.
16
-
-**Level 3**: Teams of specialized agents collaborating on complex workflows.
15
+
Agents also have **memory**, **knowledge**, **storage** and the ability to **reason**.
16
+
17
+
-**reasoning:** lets Agents "think" before responding and "analyze" the results of their actions (i.e. tool calls). Reasoning improves the Agents ability to solve problems that require multi-step tool use. Reasoning improves quality, but also increases latency and cost.
18
+
-**knowledge:** is domain-specific information the Agent can **_search on demand_** to make better decisions (dynamic few-shot learning) or provide accurate responses (agentic RAG). This knowledge is stored in a vector database and this _**Agent's searching on demand**_ pattern is known as Agentic Search. **Agno (is aiming to) have first class support for the popular Agentic Search pattern, Hybrid Search + Reranking, for every major vector database.**
19
+
-**storage:** is used by Agents to save session history and state in a database. Model APIs are stateless and storage enables us to continue conversations across runs using a `session_id`. This makes Agents stateful and enables multi-turn conversations.
20
+
-**memory:** gives Agents the ability to store and recall information from previous interactions, allowing them to learn user preferences and personalize their responses. This is an evolving field and Agno is aiming to support the popular Memory patterns.
If this is your first time building agents, [follow this guide](/agents) and then dive into more advanced concepts.
24
+
<Check>
25
+
If this is your first time building agents, [follow these examples](/introduction/agents#basic-agent) before diving into advanced concepts.
26
+
</Check>
21
27
22
28
## Example: Research Agent
23
29
24
-
Let's create a research agent that can search the web using DuckDuckGo, scrape the top links using Newspaper4k and write a research report for us. Ideally we'll use specialized tools (like Exa) but let's start with the free tools first.
30
+
Let's build a research agent using Exa to showcase how to guide the Agent to produce the report in a specific format. In advanced cases, we should use [Structured Outputs](/agents/structured-output) instead.
25
31
26
32
<Note>
27
33
The description and instructions are converted to the system message and the
Copy file name to clipboardExpand all lines: agents/run.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,10 @@ title: Agent.run()
4
4
5
5
Use the `Agent.run()` function to run the agent and return the response as a `RunResponse` object or a stream of `RunResponse` objects.
6
6
7
+
<Tip>
8
+
Many of our examples use `agent.print_response()` but that is just a helper utility to print the response in the terminal. In practice, you should always use `agent.run()`.
Agents are able to maintain a conversation with one or more users. It is important to understand the following concepts:
5
+
When we call `Agent.run()`, it creates a stateless, singular Agent run.
6
6
7
-
-**Session:** Each conversation with an Agent is called a **session**. Sessions are identified by a `session_id` and should be unique for each user.
8
-
-**Run:** Every interaction (i.e. chat) within a session is called a **run**. Runs are identified by a `run_id`.
9
-
-**Messages:** are the individual messages sent to and received from the model. They have a `role` (`system`, `user` or `assistant`) and `content`.
7
+
But what if we want to continue this run i.e. have a multi-turn conversation? That's where `sessions` come in. A session is a multi-turn conversation between a user and an Agent. Using a `session_id`, we can maintain conversation history and state across multiple runs.
10
8
9
+
Let's outline some key concepts:
11
10
12
-
Below is an example where a single run is created with an Agent. A `session_id` is automatically generated and added to the run. This won't be associated with any specific user.
11
+
-**Session:** A session is a multi-turn conversation between a user and an Agent. Sessions are identified by a `session_id` and each turn is called a **run**.
12
+
-**Run:** Every interaction (i.e. chat or turn) with an Agent is called a **run**. Runs are identified by a `run_id`. `Agent.run()` creates a new `run_id` when called.
13
+
-**Messages:** are the individual messages sent to and received from the model. They are the underlying data structure that the Agent and model communicate using. Each run contains a list of messages and each session contains a list of runs.
14
+
15
+
Let's start with an example where a single run is created with an Agent. A `run_id` is automatically generated, as well as a `session_id` (because we didn't provide one to continue the conversation). This run is not yet associated with a specific user.
agent.print_response("Tell me a 5 second short story about a robot")
24
27
```
25
28
26
-
## Multiple Users with Sessions
29
+
## Each User gets a Unique Set of Sessions
30
+
31
+
Each user that is interacting with an Agent maintains a unique set of sessions. Set a `user_id` to connect a user to their sessions.
32
+
33
+
In the examples below, we set a `session_id` to demo how you can continue multi-turn conversations with multiple users at the same time. In production, the `session_id` is automatically generated.
27
34
28
-
Sessions are unique for each user. If you want to maintain a conversation with multiple users, you can use the `user_id` and `session_id` to identify the session.
35
+
Note: Multi-user, multi-session currently only works with `Memory.v2`.
29
36
30
-
This requires storage of sessions. See [storage](/agents/storage) for more information.
37
+
<Tip>
38
+
39
+
`Memory.v2` will become the default memory implementation in the next release.
Copy file name to clipboardExpand all lines: introduction.mdx
+31-17Lines changed: 31 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ sidebarTitle: What is Agno
5
5
6
6
**Agno is a lightweight library for building Agents with memory, knowledge, tools and reasoning.**
7
7
8
-
Developers use Agno to build Reasoning Agents, Multimodal Agents, Teams of Agents and Agentic Workflows. Agno also provides a beautiful UI to chat with Agents and tools to monitor and evaluate their performance.
8
+
Developers use Agno to build Reasoning Agents, Multimodal Agents, Teams of Agents and Agentic Workflows. Agno also provides a beautiful UI to chat with your Agents and tools to monitor and evaluate their performance.
9
9
10
10
Here's an Agent that researches and writes a report on a stock, reasoning through each step:
11
11
@@ -45,19 +45,19 @@ agent.print_response("Write a report on NVDA", stream=True, show_full_reasoning=
45
45
46
46
Agno is simple, fast and model-agnostic. Here are some key features:
47
47
48
-
-**Model Agnostic**: Agno provides a unified interface to 23+ model providers, no lock-in.
48
+
-**Model Agnostic**: Agno Agents can connect to 23+ model providers, no lock-in.
49
49
-**Lightning Fast**: Agents instantiate in **~2μs** on average (10,000x faster than LangGraph) and use **~3.75Kib** memory on average (50x less than LangGraph) (see [benchmarks](https://github.com/agno-agi/agno#performance)).
50
-
-**Reasoning is a first class citizen**: Build Agents that can "think" and "analyze" using Reasoning Models, `ReasoningTools` or our custom `CoT+Tool-use` approach.
50
+
-**Reasoning is a first class citizen**: Make your Agents "think" and "analyze" using Reasoning Models, `ReasoningTools` or our custom `CoT+Tool-use` approach.
51
51
-**Natively Multi Modal**: Agno Agents are natively multi modal, they can take in text, image, audio and video and generate text, image, audio and video as output.
52
52
-**Advanced Multi Agent Architecture**: Agno provides an industry leading multi-agent architecture with 3 different modes: `route`, `collaborate` and `coordinate`.
53
-
-**Long-term Memory & Session Storage**: Agno provides `Storage` & `Memory` classes to provide your Agents with long-term memory and session storage.
54
-
-**20+ Vector Databases for Knowledge**: Add domain knowledge to your Agents by integrating with 20+ vector databases. **Fully async and highly performant.**
55
-
-**Structured Outputs**: Agno Agents have first class support for structured outputs using native structured outputs or `json_mode`.
53
+
-**Agentic RAG using Hybrid Search + Reranking**: Give your Agents access to domain knowledge using one of 20+ vector databases. Get access to state-of-the-art Agentic search that uses hybrid search with re-ranking. **Fully async and highly performant.**
54
+
-**Long-term Memory & Session Storage**: Agno provides plug-n-play `Storage` & `Memory` drivers that give your Agents long-term memory and session storage.
55
+
-**Structured Outputs**: Agno Agents can return fully-typed responses using model provided structured outputs or `json_mode`.
56
56
-**Monitoring**: Monitor agent sessions and performance in real-time on [agno.com](https://app.agno.com).
57
57
58
58
# Getting Started
59
59
60
-
If you're new to Agno, start by building your [first Agent](/introduction/agents), then chat with it on the [playground](/introduction/playground) and finally, monitor it on [agno.com](/introduction/monitoring).
60
+
If you're new to Agno, start by building your [first Agent](/introduction/agents), chat with it on the [playground](/introduction/playground) and finally, monitor it on [agno.com](/introduction/monitoring).
61
61
62
62
<CardGroupcols={3}>
63
63
<Card
@@ -90,59 +90,73 @@ After that, checkout the [Examples Gallery](/examples) and build real-world appl
90
90
91
91
# Dive deeper
92
92
93
-
Agno is a battle-tested framework with a state-of-the-art multi-agent architecture and ridiculous performance, checkout the following guides to dive-in:
93
+
Agno is a battle-tested framework with a state-of-the-art reasoning and multi-agent architecture, checkout the following guides to dive-in:
0 commit comments