|
2 | 2 |
|
3 | 3 | AgentM is a library of "Micro Agents" that make it easy to add reliable intelligence to any application. The philosophy behind AgentM is that "Agents" should be mostly comprised of deterministic code with a sprinkle of LLM-powered intelligence mixed in. Many of the existing Agent frameworks place the LLM at the center of the application as an orchestrator that calls a collection of tools. In an AgentM application, your code is the orchestrator, and you only call a micro agent when you need to perform a task that requires intelligence. |
4 | 4 |
|
5 | | -The initial draft of AgentM was written in JavaScript, but a Python version is available. |
| 5 | +Check out the [JavaScript version](https://github.com/Stevenic/agentm-js) to get a sense of AgentM's current feature set. |
6 | 6 |
|
7 | 7 | ## Installation |
8 | 8 |
|
@@ -70,3 +70,35 @@ Grape,Orange |
70 | 70 | Original list: ['Apple', 'Orange', 'Banana', 'Grape', 'Pineapple'] |
71 | 71 | Sorted list: ['Apple', 'Banana', 'Orange', 'Grape', 'Pineapple'] |
72 | 72 | ``` |
| 73 | + |
| 74 | +### Example 3: Chain of Thought |
| 75 | + |
| 76 | +Run the **chain of thought** example to see how AgentM solves problems using a step-by-step reasoning approach: |
| 77 | + |
| 78 | +```bash |
| 79 | +python examples/chain_of_thought_example.py |
| 80 | +``` |
| 81 | + |
| 82 | +#### Sample Output: |
| 83 | +```bash |
| 84 | +Question: What is the square root of 144? |
| 85 | +Chain of Thought Reasoning: To find the square root of 144 step-by-step, follow these steps: |
| 86 | + |
| 87 | +1. **Understanding Square Roots**: The square root of a number is a value that, when multiplied by itself, gives that number. For example, if x is the square root of y, then x * x = y. |
| 88 | + |
| 89 | +2. **Identifying the Number**: In this case, we need to find the square root of 144. |
| 90 | + |
| 91 | +3. **Finding Factors**: We'll look for a number that, when multiplied by itself, equals 144. |
| 92 | +
|
| 93 | +4. **Testing Numbers**: |
| 94 | + - Let's start with smaller numbers: |
| 95 | + - 12 * 12 = 144 (this is the answer) |
| 96 | + |
| 97 | +5. **Conclusion**: The square root of 144 is 12. |
| 98 | + |
| 99 | +Thus, the final answer is: |
| 100 | + |
| 101 | +\[ |
| 102 | +\sqrt{144} = 12 |
| 103 | +\] |
| 104 | +``` |
0 commit comments