Spaces:
Running
Running
File size: 109,373 Bytes
05d0ca0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CAMEL-AI Learning Platform</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism-tomorrow.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--primary: #8C52FF;
--primary-dark: #6E3CCF;
--secondary: #FFC107;
--dark: #1A1A2E;
--light: #F8F9FA;
--code-bg: #2D2D3A;
}
body {
font-family: 'Inter', sans-serif;
color: #333;
line-height: 1.6;
}
.bg-primary {
background-color: var(--primary);
}
.text-primary {
color: var(--primary);
}
.btn-primary {
background-color: var(--primary);
color: white;
}
.btn-primary:hover {
background-color: var(--primary-dark);
}
.bg-gradient {
background: linear-gradient(135deg, #8C52FF 0%, #5E17EB 100%);
}
.code-block {
background-color: var(--code-bg);
border-radius: 0.5rem;
padding: 1rem;
margin: 1rem 0;
overflow-x: auto;
color: #f8f8f2;
font-family: 'Courier New', monospace;
}
.module-card {
border-left: 4px solid var(--primary);
transition: all 0.3s ease;
}
.module-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.toc-link {
color: #333;
text-decoration: none;
display: block;
padding: 0.25rem 0;
transition: color 0.2s;
}
.toc-link:hover {
color: var(--primary);
}
.toc-link.active {
color: var(--primary);
font-weight: 600;
}
.sticky-nav {
position: sticky;
top: 0;
background: white;
z-index: 1000;
}
.section-divider {
height: 4px;
background: linear-gradient(90deg, var(--primary), transparent);
margin: 3rem 0;
}
.checklist li {
position: relative;
padding-left: 2rem;
margin-bottom: 0.5rem;
}
.checklist li:before {
content: '✓';
position: absolute;
left: 0;
color: var(--primary);
font-weight: bold;
}
@media print {
.sticky-nav {
position: relative;
}
.no-print {
display: none;
}
.print-break-avoid {
break-inside: avoid;
}
}
</style>
</head>
<body class="bg-gray-50">
<!-- Navigation -->
<nav class="sticky-nav shadow-sm">
<div class="container mx-auto px-4 py-3 flex items-center justify-between">
<div class="flex items-center space-x-2">
<div class="w-10 h-10 rounded-full bg-gradient flex items-center justify-center">
<span class="text-white font-bold">C</span>
</div>
<span class="font-bold text-xl">CAMEL-AI</span>
<span class="text-gray-500 text-sm">Learning Platform</span>
</div>
<div class="hidden md:flex space-x-6 text-sm">
<a href="#introduction" class="hover:text-primary">Introduction</a>
<a href="#modules" class="hover:text-primary">Course Modules</a>
<a href="#examples" class="hover:text-primary">Examples</a>
<a href="#business" class="hover:text-primary">Business Cases</a>
<a href="#cheatsheet" class="hover:text-primary">Cheatsheet</a>
</div>
<div class="flex items-center space-x-4">
<a href="https://github.com/camel-ai/camel" target="_blank" class="text-gray-600 hover:text-primary">
<i class="fab fa-github text-xl"></i>
</a>
<a href="https://discord.camel-ai.org/" target="_blank" class="text-gray-600 hover:text-primary">
<i class="fab fa-discord text-xl"></i>
</a>
</div>
</div>
</nav>
<!-- Hero Section -->
<section class="bg-gradient text-white py-12 md:py-24">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-10 md:mb-0">
<h1 class="text-4xl md:text-5xl font-bold mb-4">Master CAMEL-AI</h1>
<p class="text-xl mb-8">Discover the power of multi-agent systems for data generation, world simulation, and task automation</p>
<div class="flex flex-wrap gap-4">
<a href="#modules" class="bg-white text-primary px-6 py-2 rounded-full font-medium hover:bg-gray-100 transition">
Start Learning
</a>
<a href="#business" class="bg-transparent border-2 border-white px-6 py-2 rounded-full font-medium hover:bg-white hover:text-primary transition">
Business Applications
</a>
</div>
</div>
<div class="md:w-1/2 flex justify-center">
<div class="bg-white bg-opacity-10 rounded-xl p-6 max-w-md">
<div class="text-sm mb-4">
<i class="fas fa-quote-left text-secondary opacity-50 text-xl"></i>
</div>
<p class="mb-4">CAMEL-AI is the premier open-source framework for building and studying autonomous, communicative agents. It's revolutionizing how we approach multi-agent systems and collaborative AI.</p>
<div class="flex items-center">
<div class="mr-4">
<div class="w-12 h-12 rounded-full bg-white bg-opacity-20 flex items-center justify-center">
<i class="fas fa-robot text-secondary"></i>
</div>
</div>
<div>
<div class="font-semibold">CAMEL-AI Team</div>
<div class="text-xs text-gray-300">Finding the Scaling Laws of Agents</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Key Metrics -->
<section class="py-8 bg-white">
<div class="container mx-auto px-4">
<div class="grid grid-cols-2 md:grid-cols-4 gap-6 text-center">
<div class="p-4">
<div class="text-3xl font-bold text-primary mb-2">20+</div>
<div class="text-sm text-gray-600">Integrated Model Platforms</div>
</div>
<div class="p-4">
<div class="text-3xl font-bold text-primary mb-2">1000+</div>
<div class="text-sm text-gray-600">GitHub Stars</div>
</div>
<div class="p-4">
<div class="text-3xl font-bold text-primary mb-2">10+</div>
<div class="text-sm text-gray-600">Core Components</div>
</div>
<div class="p-4">
<div class="text-3xl font-bold text-primary mb-2">∞</div>
<div class="text-sm text-gray-600">Possibilities</div>
</div>
</div>
</div>
</section>
<!-- Main Content -->
<div class="container mx-auto px-4 py-12">
<div class="flex flex-col md:flex-row gap-8">
<!-- Sidebar Table of Contents (TOC) -->
<div class="md:w-1/4 md:pr-8">
<div class="sticky top-20">
<div class="bg-white rounded-lg shadow-sm p-6 mb-6">
<h3 class="text-lg font-semibold mb-4">Course Navigation</h3>
<ul class="space-y-1">
<li><a href="#introduction" class="toc-link">Introduction to CAMEL-AI</a></li>
<li><a href="#what-is" class="toc-link">What is CAMEL-AI?</a></li>
<li><a href="#core-components" class="toc-link">Core Components</a></li>
<li>
<a href="#modules" class="toc-link font-medium mt-2">Course Modules</a>
<ul class="pl-4 mt-1 space-y-1">
<li><a href="#module-1" class="toc-link text-sm">Module 1: Fundamentals</a></li>
<li><a href="#module-2" class="toc-link text-sm">Module 2: Agent Creation</a></li>
<li><a href="#module-3" class="toc-link text-sm">Module 3: Tools & Memory</a></li>
<li><a href="#module-4" class="toc-link text-sm">Module 4: Multi-Agent Systems</a></li>
<li><a href="#module-5" class="toc-link text-sm">Module 5: Advanced Applications</a></li>
</ul>
</li>
<li><a href="#examples" class="toc-link font-medium mt-2">Practical Examples</a></li>
<li><a href="#business" class="toc-link font-medium mt-2">Business Use Cases</a></li>
<li><a href="#cheatsheet" class="toc-link font-medium mt-2">Comprehensive Cheatsheet</a></li>
</ul>
</div>
<div class="bg-primary bg-opacity-10 rounded-lg p-6">
<h3 class="text-primary font-semibold mb-3">Ready to Implement?</h3>
<p class="text-sm mb-4">Get assistance from our community or access full documentation.</p>
<div class="space-y-2">
<a href="https://discord.camel-ai.org/" target="_blank" class="flex items-center text-sm text-primary hover:underline">
<i class="fab fa-discord mr-2"></i> Join Discord Community
</a>
<a href="https://docs.camel-ai.org/" target="_blank" class="flex items-center text-sm text-primary hover:underline">
<i class="fas fa-book mr-2"></i> Documentation
</a>
<a href="https://github.com/camel-ai/camel" target="_blank" class="flex items-center text-sm text-primary hover:underline">
<i class="fab fa-github mr-2"></i> GitHub Repository
</a>
</div>
</div>
</div>
</div>
<!-- Main Content Area -->
<div class="md:w-3/4">
<!-- Introduction Section -->
<section id="introduction" class="mb-12">
<h2 class="text-3xl font-bold mb-6">Introduction to CAMEL-AI</h2>
<div class="bg-white rounded-xl shadow-sm p-6 mb-6">
<p class="mb-4">
Welcome to the comprehensive learning platform for CAMEL-AI, the cutting-edge open-source framework for building and studying autonomous, communicative agents. This course is designed for both individuals with Python knowledge and businesses looking to harness the power of multi-agent systems.
</p>
<p class="mb-4">
CAMEL-AI (Communicative Agents for "Mind" Exploration of Large Language Model Society) emerged as the earliest LLM-based multi-agent framework and has evolved into a powerful tool for real-world task solving. Whether you're interested in data generation, world simulation, or task automation, CAMEL-AI provides the infrastructure you need.
</p>
<div class="bg-gray-100 p-4 rounded-lg mb-4">
<h4 class="font-semibold mb-2">What you'll learn in this course:</h4>
<ul class="checklist">
<li>The core concepts behind CAMEL-AI and multi-agent systems</li>
<li>How to create and customize agents for specific tasks</li>
<li>Techniques for enabling agent communication and collaboration</li>
<li>Practical applications of CAMEL-AI in business contexts</li>
<li>Advanced implementation strategies with comprehensive code examples</li>
</ul>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6">
<div class="bg-white rounded-xl shadow-sm p-6">
<div class="text-primary mb-3">
<i class="fas fa-code text-2xl"></i>
</div>
<h4 class="font-semibold mb-2">For Developers</h4>
<p class="text-sm text-gray-600">Learn how to implement CAMEL-AI's powerful tools and APIs in your applications.</p>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<div class="text-primary mb-3">
<i class="fas fa-briefcase text-2xl"></i>
</div>
<h4 class="font-semibold mb-2">For Businesses</h4>
<p class="text-sm text-gray-600">Discover how CAMEL-AI can automate workflows and generate valuable data.</p>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<div class="text-primary mb-3">
<i class="fas fa-flask text-2xl"></i>
</div>
<h4 class="font-semibold mb-2">For Researchers</h4>
<p class="text-sm text-gray-600">Explore agent scaling laws and contribute to cutting-edge AI research.</p>
</div>
</div>
</section>
<!-- What is CAMEL-AI Section -->
<section id="what-is" class="mb-12">
<h2 class="text-3xl font-bold mb-6">What is CAMEL-AI?</h2>
<div class="bg-white rounded-xl shadow-sm p-6">
<p class="mb-4">
CAMEL stands for <span class="font-semibold">C</span>ommunicative <span class="font-semibold">A</span>gents for "<span class="font-semibold">M</span>ind" <span class="font-semibold">E</span>xploration of <span class="font-semibold">L</span>arge Language Model Society. It's an advanced framework designed to facilitate autonomous cooperation among communicative agents, enabling them to solve complex tasks with minimal human intervention.
</p>
<div class="rounded-lg bg-gray-100 p-5 mb-6">
<h4 class="font-semibold mb-3">Core Philosophy of CAMEL-AI:</h4>
<p class="italic text-gray-700 mb-4">
"Can we design an autonomous communicative agent capable of steering the conversation toward task completion with minimal human supervision?"
</p>
<p class="text-sm text-gray-600">
This guiding question shapes the development of CAMEL-AI, focusing on creating agents that can work independently while effectively collaborating with other agents.
</p>
</div>
<h4 class="font-semibold mb-3">Key Characteristics:</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
<div class="flex items-start">
<div class="text-primary mr-3 mt-1">
<i class="fas fa-robot"></i>
</div>
<div>
<h5 class="font-medium">Autonomous Communication</h5>
<p class="text-sm text-gray-600">Agents interact and coordinate with minimal human intervention</p>
</div>
</div>
<div class="flex items-start">
<div class="text-primary mr-3 mt-1">
<i class="fas fa-users"></i>
</div>
<div>
<h5 class="font-medium">Multi-Agent Systems</h5>
<p class="text-sm text-gray-600">Multiple agents collaborate to solve complex problems</p>
</div>
</div>
<div class="flex items-start">
<div class="text-primary mr-3 mt-1">
<i class="fas fa-search"></i>
</div>
<div>
<h5 class="font-medium">Behavioral Exploration</h5>
<p class="text-sm text-gray-600">Examines agent behaviors across different contexts</p>
</div>
</div>
<div class="flex items-start">
<div class="text-primary mr-3 mt-1">
<i class="fas fa-expand-arrows-alt"></i>
</div>
<div>
<h5 class="font-medium">Scalability</h5>
<p class="text-sm text-gray-600">Frameworks scales from simple tasks to complex systems</p>
</div>
</div>
<div class="flex items-start">
<div class="text-primary mr-3 mt-1">
<i class="fas fa-code-branch"></i>
</div>
<div>
<h5 class="font-medium">Open Source</h5>
<p class="text-sm text-gray-600">Community-driven development and improvement</p>
</div>
</div>
<div class="flex items-start">
<div class="text-primary mr-3 mt-1">
<i class="fas fa-sync"></i>
</div>
<div>
<h5 class="font-medium">Adaptability</h5>
<p class="text-sm text-gray-600">Learns from surroundings and improves over time</p>
</div>
</div>
</div>
<div class="bg-primary bg-opacity-5 rounded-lg p-5 border-l-4 border-primary">
<h4 class="font-semibold mb-2">CAMEL-AI Framework Overview</h4>
<p class="text-sm mb-4">
At its core, CAMEL-AI provides a structured environment for agents with different roles to collaborate on tasks. Each agent utilizes Large Language Models (LLMs) to enhance cognitive capabilities, enabling natural language understanding and generation.
</p>
<p class="text-sm">
The framework facilitates flexible communication between agents, equips them with tools to interact with the external world, and provides memory capabilities for more grounded learning and inference.
</p>
</div>
</div>
</section>
<!-- Core Components Section -->
<section id="core-components" class="mb-12">
<h2 class="text-3xl font-bold mb-6">Core Components of CAMEL-AI</h2>
<div class="bg-white rounded-xl shadow-sm p-6">
<p class="mb-6">
CAMEL-AI consists of several key modules that work together to create powerful agent systems. Understanding these components is essential for effectively implementing CAMEL-AI in your projects.
</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<div class="bg-gray-50 p-5 rounded-lg">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-primary flex items-center justify-center mr-3">
<i class="fas fa-brain text-white"></i>
</div>
<h4 class="font-semibold">Models</h4>
</div>
<p class="text-sm text-gray-600 mb-3">
Architectures and customization options for agent intelligence, supporting a wide range of LLMs.
</p>
<div class="text-xs bg-gray-100 p-2 rounded">
<span class="text-primary font-medium">Supports:</span> OpenAI, Llama3, Anthropic, HuggingFace, Ollama, and more
</div>
</div>
<div class="bg-gray-50 p-5 rounded-lg">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-primary flex items-center justify-center mr-3">
<i class="fas fa-comments text-white"></i>
</div>
<h4 class="font-semibold">Messages</h4>
</div>
<p class="text-sm text-gray-600 mb-3">
Messaging protocols for agent communication, enabling standardized information exchange.
</p>
<div class="text-xs bg-gray-100 p-2 rounded">
<span class="text-primary font-medium">Includes:</span> Standardized message formats, role-based messaging, content validation
</div>
</div>
<div class="bg-gray-50 p-5 rounded-lg">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-primary flex items-center justify-center mr-3">
<i class="fas fa-memory text-white"></i>
</div>
<h4 class="font-semibold">Memory</h4>
</div>
<p class="text-sm text-gray-600 mb-3">
Memory storage and retrieval mechanisms for more grounded learning and inference.
</p>
<div class="text-xs bg-gray-100 p-2 rounded">
<span class="text-primary font-medium">Features:</span> In-context memory, external database connections, persistent storage
</div>
</div>
<div class="bg-gray-50 p-5 rounded-lg">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-primary flex items-center justify-center mr-3">
<i class="fas fa-tools text-white"></i>
</div>
<h4 class="font-semibold">Tools</h4>
</div>
<p class="text-sm text-gray-600 mb-3">
Integration with external tools, allowing agents to interact with the external world.
</p>
<div class="text-xs bg-gray-100 p-2 rounded">
<span class="text-primary font-medium">Examples:</span> Search, Twitter, GitHub, Google Maps, Reddit, code execution
</div>
</div>
<div class="bg-gray-50 p-5 rounded-lg">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-primary flex items-center justify-center mr-3">
<i class="fas fa-quote-right text-white"></i>
</div>
<h4 class="font-semibold">Prompts</h4>
</div>
<p class="text-sm text-gray-600 mb-3">
Prompt engineering and customization for guiding agent behavior and responses.
</p>
<div class="text-xs bg-gray-100 p-2 rounded">
<span class="text-primary font-medium">Capabilities:</span> Role definition, behavior guidance, task specification
</div>
</div>
<div class="bg-gray-50 p-5 rounded-lg">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-primary flex items-center justify-center mr-3">
<i class="fas fa-tasks text-white"></i>
</div>
<h4 class="font-semibold">Tasks</h4>
</div>
<p class="text-sm text-gray-600 mb-3">
Task creation and management for agent workflows and goal-directed behavior.
</p>
<div class="text-xs bg-gray-100 p-2 rounded">
<span class="text-primary font-medium">Functions:</span> Task definition, decomposition, distribution, prioritization
</div>
</div>
<div class="bg-gray-50 p-5 rounded-lg">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-primary flex items-center justify-center mr-3">
<i class="fas fa-project-diagram text-white"></i>
</div>
<h4 class="font-semibold">Society</h4>
</div>
<p class="text-sm text-gray-600 mb-3">
Components for building agent societies and facilitating inter-agent collaboration.
</p>
<div class="text-xs bg-gray-100 p-2 rounded">
<span class="text-primary font-medium">Elements:</span> Agent role definition, coordination protocols, workforce management
</div>
</div>
<div class="bg-gray-50 p-5 rounded-lg">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-primary flex items-center justify-center mr-3">
<i class="fas fa-search-plus text-white"></i>
</div>
<h4 class="font-semibold">Retrievers</h4>
</div>
<p class="text-sm text-gray-600 mb-3">
Retrieval methods for knowledge access, enhancing agent capabilities with external information.
</p>
<div class="text-xs bg-gray-100 p-2 rounded">
<span class="text-primary font-medium">Types:</span> RAG (Retrieval-Augmented Generation), vector databases, knowledge graphs
</div>
</div>
</div>
<div class="bg-gray-100 p-5 rounded-lg">
<h4 class="font-semibold mb-3">How These Components Work Together</h4>
<p class="text-sm mb-3">
In a typical CAMEL-AI system, these components interact in the following way:
</p>
<ol class="text-sm space-y-2 list-decimal pl-5">
<li>
<span class="font-medium">Task Definition:</span> A task is defined using the Task module, specifying what needs to be accomplished.
</li>
<li>
<span class="font-medium">Agent Creation:</span> Agents are created with specific roles, using Models for intelligence and Prompts for behavior guidance.
</li>
<li>
<span class="font-medium">Collaboration Setup:</span> The Society module establishes communication channels and protocols between agents.
</li>
<li>
<span class="font-medium">Task Execution:</span> Agents use Tools to interact with the external world, Memory to maintain context, and Messages to communicate with each other.
</li>
<li>
<span class="font-medium">Information Retrieval:</span> When needed, Retrievers access additional knowledge to enhance agent responses.
</li>
<li>
<span class="font-medium">Task Completion:</span> The collaborative effort leads to task completion, with minimal human intervention.
</li>
</ol>
</div>
</div>
</section>
<div class="section-divider"></div>
<!-- Course Modules Section -->
<section id="modules" class="mb-12">
<h2 class="text-3xl font-bold mb-6">Course Modules</h2>
<p class="text-gray-600 mb-8">
Our comprehensive curriculum takes you from CAMEL-AI fundamentals to advanced multi-agent applications. Each module builds on previous knowledge, providing a structured learning path.
</p>
<!-- Module 1 -->
<div id="module-1" class="module-card bg-white rounded-xl shadow-sm p-6 mb-8">
<div class="flex items-center mb-4">
<div class="w-12 h-12 rounded-full bg-primary bg-opacity-10 flex items-center justify-center mr-4">
<span class="text-primary font-bold">1</span>
</div>
<h3 class="text-xl font-bold">Module 1: CAMEL-AI Fundamentals</h3>
</div>
<div class="pl-16">
<p class="mb-4">
This module introduces the core concepts of CAMEL-AI, its architecture, and the philosophy behind multi-agent systems.
</p>
<h4 class="font-semibold mb-2">Key Topics:</h4>
<ul class="list-disc pl-5 mb-4 space-y-1 text-sm">
<li>Introduction to agent-based AI systems</li>
<li>Understanding the CAMEL-AI architecture</li>
<li>Installation and setup of CAMEL-AI</li>
<li>Core components overview</li>
<li>Setting up API keys and environment</li>
</ul>
<div class="bg-gray-50 p-4 rounded-lg mb-4">
<h4 class="font-semibold mb-2 text-sm">Installation</h4>
<div class="code-block text-sm">
<pre><code># Install the base CAMEL library
pip install camel-ai
# For all dependencies
pip install 'camel-ai[all]'
# For HuggingFace agents
pip install 'camel-ai[huggingface-agent]'
# For RAG or agent memory
pip install 'camel-ai[tools]'</code></pre>
</div>
</div>
<div class="bg-gray-50 p-4 rounded-lg mb-4">
<h4 class="font-semibold mb-2 text-sm">Setting API Keys</h4>
<div class="code-block text-sm">
<pre><code>import os
# For OpenAI models
os.environ["OPENAI_API_KEY"] = "your-api-key-here"
# Alternative: Use a .env file
from dotenv import load_dotenv
load_dotenv() # This loads variables from .env file</code></pre>
</div>
</div>
<div class="flex items-center justify-between">
<div class="text-sm text-gray-500">
<span class="font-medium">Level:</span> Beginner
</div>
<a href="#module-2" class="text-primary text-sm hover:underline flex items-center">
Next Module <i class="fas fa-chevron-right ml-1"></i>
</a>
</div>
</div>
</div>
<!-- Module 2 -->
<div id="module-2" class="module-card bg-white rounded-xl shadow-sm p-6 mb-8">
<div class="flex items-center mb-4">
<div class="w-12 h-12 rounded-full bg-primary bg-opacity-10 flex items-center justify-center mr-4">
<span class="text-primary font-bold">2</span>
</div>
<h3 class="text-xl font-bold">Module 2: Creating Your First Agent</h3>
</div>
<div class="pl-16">
<p class="mb-4">
Learn how to create, customize, and interact with CAMEL-AI agents. This module covers the essential steps for bringing your first agent to life.
</p>
<h4 class="font-semibold mb-2">Key Topics:</h4>
<ul class="list-disc pl-5 mb-4 space-y-1 text-sm">
<li>Agent role definition and system messages</li>
<li>Model selection and configuration</li>
<li>Basic agent interaction with the step() method</li>
<li>Understanding agent responses</li>
<li>Setting agent output language</li>
</ul>
<div class="bg-gray-50 p-4 rounded-lg mb-4">
<h4 class="font-semibold mb-2 text-sm">Creating Your First Agent</h4>
<div class="code-block text-sm">
<pre><code>from camel.agents import ChatAgent
from camel.models import ModelFactory
from camel.types import ModelPlatformType, ModelType
# Define the model
model = ModelFactory.create(
model_platform=ModelPlatformType.OPENAI,
model_type=ModelType.GPT_4O_MINI,
)
# Create your agent
agent = ChatAgent(
system_message="You are a helpful AI assistant that specializes in Python programming.",
model=model,
message_window_size=10 # Optional: set chat memory length
)
# Interact with the agent
response = agent.step("Can you explain how to use list comprehensions in Python?")
print(response.msgs[0].content)</code></pre>
</div>
</div>
<div class="bg-primary bg-opacity-5 p-4 rounded-lg mb-4 border-l-4 border-primary">
<h4 class="font-semibold mb-2 text-sm">Key Concept: Agent Role Definition</h4>
<p class="text-sm">
In CAMEL-AI, an agent's role is defined through its system message, which guides its behavior, expertise, and how it approaches tasks. The more specific and detailed the role definition, the more focused the agent's responses will be.
</p>
</div>
<div class="flex items-center justify-between">
<div class="text-sm text-gray-500">
<span class="font-medium">Level:</span> Beginner
</div>
<a href="#module-3" class="text-primary text-sm hover:underline flex items-center">
Next Module <i class="fas fa-chevron-right ml-1"></i>
</a>
</div>
</div>
</div>
<!-- Module 3 -->
<div id="module-3" class="module-card bg-white rounded-xl shadow-sm p-6 mb-8">
<div class="flex items-center mb-4">
<div class="w-12 h-12 rounded-full bg-primary bg-opacity-10 flex items-center justify-center mr-4">
<span class="text-primary font-bold">3</span>
</div>
<h3 class="text-xl font-bold">Module 3: Tools & Memory</h3>
</div>
<div class="pl-16">
<p class="mb-4">
Enhance your agents with tools for external interaction and memory capabilities for context retention and learning.
</p>
<h4 class="font-semibold mb-2">Key Topics:</h4>
<ul class="list-disc pl-5 mb-4 space-y-1 text-sm">
<li>Integrating tools with your agents</li>
<li>Working with search, math, and specialized toolkits</li>
<li>Understanding tool calling and response handling</li>
<li>Implementing memory systems</li>
<li>Working with in-context and external memory</li>
<li>Memory management and retrieval</li>
</ul>
<div class="bg-gray-50 p-4 rounded-lg mb-4">
<h4 class="font-semibold mb-2 text-sm">Adding Tools to Your Agent</h4>
<div class="code-block text-sm">
<pre><code>from camel.agents import ChatAgent
from camel.models import ModelFactory
from camel.toolkits import MathToolkit, SearchToolkit
# Create an agent with tools
tooled_agent = ChatAgent(
system_message="You are a research assistant with access to tools.",
model=ModelFactory.create(),
tools=[
*MathToolkit().get_tools(), # Math operations
*SearchToolkit().get_tools(), # Web search capabilities
]
)
# Use the agent with tools
response = agent.step("What is the square root of 169, and who discovered it?")
print(response.msgs[0].content)
# Check tool calls
print(response.info['tool_calls'])</code></pre>
</div>
</div>
<div class="bg-gray-50 p-4 rounded-lg mb-4">
<h4 class="font-semibold mb-2 text-sm">Working with Agent Memory</h4>
<div class="code-block text-sm">
<pre><code>from camel.agents import ChatAgent
from camel.messages import BaseMessage
# Create an agent with extended memory
memory_agent = ChatAgent(
system_message="You are an assistant with a good memory.",
model=ModelFactory.create(),
message_window_size=20, # Remember more context
)
# Access agent memory
context = memory_agent.memory.get_context()
# Add a message to memory
memory_agent.record_message(BaseMessage.make_user_message(
content="Remember this important information."
))</code></pre>
</div>
</div>
<div class="flex items-center justify-between">
<div class="text-sm text-gray-500">
<span class="font-medium">Level:</span> Intermediate
</div>
<a href="#module-4" class="text-primary text-sm hover:underline flex items-center">
Next Module <i class="fas fa-chevron-right ml-1"></i>
</a>
</div>
</div>
</div>
<!-- Module 4 -->
<div id="module-4" class="module-card bg-white rounded-xl shadow-sm p-6 mb-8">
<div class="flex items-center mb-4">
<div class="w-12 h-12 rounded-full bg-primary bg-opacity-10 flex items-center justify-center mr-4">
<span class="text-primary font-bold">4</span>
</div>
<h3 class="text-xl font-bold">Module 4: Multi-Agent Systems</h3>
</div>
<div class="pl-16">
<p class="mb-4">
Discover how to create collaborative agent societies where multiple agents work together to solve complex tasks.
</p>
<h4 class="font-semibold mb-2">Key Topics:</h4>
<ul class="list-disc pl-5 mb-4 space-y-1 text-sm">
<li>Multi-agent architecture in CAMEL-AI</li>
<li>Agent role specialization and collaboration</li>
<li>Creating agent workforces</li>
<li>Task decomposition and assignment</li>
<li>Inter-agent communication protocols</li>
<li>Managing agent collaboration</li>
</ul>
<div class="bg-gray-50 p-4 rounded-lg mb-4">
<h4 class="font-semibold mb-2 text-sm">Building a Multi-Agent System</h4>
<div class="code-block text-sm">
<pre><code>from camel.agents import ChatAgent
from camel.societies.workforce import Workforce
from camel.tasks.task import Task
from camel.models import ModelFactory
# Create individual agents
researcher = ChatAgent(
system_message="You are a research specialist who finds information.",
model=ModelFactory.create(),
tools=[SearchToolkit().get_tools()]
)
analyst = ChatAgent(
system_message="You analyze information and extract insights.",
model=ModelFactory.create()
)
writer = ChatAgent(
system_message="You create clear, engaging content from analysis.",
model=ModelFactory.create()
)
# Create workforce
team = Workforce('Content Creation Team')
team.add_single_agent_worker("Researcher", worker=researcher)
team.add_single_agent_worker("Analyst", worker=analyst)
team.add_single_agent_worker("Writer", worker=writer)
# Define and process a task
content_task = Task(
content="Create a comprehensive blog post about renewable energy trends.",
id='blog_001',
)
result = team.process_task(content_task)
print(result.result)</code></pre>
</div>
</div>
<div class="bg-primary bg-opacity-5 p-4 rounded-lg mb-4 border-l-4 border-primary">
<h4 class="font-semibold mb-2 text-sm">Key Concept: Agent Specialization</h4>
<p class="text-sm">
In multi-agent systems, each agent should have a specialized role with clear responsibilities. This specialization allows the workforce to handle complex tasks efficiently, with each agent focusing on what it does best. The Workforce module in CAMEL-AI manages the coordination between these specialized agents.
</p>
</div>
<div class="flex items-center justify-between">
<div class="text-sm text-gray-500">
<span class="font-medium">Level:</span> Advanced
</div>
<a href="#module-5" class="text-primary text-sm hover:underline flex items-center">
Next Module <i class="fas fa-chevron-right ml-1"></i>
</a>
</div>
</div>
</div>
<!-- Module 5 -->
<div id="module-5" class="module-card bg-white rounded-xl shadow-sm p-6 mb-8">
<div class="flex items-center mb-4">
<div class="w-12 h-12 rounded-full bg-primary bg-opacity-10 flex items-center justify-center mr-4">
<span class="text-primary font-bold">5</span>
</div>
<h3 class="text-xl font-bold">Module 5: Advanced Applications</h3>
</div>
<div class="pl-16">
<p class="mb-4">
Explore advanced applications of CAMEL-AI, including Retrieval-Augmented Generation (RAG), knowledge graphs, and synthetic data generation.
</p>
<h4 class="font-semibold mb-2">Key Topics:</h4>
<ul class="list-disc pl-5 mb-4 space-y-1 text-sm">
<li>Implementing RAG with CAMEL-AI</li>
<li>Building knowledge graph agents</li>
<li>Synthetic data generation techniques</li>
<li>Task decomposition with critic agents</li>
<li>Embodied agents for physical interaction</li>
<li>Integrating CAMEL-AI with other systems</li>
</ul>
<div class="bg-gray-50 p-4 rounded-lg mb-4">
<h4 class="font-semibold mb-2 text-sm">Implementing RAG with CAMEL-AI</h4>
<div class="code-block text-sm">
<pre><code>from camel.agents import ChatAgent
from camel.retrievers import VectorDBRetriever
from camel.models import ModelFactory
# Set up a retriever with vector database (conceptual example)
retriever = VectorDBRetriever(
database_url="your-vector-db-connection",
embedding_model="text-embedding-ada-002",
)
# Create a RAG agent
rag_agent = ChatAgent(
system_message="You are a knowledge assistant that answers questions using a knowledge base.",
model=ModelFactory.create(),
retriever=retriever,
)
# Query the agent
response = rag_agent.step("What are the latest approaches to renewable energy storage?")</code></pre>
</div>
</div>
<div class="bg-gray-50 p-4 rounded-lg mb-4">
<h4 class="font-semibold mb-2 text-sm">Synthetic Data Generation</h4>
<div class="code-block text-sm">
<pre><code>from camel.agents import ChatAgent
from camel.messages import BaseMessage
from camel.models import ModelFactory
from camel.types import ModelPlatformType, ModelType
# Create customer and service agent for synthetic conversations
customer_agent = ChatAgent(
BaseMessage.make_assistant_message(
role_name="Customer",
content="You are a customer with specific questions about a product."
),
model=ModelFactory.create(
model_platform=ModelPlatformType.DEFAULT,
model_type=ModelType.DEFAULT,
)
)
service_agent = ChatAgent(
BaseMessage.make_assistant_message(
role_name="Support Agent",
content="You are a helpful customer support agent for a tech company."
),
model=ModelFactory.create(
model_platform=ModelPlatformType.DEFAULT,
model_type=ModelType.DEFAULT,
)
)
# Generate synthetic conversation
conversations = []
initial_query = "I'm having trouble setting up my new device."
# Conversation loop
customer_msg = BaseMessage.make_user_message(content=initial_query)
for i in range(5): # 5 turns of conversation
service_response = service_agent.step(customer_msg.content)
conversations.append({"role": "customer", "message": customer_msg.content})
conversations.append({"role": "service", "message": service_response.msgs[0].content})
if i < 4: # Skip last customer turn
customer_msg = customer_agent.step(service_response.msgs[0].content)
# Save synthetic data
import json
with open("synthetic_support_conversations.json", "w") as f:
json.dump(conversations, f, indent=2)</code></pre>
</div>
</div>
<div class="flex items-center justify-between">
<div class="text-sm text-gray-500">
<span class="font-medium">Level:</span> Advanced
</div>
<a href="#examples" class="text-primary text-sm hover:underline flex items-center">
Go to Practical Examples <i class="fas fa-chevron-right ml-1"></i>
</a>
</div>
</div>
</div>
</section>
<div class="section-divider"></div>
<!-- Practical Examples Section -->
<section id="examples" class="mb-12">
<h2 class="text-3xl font-bold mb-6">Practical Examples</h2>
<p class="text-gray-600 mb-8">
Explore real-world implementations of CAMEL-AI through these practical examples, each demonstrating a different aspect of the framework's capabilities.
</p>
<!-- Example 1 -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Example 1: Knowledge Graph Generation</h3>
<div class="mb-4">
<div class="text-sm text-gray-500 mb-2">
<span class="font-medium">Difficulty:</span> Intermediate |
<span class="font-medium">Focus:</span> Knowledge Representation
</div>
<p class="mb-4">
This example demonstrates how to use CAMEL-AI to automatically generate a knowledge graph from unstructured text, creating a structured representation of entities and their relationships.
</p>
<div class="bg-primary bg-opacity-5 p-4 rounded-lg mb-4 border-l-4 border-primary">
<h4 class="font-semibold mb-2 text-sm">Use Case</h4>
<p class="text-sm">
A company with vast amounts of documentation wants to create a navigable knowledge graph to help employees find information more efficiently. Instead of manually creating the graph, they use CAMEL-AI to automatically extract entities and relationships from their documents.
</p>
</div>
<div class="code-block text-sm">
<pre><code>from camel.agents import ChatAgent
from camel.models import ModelFactory
from camel.toolkits import KnowledgeGraphToolkit
from camel.messages import BaseMessage
# Create a knowledge graph agent
kg_agent = ChatAgent(
BaseMessage.make_assistant_message(
role_name="Knowledge Graph Specialist",
content="You are an expert at extracting entities and relationships from text to build knowledge graphs."
),
model=ModelFactory.create(),
tools=KnowledgeGraphToolkit().get_tools(),
)
# Sample document text
document = """
Renewable energy comes from sources that are naturally replenishing but flow-limited.
They are virtually inexhaustible in duration but limited in the amount of energy that
is available per unit of time. Renewable energy sources include biomass, hydropower,
geothermal, wind, and solar. Wind energy is captured through wind turbines, which convert
kinetic energy from wind into mechanical power. Solar energy is derived from the sun through
solar panels using photovoltaic cells.
"""
# Generate knowledge graph
response = kg_agent.step(f"Create a knowledge graph from this text: {document}")
# The response would contain a structured knowledge graph with entities like
# "Renewable Energy", "Wind Energy", "Solar Energy" and their relationships</code></pre>
</div>
<div class="mt-4">
<h4 class="font-semibold mb-2 text-sm">Key Learnings</h4>
<ul class="list-disc pl-5 text-sm">
<li>How to use specialized agents for knowledge extraction</li>
<li>Working with the KnowledgeGraphToolkit</li>
<li>Converting unstructured text to structured relationships</li>
<li>Creating searchable knowledge representations</li>
</ul>
</div>
</div>
</div>
<!-- Example 2 -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Example 2: Customer Support Multi-Agent System</h3>
<div class="mb-4">
<div class="text-sm text-gray-500 mb-2">
<span class="font-medium">Difficulty:</span> Advanced |
<span class="font-medium">Focus:</span> Multi-Agent Collaboration
</div>
<p class="mb-4">
This example showcases a sophisticated customer support system with multiple specialized agents working together to handle customer inquiries.
</p>
<div class="bg-primary bg-opacity-5 p-4 rounded-lg mb-4 border-l-4 border-primary">
<h4 class="font-semibold mb-2 text-sm">Use Case</h4>
<p class="text-sm">
An e-commerce company wants to automate their customer support to handle common inquiries. They implement a multi-agent system where different agents handle different aspects of customer service, working together to provide comprehensive assistance.
</p>
</div>
<div class="code-block text-sm">
<pre><code>from camel.agents import ChatAgent
from camel.societies.workforce import Workforce
from camel.tasks.task import Task
from camel.models import ModelFactory
from camel.toolkits import SearchToolkit
# Create greeter agent
greeter_agent = ChatAgent(
system_message="You are the initial greeter for our customer support. Welcome customers warmly and identify their needs.",
model=ModelFactory.create()
)
# Create product specialist
product_agent = ChatAgent(
system_message="You are a product specialist who knows all details about our product catalog.",
model=ModelFactory.create(),
tools=[SearchToolkit().get_tools()] # Can search product database
)
# Create support specialist
support_agent = ChatAgent(
system_message="You handle technical support issues and customer complaints with patience and expertise.",
model=ModelFactory.create()
)
# Set up the workforce
support_team = Workforce('Customer Support')
support_team.add_single_agent_worker("Greeter", worker=greeter_agent)
support_team.add_single_agent_worker("Product Specialist", worker=product_agent)
support_team.add_single_agent_worker("Support Specialist", worker=support_agent)
# Process customer query
customer_query = Task(
content="I received my order yesterday but the product is damaged. I'd like a replacement or refund.",
id='customer_123',
)
response = support_team.process_task(customer_query)
print(response.result)</code></pre>
</div>
<div class="mt-4">
<h4 class="font-semibold mb-2 text-sm">Key Learnings</h4>
<ul class="list-disc pl-5 text-sm">
<li>Setting up a multi-agent workforce with specialized roles</li>
<li>Task routing between different agents</li>
<li>Coordinating responses across multiple agents</li>
<li>Implementing a complete customer support workflow</li>
</ul>
</div>
</div>
</div>
<!-- Example 3 -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Example 3: Dynamic Travel Planning</h3>
<div class="mb-4">
<div class="text-sm text-gray-500 mb-2">
<span class="font-medium">Difficulty:</span> Advanced |
<span class="font-medium">Focus:</span> Tools Integration & Planning
</div>
<p class="mb-4">
This example demonstrates a complex travel planning system using multiple agents with specialized tools to create personalized travel itineraries.
</p>
<div class="bg-primary bg-opacity-5 p-4 rounded-lg mb-4 border-l-4 border-primary">
<h4 class="font-semibold mb-2 text-sm">Use Case</h4>
<p class="text-sm">
A travel agency wants to create personalized travel itineraries for their clients. They implement a multi-agent system where different agents handle various aspects of travel planning, from destination research to logistics and itinerary creation.
</p>
</div>
<div class="code-block text-sm">
<pre><code>from camel.agents import ChatAgent
from camel.societies.workforce import Workforce
from camel.tasks.task import Task
from camel.models import ModelFactory
from camel.toolkits import GoogleMapsToolkit, SearchToolkit
# Create destination expert agent
destination_agent = ChatAgent(
system_message="You are a travel destination expert with deep knowledge about global destinations.",
model=ModelFactory.create(),
tools=[SearchToolkit().get_tools()]
)
# Create logistics agent with mapping capabilities
logistics_agent = ChatAgent(
system_message="You handle travel logistics including flights, accommodations, and local transportation.",
model=ModelFactory.create(),
tools=GoogleMapsToolkit().get_tools()
)
# Create itinerary planner
itinerary_agent = ChatAgent(
system_message="You create detailed day-by-day travel itineraries based on traveler preferences.",
model=ModelFactory.create()
)
# Set up travel planning workforce
travel_team = Workforce('Travel Planning')
travel_team.add_single_agent_worker("Destination Expert", worker=destination_agent)
travel_team.add_single_agent_worker("Logistics Specialist", worker=logistics_agent)
travel_team.add_single_agent_worker("Itinerary Planner", worker=itinerary_agent)
# Process travel request
travel_request = Task(
content="I want a 5-day trip to Tokyo in October for a family of four with two teenagers. We're interested in technology, anime, and traditional culture.",
id='travel_001',
)
itinerary = travel_team.process_task(travel_request)
print(itinerary.result)</code></pre>
</div>
<div class="mt-4">
<h4 class="font-semibold mb-2 text-sm">Key Learnings</h4>
<ul class="list-disc pl-5 text-sm">
<li>Integrating specialized tools like Google Maps for real-world data</li>
<li>Coordinating complex planning tasks across multiple agents</li>
<li>Creating personalized outputs based on user preferences</li>
<li>Building practical applications with real-world utility</li>
</ul>
</div>
</div>
</div>
</section>
<div class="section-divider"></div>
<!-- Business Use Cases Section -->
<section id="business" class="mb-12">
<h2 class="text-3xl font-bold mb-6">Business Use Cases</h2>
<p class="text-gray-600 mb-8">
Discover how businesses across various industries are leveraging CAMEL-AI to solve real-world challenges, automate processes, and create value.
</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
<!-- Use Case 1 -->
<div class="bg-white rounded-xl shadow-sm p-6 h-full">
<div class="flex items-start mb-4">
<div class="w-12 h-12 rounded-full bg-primary bg-opacity-10 flex items-center justify-center mr-4">
<i class="fas fa-cogs text-primary"></i>
</div>
<div>
<h3 class="text-xl font-bold">Workflow Automation</h3>
<p class="text-sm text-gray-500">Marketing & Content Production</p>
</div>
</div>
<p class="mb-4 text-sm">
Marketing teams use CAMEL-AI to automate complex content production workflows, from data collection and analysis to report generation.
</p>
<div class="mb-4">
<h4 class="font-semibold mb-2 text-sm">Key Components:</h4>
<ul class="list-disc pl-5 text-sm">
<li>Data collection agent with search tools</li>
<li>Analysis agent for trend identification</li>
<li>Content creation agent for report generation</li>
<li>Coordination through Workforce module</li>
</ul>
</div>
<div class="bg-gray-50 p-3 rounded-lg text-sm">
<h4 class="font-semibold mb-2">Business Impact:</h4>
<ul class="space-y-1 text-sm">
<li><span class="text-primary font-medium">⬆️ 70%</span> reduction in report creation time</li>
<li><span class="text-primary font-medium">⬆️ 50%</span> increase in content output</li>
<li><span class="text-primary font-medium">⬆️ 30%</span> improvement in data accuracy</li>
</ul>
</div>
</div>
<!-- Use Case 2 -->
<div class="bg-white rounded-xl shadow-sm p-6 h-full">
<div class="flex items-start mb-4">
<div class="w-12 h-12 rounded-full bg-primary bg-opacity-10 flex items-center justify-center mr-4">
<i class="fas fa-headset text-primary"></i>
</div>
<div>
<h3 class="text-xl font-bold">Customer Support Automation</h3>
<p class="text-sm text-gray-500">E-commerce & Service Industries</p>
</div>
</div>
<p class="mb-4 text-sm">
E-commerce companies implement multi-agent support systems to handle customer inquiries, provide product information, and resolve issues.
</p>
<div class="mb-4">
<h4 class="font-semibold mb-2 text-sm">Key Components:</h4>
<ul class="list-disc pl-5 text-sm">
<li>Initial greeting and classification agent</li>
<li>Product information agent with database access</li>
<li>Technical support agent for troubleshooting</li>
<li>Escalation agent for complex issues</li>
</ul>
</div>
<div class="bg-gray-50 p-3 rounded-lg text-sm">
<h4 class="font-semibold mb-2">Business Impact:</h4>
<ul class="space-y-1 text-sm">
<li><span class="text-primary font-medium">⬆️ 85%</span> of queries handled without human intervention</li>
<li><span class="text-primary font-medium">⬆️ 60%</span> reduction in response time</li>
<li><span class="text-primary font-medium">⬆️ 40%</span> increase in customer satisfaction</li>
</ul>
</div>
</div>
<!-- Use Case 3 -->
<div class="bg-white rounded-xl shadow-sm p-6 h-full">
<div class="flex items-start mb-4">
<div class="w-12 h-12 rounded-full bg-primary bg-opacity-10 flex items-center justify-center mr-4">
<i class="fas fa-database text-primary"></i>
</div>
<div>
<h3 class="text-xl font-bold">Synthetic Data Generation</h3>
<p class="text-sm text-gray-500">Finance & Healthcare</p>
</div>
</div>
<p class="mb-4 text-sm">
Financial institutions and healthcare organizations use CAMEL-AI to generate synthetic data for model training while preserving privacy and security.
</p>
<div class="mb-4">
<h4 class="font-semibold mb-2 text-sm">Key Components:</h4>
<ul class="list-disc pl-5 text-sm">
<li>Pattern identification agent for real data analysis</li>
<li>Scenario generation agent for context creation</li>
<li>Data generation agent for synthetic record creation</li>
<li>Validation agent for quality assurance</li>
</ul>
</div>
<div class="bg-gray-50 p-3 rounded-lg text-sm">
<h4 class="font-semibold mb-2">Business Impact:</h4>
<ul class="space-y-1 text-sm">
<li><span class="text-primary font-medium">⬆️ 90%</span> reduction in data privacy concerns</li>
<li><span class="text-primary font-medium">⬆️ 75%</span> faster dataset creation</li>
<li><span class="text-primary font-medium">⬆️ 25%</span> improvement in model performance</li>
</ul>
</div>
</div>
<!-- Use Case 4 -->
<div class="bg-white rounded-xl shadow-sm p-6 h-full">
<div class="flex items-start mb-4">
<div class="w-12 h-12 rounded-full bg-primary bg-opacity-10 flex items-center justify-center mr-4">
<i class="fas fa-plane-departure text-primary"></i>
</div>
<div>
<h3 class="text-xl font-bold">Dynamic Travel Planning</h3>
<p class="text-sm text-gray-500">Travel & Hospitality</p>
</div>
</div>
<p class="mb-4 text-sm">
Travel agencies leverage CAMEL-AI to create personalized travel experiences with multi-agent systems that handle all aspects of trip planning.
</p>
<div class="mb-4">
<h4 class="font-semibold mb-2 text-sm">Key Components:</h4>
<ul class="list-disc pl-5 text-sm">
<li>Destination research agent with search capabilities</li>
<li>Logistics agent with mapping and transportation tools</li>
<li>Preference matching agent for personalization</li>
<li>Itinerary creation agent for final output</li>
</ul>
</div>
<div class="bg-gray-50 p-3 rounded-lg text-sm">
<h4 class="font-semibold mb-2">Business Impact:</h4>
<ul class="space-y-1 text-sm">
<li><span class="text-primary font-medium">⬆️ 80%</span> reduction in itinerary planning time</li>
<li><span class="text-primary font-medium">⬆️ 65%</span> increase in customer satisfaction</li>
<li><span class="text-primary font-medium">⬆️ 45%</span> more personalized travel experiences</li>
</ul>
</div>
</div>
</div>
<!-- Implementation Timeline -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Business Implementation Timeline</h3>
<p class="mb-6 text-sm">
A practical roadmap for businesses looking to implement CAMEL-AI in their operations, from initial exploration to full deployment.
</p>
<div class="relative">
<!-- Timeline line -->
<div class="absolute h-full w-0.5 bg-gray-200 left-6 top-0"></div>
<!-- Phase 1 -->
<div class="relative flex items-start mb-8">
<div class="absolute w-12 h-12 rounded-full bg-primary flex items-center justify-center text-white font-bold">1</div>
<div class="ml-20">
<h4 class="font-bold mb-2">Exploration & Assessment (1-2 Weeks)</h4>
<ul class="list-disc pl-5 text-sm space-y-1 text-gray-600">
<li>Identify potential use cases within your organization</li>
<li>Assess technical requirements and resource availability</li>
<li>Set clear objectives and success metrics</li>
<li>Create a small cross-functional implementation team</li>
</ul>
</div>
</div>
<!-- Phase 2 -->
<div class="relative flex items-start mb-8">
<div class="absolute w-12 h-12 rounded-full bg-primary flex items-center justify-center text-white font-bold">2</div>
<div class="ml-20">
<h4 class="font-bold mb-2">Proof of Concept (2-4 Weeks)</h4>
<ul class="list-disc pl-5 text-sm space-y-1 text-gray-600">
<li>Implement a small-scale CAMEL-AI project in a controlled environment</li>
<li>Test basic agent functionality with simplified tasks</li>
<li>Gather feedback from stakeholders</li>
<li>Refine approach based on initial results</li>
</ul>
</div>
</div>
<!-- Phase 3 -->
<div class="relative flex items-start mb-8">
<div class="absolute w-12 h-12 rounded-full bg-primary flex items-center justify-center text-white font-bold">3</div>
<div class="ml-20">
<h4 class="font-bold mb-2">Development & Integration (1-2 Months)</h4>
<ul class="list-disc pl-5 text-sm space-y-1 text-gray-600">
<li>Develop full-featured multi-agent system</li>
<li>Integrate with existing systems and data sources</li>
<li>Implement security and compliance measures</li>
<li>Conduct thorough testing and optimization</li>
</ul>
</div>
</div>
<!-- Phase 4 -->
<div class="relative flex items-start mb-8">
<div class="absolute w-12 h-12 rounded-full bg-primary flex items-center justify-center text-white font-bold">4</div>
<div class="ml-20">
<h4 class="font-bold mb-2">Pilot Deployment (1 Month)</h4>
<ul class="list-disc pl-5 text-sm space-y-1 text-gray-600">
<li>Deploy to a limited user group</li>
<li>Monitor performance and collect feedback</li>
<li>Refine agent behavior and system performance</li>
<li>Address any issues or limitations</li>
</ul>
</div>
</div>
<!-- Phase 5 -->
<div class="relative flex items-start">
<div class="absolute w-12 h-12 rounded-full bg-primary flex items-center justify-center text-white font-bold">5</div>
<div class="ml-20">
<h4 class="font-bold mb-2">Full Implementation & Scaling (Ongoing)</h4>
<ul class="list-disc pl-5 text-sm space-y-1 text-gray-600">
<li>Roll out to entire organization or customer base</li>
<li>Provide training and documentation</li>
<li>Continuously monitor and improve the system</li>
<li>Expand to additional use cases across the organization</li>
</ul>
</div>
</div>
</div>
</div>
<!-- ROI Considerations -->
<div class="bg-white rounded-xl shadow-sm p-6">
<h3 class="text-xl font-bold mb-4">ROI Considerations for CAMEL-AI Implementation</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<!-- Benefits -->
<div>
<h4 class="font-semibold mb-3">Potential Benefits</h4>
<ul class="space-y-2 text-sm">
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<div>
<span class="font-medium">Automation of complex workflows</span>
<p class="text-gray-600">Reduce manual effort and increase throughput for knowledge-intensive tasks</p>
</div>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<div>
<span class="font-medium">24/7 operation capability</span>
<p class="text-gray-600">Provide continuous service without staffing constraints</p>
</div>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<div>
<span class="font-medium">Scalability without proportional cost increase</span>
<p class="text-gray-600">Handle growing workloads without linear staffing increases</p>
</div>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<div>
<span class="font-medium">Higher consistency in outputs</span>
<p class="text-gray-600">Standardized processes result in more consistent quality</p>
</div>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<div>
<span class="font-medium">Valuable synthetic data generation</span>
<p class="text-gray-600">Create training data without privacy concerns</p>
</div>
</li>
</ul>
</div>
<!-- Costs -->
<div>
<h4 class="font-semibold mb-3">Cost Considerations</h4>
<ul class="space-y-2 text-sm">
<li class="flex items-start">
<i class="fas fa-exclamation-circle text-amber-500 mt-1 mr-2"></i>
<div>
<span class="font-medium">API and computing costs</span>
<p class="text-gray-600">Budget for ongoing LLM API usage and compute resources</p>
</div>
</li>
<li class="flex items-start">
<i class="fas fa-exclamation-circle text-amber-500 mt-1 mr-2"></i>
<div>
<span class="font-medium">Development and integration effort</span>
<p class="text-gray-600">Initial investment in building and deploying systems</p>
</div>
</li>
<li class="flex items-start">
<i class="fas fa-exclamation-circle text-amber-500 mt-1 mr-2"></i>
<div>
<span class="font-medium">Monitoring and maintenance</span>
<p class="text-gray-600">Ongoing resources for system oversight and updates</p>
</div>
</li>
<li class="flex items-start">
<i class="fas fa-exclamation-circle text-amber-500 mt-1 mr-2"></i>
<div>
<span class="font-medium">Training and change management</span>
<p class="text-gray-600">Costs associated with organizational adoption</p>
</div>
</li>
<li class="flex items-start">
<i class="fas fa-exclamation-circle text-amber-500 mt-1 mr-2"></i>
<div>
<span class="font-medium">Potential refinement iterations</span>
<p class="text-gray-600">Budget for ongoing improvements and adjustments</p>
</div>
</li>
</ul>
</div>
</div>
<div class="bg-gray-50 p-4 rounded-lg">
<h4 class="font-semibold mb-3">ROI Calculation Framework</h4>
<p class="text-sm mb-3">
A simplified approach to calculating return on investment for CAMEL-AI implementations:
</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 text-sm">
<div>
<h5 class="font-medium mb-2">Quantifiable Benefits</h5>
<ul class="list-disc pl-5 space-y-1 text-gray-600">
<li>Labor cost savings from automation</li>
<li>Increased throughput and capacity</li>
<li>Error reduction and quality improvements</li>
<li>Customer satisfaction impact on retention</li>
<li>Revenue increase from improved processes</li>
</ul>
</div>
<div>
<h5 class="font-medium mb-2">Implementation Costs</h5>
<ul class="list-disc pl-5 space-y-1 text-gray-600">
<li>Initial development and setup</li>
<li>Integration with existing systems</li>
<li>Ongoing API and infrastructure costs</li>
<li>Maintenance and monitoring resources</li>
<li>Training and organizational change costs</li>
</ul>
</div>
</div>
<div class="mt-4 bg-white p-3 rounded border border-gray-200">
<p class="font-medium text-center">ROI = (Total Benefits - Total Costs) / Total Costs × 100%</p>
</div>
</div>
</div>
</section>
<div class="section-divider"></div>
<!-- Comprehensive Cheatsheet Section -->
<section id="cheatsheet" class="mb-12">
<h2 class="text-3xl font-bold mb-6">Comprehensive Cheatsheet</h2>
<p class="text-gray-600 mb-8">
This comprehensive cheatsheet provides quick reference code snippets for implementing CAMEL-AI features, from basic setup to advanced applications.
</p>
<!-- Installation and Setup -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Installation and Setup</h3>
<div class="code-block text-sm mb-4">
<pre><code># Basic installation
pip install camel-ai
# Full installation with all dependencies
pip install 'camel-ai[all]'
# Setting up API keys
import os
# For OpenAI models
os.environ["OPENAI_API_KEY"] = "your-api-key-here"
# Using .env file
from dotenv import load_dotenv
load_dotenv() # Loads variables from .env file</code></pre>
</div>
</div>
<!-- Creating Agents -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Creating Agents</h3>
<div class="code-block text-sm mb-4">
<pre><code># Simple agent creation
from camel.agents import ChatAgent
from camel.models import ModelFactory
agent = ChatAgent(
system_message="You are a helpful assistant.",
model=ModelFactory.create()
)
# Agent with specific role using BaseMessage
from camel.messages import BaseMessage
role_agent = ChatAgent(
BaseMessage.make_assistant_message(
role_name="Marketing Specialist",
content="You are an expert in digital marketing strategies."
),
model=ModelFactory.create()
)
# Agent with custom model
from camel.types import ModelPlatformType, ModelType
custom_model_agent = ChatAgent(
system_message="You are a technical writer specializing in documentation.",
model=ModelFactory.create(
model_platform=ModelPlatformType.OPENAI,
model_type=ModelType.GPT_4O_MINI,
)
)
# Interacting with an agent
response = agent.step("Tell me about machine learning.")
print(response.msgs[0].content) # Access the response content</code></pre>
</div>
</div>
<!-- Working with Tools -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Working with Tools</h3>
<div class="code-block text-sm mb-4">
<pre><code># Adding tools to an agent
from camel.toolkits import MathToolkit, SearchToolkit, GoogleMapsToolkit
# Agent with math tools
math_agent = ChatAgent(
system_message="You are a math assistant.",
model=ModelFactory.create(),
tools=MathToolkit().get_tools()
)
# Agent with search capabilities
search_agent = ChatAgent(
system_message="You are a research assistant.",
model=ModelFactory.create(),
tools=SearchToolkit().get_tools()
)
# Agent with multiple tool types
multi_tool_agent = ChatAgent(
system_message="You are an assistant with multiple capabilities.",
model=ModelFactory.create(),
tools=[
*MathToolkit().get_tools(),
*SearchToolkit().get_tools(),
*GoogleMapsToolkit().get_tools()
]
)
# Checking tool calls in response
response = search_agent.step("Who won the Nobel Prize in Physics in 2023?")
print(response.info['tool_calls']) # See which tools were called</code></pre>
</div>
</div>
<!-- Memory Management -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Memory Management</h3>
<div class="code-block text-sm mb-4">
<pre><code># Creating an agent with custom memory window
memory_agent = ChatAgent(
system_message="You are an assistant with enhanced memory.",
model=ModelFactory.create(),
message_window_size=20 # Remember more context
)
# Accessing agent memory
context = memory_agent.memory.get_context()
print(context) # Shows current memory contents
# Adding a message to memory
from camel.messages import BaseMessage
new_message = BaseMessage.make_user_message(
content="Remember this important fact for later reference."
)
memory_agent.record_message(new_message)
# Clearing agent memory
memory_agent.memory.clear()
# Setting up external memory (conceptual example)
from camel.memory import VectorDBMemory
external_memory = VectorDBMemory(
connection_string="your-vector-db-connection",
embedding_model="text-embedding-ada-002"
)
agent_with_external_memory = ChatAgent(
system_message="You have access to long-term memory.",
model=ModelFactory.create(),
memory=external_memory
)</code></pre>
</div>
</div>
<!-- Multi-Agent Systems -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Multi-Agent Systems</h3>
<div class="code-block text-sm mb-4">
<pre><code># Setting up a multi-agent workforce
from camel.societies.workforce import Workforce
from camel.tasks.task import Task
# Create individual agents
agent1 = ChatAgent(
system_message="You are a research specialist.",
model=ModelFactory.create(),
tools=SearchToolkit().get_tools()
)
agent2 = ChatAgent(
system_message="You analyze information and extract insights.",
model=ModelFactory.create()
)
agent3 = ChatAgent(
system_message="You create well-structured reports.",
model=ModelFactory.create()
)
# Create the workforce
team = Workforce('Research Team')
team.add_single_agent_worker("Researcher", worker=agent1)
team.add_single_agent_worker("Analyst", worker=agent2)
team.add_single_agent_worker("Writer", worker=agent3)
# Define and process a task
research_task = Task(
content="Create a comprehensive report on quantum computing advancements in 2024.",
id='research_001',
)
result = team.process_task(research_task)
print(result.result) # Final output from all agents</code></pre>
</div>
</div>
<!-- Retrieval-Augmented Generation (RAG) -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Retrieval-Augmented Generation (RAG)</h3>
<div class="code-block text-sm mb-4">
<pre><code># Setting up RAG with CAMEL-AI (conceptual example)
from camel.agents import ChatAgent
from camel.retrievers import VectorDBRetriever
from camel.models import ModelFactory
# Set up a retriever with vector database
retriever = VectorDBRetriever(
database_url="your-vector-db-connection",
embedding_model="text-embedding-ada-002",
similarity_top_k=3 # Number of documents to retrieve
)
# Create a RAG agent
rag_agent = ChatAgent(
system_message="You are a knowledge assistant that uses a database to answer questions accurately.",
model=ModelFactory.create(),
retriever=retriever,
)
# Query the agent (will automatically retrieve relevant information)
response = rag_agent.step("What are the key benefits of quantum computing for cryptography?")
print(response.msgs[0].content)</code></pre>
</div>
</div>
<!-- Synthetic Data Generation -->
<div class="bg-white rounded-xl shadow-sm p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Synthetic Data Generation</h3>
<div class="code-block text-sm mb-4">
<pre><code># Generating synthetic conversation data
from camel.agents import ChatAgent
from camel.messages import BaseMessage
from camel.models import ModelFactory
# Create role-playing agents
customer_agent = ChatAgent(
BaseMessage.make_assistant_message(
role_name="Customer",
content="You are a customer contacting support about a recent purchase."
),
model=ModelFactory.create(),
)
support_agent = ChatAgent(
BaseMessage.make_assistant_message(
role_name="Support Agent",
content="You are a helpful customer support representative."
),
model=ModelFactory.create(),
)
# Generate conversation
conversations = []
initial_query = "I recently purchased your product but it's not working as expected."
# Conversation loop
customer_msg = BaseMessage.make_user_message(content=initial_query)
for i in range(5): # 5 turns of conversation
support_response = support_agent.step(customer_msg.content)
conversations.append({"role": "customer", "message": customer_msg.content})
conversations.append({"role": "support", "message": support_response.msgs[0].content})
if i < 4: # Skip last customer turn
customer_msg = customer_agent.step(support_response.msgs[0].content)
# Save synthetic data
import json
with open("synthetic_conversations.json", "w") as f:
json.dump(conversations, f, indent=2)</code></pre>
</div>
</div>
<!-- Advanced Configurations -->
<div class="bg-white rounded-xl shadow-sm p-6">
<h3 class="text-xl font-bold mb-4">Advanced Configurations</h3>
<div class="code-block text-sm mb-4">
<pre><code># Setting agent output language
agent = ChatAgent(
system_message="You are a helpful assistant.",
model=ModelFactory.create(),
)
agent.set_output_language('french') # Responses will be in French
# Setting token limit
limited_agent = ChatAgent(
system_message="You provide concise information.",
model=ModelFactory.create(),
token_limit=1000 # Limit response length
)
# Using custom response terminators
terminator_agent = ChatAgent(
system_message="You help with code examples.",
model=ModelFactory.create(),
response_terminators=["END", "STOP"] # Custom signals to end responses
)
# Resetting an agent to initial state
agent.reset()
# Using a specific model configuration
from camel.configs import ChatGPTConfig
custom_config_agent = ChatAgent(
system_message="You provide detailed explanations.",
model=ModelFactory.create(
model_platform=ModelPlatformType.OPENAI,
model_type=ModelType.GPT_4O_MINI,
model_config_dict=ChatGPTConfig(
temperature=0.7,
top_p=0.9
).as_dict()
)
)</code></pre>
</div>
</div>
</section>
<!-- Conclusion -->
<section class="mb-12">
<div class="bg-primary text-white rounded-xl shadow-sm p-8">
<h2 class="text-3xl font-bold mb-4">Ready to Build with CAMEL-AI?</h2>
<p class="mb-6">
You now have a comprehensive understanding of CAMEL-AI and its capabilities. The next step is to start building your own multi-agent systems for your specific use cases.
</p>
<div class="flex flex-wrap gap-4">
<a href="https://github.com/camel-ai/camel" target="_blank" class="bg-white text-primary px-6 py-2 rounded-full font-medium hover:bg-gray-100 transition inline-flex items-center">
<i class="fab fa-github mr-2"></i> GitHub Repository
</a>
<a href="https://docs.camel-ai.org/" target="_blank" class="bg-transparent border-2 border-white px-6 py-2 rounded-full font-medium hover:bg-white hover:text-primary transition inline-flex items-center">
<i class="fas fa-book mr-2"></i> Official Documentation
</a>
<a href="https://discord.camel-ai.org/" target="_blank" class="bg-transparent border-2 border-white px-6 py-2 rounded-full font-medium hover:bg-white hover:text-primary transition inline-flex items-center">
<i class="fab fa-discord mr-2"></i> Join Community
</a>
</div>
</div>
</section>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-gray-900 text-white py-12">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row justify-between mb-8">
<div class="mb-6 md:mb-0">
<div class="flex items-center space-x-2 mb-4">
<div class="w-10 h-10 rounded-full bg-gradient flex items-center justify-center">
<span class="text-white font-bold">C</span>
</div>
<span class="font-bold text-xl">CAMEL-AI</span>
</div>
<p class="text-gray-400 max-w-md text-sm">
CAMEL-AI is an open-source community dedicated to finding the scaling laws of agents for data generation, world simulation, and task automation.
</p>
</div>
<div class="grid grid-cols-2 md:grid-cols-3 gap-8">
<div>
<h4 class="font-semibold mb-4">Resources</h4>
<ul class="space-y-2 text-sm text-gray-400">
<li><a href="https://docs.camel-ai.org/" class="hover:text-white transition">Documentation</a></li>
<li><a href="https://github.com/camel-ai/camel/tree/master/examples" class="hover:text-white transition">Examples</a></li>
<li><a href="https://huggingface.co/camel-ai" class="hover:text-white transition">Hugging Face</a></li>
</ul>
</div>
<div>
<h4 class="font-semibold mb-4">Community</h4>
<ul class="space-y-2 text-sm text-gray-400">
<li><a href="https://github.com/camel-ai/camel" class="hover:text-white transition">GitHub</a></li>
<li><a href="https://discord.camel-ai.org/" class="hover:text-white transition">Discord</a></li>
<li><a href="https://twitter.com/CamelAIOrg" class="hover:text-white transition">Twitter</a></li>
</ul>
</div>
<div>
<h4 class="font-semibold mb-4">Learn More</h4>
<ul class="space-y-2 text-sm text-gray-400">
<li><a href="https://arxiv.org/abs/2303.17760" class="hover:text-white transition">Research Paper</a></li>
<li><a href="https://www.camel-ai.org/" class="hover:text-white transition">CAMEL-AI.org</a></li>
<li><a href="https://www.camel-ai.org/community" class="hover:text-white transition">Join Us</a></li>
</ul>
</div>
</div>
</div>
<div class="border-t border-gray-800 pt-8 flex flex-col md:flex-row justify-between items-center">
<p class="text-sm text-gray-500 mb-4 md:mb-0">
© 2025 CAMEL-AI Learning Platform. All rights reserved.
</p>
<div class="flex space-x-4">
<a href="https://github.com/camel-ai" class="text-gray-400 hover:text-white transition">
<i class="fab fa-github text-xl"></i>
</a>
<a href="https://discord.camel-ai.org/" class="text-gray-400 hover:text-white transition">
<i class="fab fa-discord text-xl"></i>
</a>
<a href="https://twitter.com/CamelAIOrg" class="text-gray-400 hover:text-white transition">
<i class="fab fa-twitter text-xl"></i>
</a>
</div>
</div>
</div>
</footer>
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/prism.min.js"></script>
<script>
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Highlight active TOC link based on scroll position
window.addEventListener('scroll', function() {
const sections = document.querySelectorAll('section[id]');
const scrollY = window.pageYOffset;
sections.forEach(current => {
const sectionHeight = current.offsetHeight;
const sectionTop = current.offsetTop - 100;
const sectionId = current.getAttribute('id');
if (scrollY > sectionTop && scrollY <= sectionTop + sectionHeight) {
document.querySelectorAll('.toc-link').forEach(link => {
link.classList.remove('active');
if (link.getAttribute('href') === '#' + sectionId) {
link.classList.add('active');
}
});
}
});
});
</script>
</body>
</html>
|