agently 4.0.7.1__py3-none-any.whl → 4.0.7.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. agently/_default_init.py +4 -0
  2. agently/_default_settings.yaml +1 -0
  3. agently/base.py +2 -0
  4. agently/builtins/agent_extensions/ChatSessionExtension.py +2 -2
  5. agently/builtins/agent_extensions/SessionExtension.py +294 -0
  6. agently/builtins/agent_extensions/__init__.py +1 -0
  7. agently/builtins/plugins/PromptGenerator/AgentlyPromptGenerator.py +36 -12
  8. agently/builtins/plugins/Session/AgentlyMemoSession.py +652 -0
  9. agently/builtins/tools/Browse.py +11 -3
  10. agently/builtins/tools/Cmd.py +112 -0
  11. agently/builtins/tools/Search.py +27 -1
  12. agently/builtins/tools/__init__.py +1 -0
  13. agently/core/Agent.py +7 -7
  14. agently/core/ModelRequest.py +0 -4
  15. agently/core/Prompt.py +1 -1
  16. agently/core/Session.py +85 -0
  17. agently/integrations/chromadb.py +4 -4
  18. agently/types/data/__init__.py +2 -0
  19. agently/types/data/prompt.py +6 -1
  20. agently/types/data/tool.py +9 -0
  21. agently/types/plugins/BuiltInTool.py +22 -0
  22. agently/types/plugins/Session.py +159 -0
  23. agently/types/plugins/__init__.py +21 -0
  24. agently/types/plugins/base.py +1 -1
  25. agently/utils/AGENT_UTILS_GUIDE.md +175 -0
  26. agently/utils/DataFormatter.py +6 -2
  27. agently/utils/FunctionShifter.py +3 -2
  28. agently/utils/TimeInfo.py +22 -0
  29. agently/utils/__init__.py +1 -0
  30. agently-4.0.7.2.dist-info/METADATA +433 -0
  31. {agently-4.0.7.1.dist-info → agently-4.0.7.2.dist-info}/RECORD +33 -25
  32. {agently-4.0.7.1.dist-info → agently-4.0.7.2.dist-info}/WHEEL +1 -1
  33. agently-4.0.7.1.dist-info/METADATA +0 -194
  34. {agently-4.0.7.1.dist-info → agently-4.0.7.2.dist-info}/licenses/LICENSE +0 -0
@@ -1,30 +1,34 @@
1
1
  agently/__init__.py,sha256=Gf0LL7Czqeuf6hfvHfEGlACLg0d0osQupyMATB0EBlc,884
2
- agently/_default_init.py,sha256=AhYwzZYOxqDeIoVb8cvPjJ2BjE5V7wxeuH7R-MNZWyg,2057
3
- agently/_default_settings.yaml,sha256=iyi82glfRk0-7d_n7FvuDjNDxBKGDbeaRA-GfHOW6tE,1387
4
- agently/base.py,sha256=hc5ayuEQiL8Uus9NVrKFTIjyc73SwRKkdwfLFlNsmKo,5543
2
+ agently/_default_init.py,sha256=3Xjm0qPXgRW9rd7Rz_lo0VxPuI8_qTR7QTizPH8I_4M,2205
3
+ agently/_default_settings.yaml,sha256=D0zVVkC67LfJzK1xGOED_KdOG1iA_4L_4EnYG9919_0,1413
4
+ agently/base.py,sha256=8ZTzwuC9z1tQwh_0a2AMjwIHFg6qyPYPmNdqhXhODdg,5587
5
5
  agently/builtins/agent_extensions/AutoFuncExtension.py,sha256=TmwMazwPzb5WXfDqfedY5yZOOMTFIHqaB9Bte29adUc,2433
6
- agently/builtins/agent_extensions/ChatSessionExtension.py,sha256=Y6mvnsfAY0rykKtfp-tApwJy5O4SS-YEt2-jaWr83uc,12034
6
+ agently/builtins/agent_extensions/ChatSessionExtension.py,sha256=Bbrc9cn3m-uOY0i8EGq1Cvp71nNpEORrrXTiy_JuCCQ,12048
7
7
  agently/builtins/agent_extensions/ConfigurePromptExtension.py,sha256=9wy2zHIDVHbUlj5sI0A03SscUWSzZNc9hNJSEdXFXd0,11390
8
8
  agently/builtins/agent_extensions/KeyWaiterExtension.py,sha256=Rf8dB8Yt3_9IJifpiE-Rn6lLIXqZjaNp94lnX6Betgw,5555
9
+ agently/builtins/agent_extensions/SessionExtension.py,sha256=P4T_13IB_K8zFi_OAEs_pfeyhoBgJ9yuRGeey0hT2Os,11873
9
10
  agently/builtins/agent_extensions/ToolExtension.py,sha256=S3jjumHiauEQ-m46Zkh-1I9ih02kKoj8sBEU82woz1E,6886
10
- agently/builtins/agent_extensions/__init__.py,sha256=IxWRQogF8PCVNXeY7D4qhGukEx3JFvfLlUW2x0FbyfA,852
11
+ agently/builtins/agent_extensions/__init__.py,sha256=rWD8hzJ0ymxxpjxJCdB0x1L5AnhYQnAJUeIAD_MTQ5I,899
11
12
  agently/builtins/hookers/ConsoleHooker.py,sha256=aJdDj_nG8CiwyelA505zvtpzBSwD52nFIkBRDJGgq3Y,8099
12
13
  agently/builtins/hookers/PureLoggerHooker.py,sha256=fzN0OfhQzgns4KeCNH-qcdm-BdQT0W2kqEmt3Zp2pYI,1906
13
14
  agently/builtins/hookers/SystemMessageHooker.py,sha256=1nh1FY70PYyZOAQGfQiGnwIvo4ZF3NSAjeghI3sInn4,7207
14
15
  agently/builtins/plugins/ModelRequester/OpenAICompatible.py,sha256=CFTMZHENOi6qsrUfWtgq19P6Ec7H-8vRybVVr4RZfJQ,26773
15
- agently/builtins/plugins/PromptGenerator/AgentlyPromptGenerator.py,sha256=9iJYOhVh060vpRJrxFF0BkMP3lAmDjgsl_AWM-dRRtE,31583
16
+ agently/builtins/plugins/PromptGenerator/AgentlyPromptGenerator.py,sha256=8zV-c22Wc2s-590u3o2xgL8EVpP-pvUHh6qVIma2gQw,32840
16
17
  agently/builtins/plugins/ResponseParser/AgentlyResponseParser.py,sha256=5iF6NLoMjTtEC3hc-DmatFmSWZK2nKkoiyqHK7Q3Yj4,17847
18
+ agently/builtins/plugins/Session/AgentlyMemoSession.py,sha256=2aDTd1unnoOH6urZdcDCjFCirrWaE1ECp-Atoo7yQ6I,25514
17
19
  agently/builtins/plugins/ToolManager/AgentlyToolManager.py,sha256=oaqte5LAryZQMD6vuEbKhe6kOLUyZTRZswC1MDFiYxw,9138
18
20
  agently/builtins/plugins/__init__.py,sha256=wj4_U9TTekc2CmjppbXKUREDFRXFX1y0ySOW-CxQuok,801
19
- agently/builtins/tools/Browse.py,sha256=gIePs-gtsqOI_ZTReGqEcoKvhs4FkBzTxow--QS5_ek,3469
20
- agently/builtins/tools/Search.py,sha256=GtlHppD5RelxMSFDchFD3jdVhaDndh6lZ3Lu9YH0OzM,7393
21
- agently/builtins/tools/__init__.py,sha256=pFOWgH2C3xRvgQo3UVdkj4yHjF9nNtmoVHmOZfoGsyU,647
22
- agently/core/Agent.py,sha256=LWkzWG_XXrC4oVkWg4ebnAqAJ81O9UEo1n-qJj7IIrc,10251
21
+ agently/builtins/tools/Browse.py,sha256=HA6XQPiyqMs2ZpvF2Qbex8BDij0GloNzXTbRMtgqbqw,3782
22
+ agently/builtins/tools/Cmd.py,sha256=TkI3r4WdVVcDSkJJnadaPDf7fyQZux3y7vxbAawhPbY,3759
23
+ agently/builtins/tools/Search.py,sha256=JQq3QVkmPOiiWufT6xQNScnjoMB7OhqAy4BP1Fufkbw,8350
24
+ agently/builtins/tools/__init__.py,sha256=YVjJOOGLacn6dhybOlszp2aK2PPc3SRH5L8M8p7t-no,668
25
+ agently/core/Agent.py,sha256=as4AISWRxSNQ4McyK6rZFDz-PkR_eRE0o6ZF3hehjhA,10279
23
26
  agently/core/EventCenter.py,sha256=sknU5w9MpGDQgMOF9c5k4PfM4SNT5X_LrpYte2HaFNM,10861
24
27
  agently/core/ExtensionHandlers.py,sha256=88iSAW50bgMshB56cTgKg30eOjZQyXiJY1en4w7afWY,2076
25
- agently/core/ModelRequest.py,sha256=tPuFl_v_P85Mhj669cA5Hi9zAfMNzB5jib8APIXh13s,24630
28
+ agently/core/ModelRequest.py,sha256=hroVb-U-knygXMZ1CCy84pJlP1GHSBNZPI809jEgQak,24350
26
29
  agently/core/PluginManager.py,sha256=fwRxvqPMgXYIrclhRHtkaPsyvn6SaeBFqvL7tTzYwck,4410
27
- agently/core/Prompt.py,sha256=uvGGvbND08b0OhkD-UXY0J65yLedllBt4lMqk4NYl1U,6893
30
+ agently/core/Prompt.py,sha256=vCi_64A-ITiJ-6ZL2PduRdTXoHp8xpKJa2z0ejCJ4uQ,6899
31
+ agently/core/Session.py,sha256=tWRyjX4cKR_cyK5LaiEqaqkSeyemjzceoaM033mMWMM,3163
28
32
  agently/core/Tool.py,sha256=PNYf_BwVefr8IOqf5asLaVq2fU7hQaFJwJVj3S4fq84,1871
29
33
  agently/core/TriggerFlow/BluePrint.py,sha256=H_TYymWOci-ZvQzqyRxpkHjO77zlzXLukLUUctX4ftM,4887
30
34
  agently/core/TriggerFlow/Chunk.py,sha256=xPWr_ofpl-iG4jHIJfB5mPanmn70pq7x8GCcz3G8NPc,1583
@@ -37,28 +41,31 @@ agently/core/TriggerFlow/process/ForEachProcess.py,sha256=DD4frz9mTsKgnPXnHJD53h
37
41
  agently/core/TriggerFlow/process/MatchCaseProcess.py,sha256=MKY5Yh66JiMABhCzamRl8UZOBjbD75TFp84Jw6o_t68,7900
38
42
  agently/core/TriggerFlow/process/__init__.py,sha256=BP5bAr9LRVVD83KFqXeprgTmXA1iCSOSsD509BtoX_E,753
39
43
  agently/core/__init__.py,sha256=CPglSpW5oEEmWpCpdvv9wK4myXmVipjuZm5HtMq6Vxo,1214
40
- agently/integrations/chromadb.py,sha256=iULT9sK2MIZe5pyqMdL9M1yBkWqQhShwEyLmGnKUuew,10390
44
+ agently/integrations/chromadb.py,sha256=oGc-eZRK4pXo5QPbjpC1_RoRzhv2Hqadp80TPEEvw8c,10374
41
45
  agently/types/__init__.py,sha256=xb8GMY-ULncO_PY9rfRUsyi12wAQQJx8gAAnoM30uZA,592
42
- agently/types/data/__init__.py,sha256=qladqSEqcAUW_XzdTDl4cvaraq_DpANy3aZbIPxoygk,1627
46
+ agently/types/data/__init__.py,sha256=ulo2p9SBV-v75zPZWcTczDnAcYO_IlDe3JMGNOZa4vM,1662
43
47
  agently/types/data/event.py,sha256=LFQW7MN_QGOis3XV-8K6jNXWsLvT7tYxo4BZbUBCpfI,1790
44
- agently/types/data/prompt.py,sha256=DiszVM_3OHe66waf-99mBH7bzRr0cpbCHSpDI-2EjPs,5163
48
+ agently/types/data/prompt.py,sha256=QAY7LJcFJKttD79cfp91dEbgstqZNwwer6_8UoTmF4s,5398
45
49
  agently/types/data/request.py,sha256=Do-9g5QxZRMYjaoHCZYwHbj28r-t4noAAtOebw764P4,1924
46
50
  agently/types/data/response.py,sha256=QYrrZXh_fXsHRltKtd6FKIfmJlgV-stsg6B0AIXueto,3774
47
51
  agently/types/data/serializable.py,sha256=v2KlyKNOKp4L6J_Ueupb-gCyrnngvBskFUwNPSJQgnA,844
48
- agently/types/data/tool.py,sha256=wE8Dda2JtY5cojpHUuQrw7PNeVZ6Zma968bn-pUmS7I,1529
52
+ agently/types/data/tool.py,sha256=KJ1-w3qp_x7uN_wJkIrJWMe_4Y8UopWBRe01QTisRLE,1705
53
+ agently/types/plugins/BuiltInTool.py,sha256=OYBOHTc6VG3YFaYQl_ZlFEUCzoSB5mBIoFN1RaL1JBI,728
49
54
  agently/types/plugins/EventHooker.py,sha256=kb80-baVc3fVlrddW5syv9uSD8a2Mcw8Fd3I2HQhY_Y,1030
50
55
  agently/types/plugins/ModelRequester.py,sha256=urG1zFX0b4U6ZKSO50IbW5IHK3ydmRgUom7O7Niqk8s,3875
51
56
  agently/types/plugins/PromptGenerator.py,sha256=V8kqT0Eeq09AQqfGA-SZ5mNKeit1UrmqlDQCquSMzUU,4752
52
57
  agently/types/plugins/ResponseParser.py,sha256=6dCVWz61gaHOxsX9e5sYFqcWRZ5hBnNXAarT0-9uCUY,4566
58
+ agently/types/plugins/Session.py,sha256=SJGBUkUZPTCv7f4Ml3XbhL3A_RgE5no5XT9vHJvMzHY,5189
53
59
  agently/types/plugins/ToolManager.py,sha256=q1Y3G_tzh1AU3s13H-zTDZIkR4W1mjh9E6AKudFOvyg,2421
54
- agently/types/plugins/__init__.py,sha256=gz_EpgBQGndIQHY5vJB2YRzAN5yIb3FZZG7pC8lB1lM,848
55
- agently/types/plugins/base.py,sha256=AoNLwsH5IZBQt7_NZfxMWMhAk6PJSOFHR0IYOXp1imI,1167
60
+ agently/types/plugins/__init__.py,sha256=CtSeuBvC9EiS3uX2FWFLLKBkdP6EAdakO-T7LX9TWII,1361
61
+ agently/types/plugins/base.py,sha256=O3dskXxoc7E1_qd8nTfJr7sP42jbJlPYijXKDX-cM2E,1178
56
62
  agently/types/trigger_flow/__init__.py,sha256=Gj31SmWBC4qtrOqQedyGsnCfeSkUf3XvZNFrJ2QbMNw,777
57
63
  agently/types/trigger_flow/trigger_flow.py,sha256=6lvhDwizIV5p3h61l1GsmJU_9Tw8v3u-SnHuygkSJdo,3799
58
- agently/utils/DataFormatter.py,sha256=D45eBlH9CTEs8xNWrDYw9pxUcNnCGVnm0_y97-VyMuU,12346
64
+ agently/utils/AGENT_UTILS_GUIDE.md,sha256=7BKewBgRMOXJKox8u8IE9EjVHWJlAQeVJNuN7cfPzTM,7510
65
+ agently/utils/DataFormatter.py,sha256=hl1VyAiOSKk9nAEa15yCIVD7wWm3c0GQZLtHPFMVlNM,12539
59
66
  agently/utils/DataLocator.py,sha256=0TSMONLPYQVvdJftoXcW4BMhwGFl2JrovAGH3LTthn4,8652
60
67
  agently/utils/DataPathBuilder.py,sha256=sEzE1i2EWn7NMkCCXDT50gR6_qMzcZ0y0YGkYbXdB3s,10007
61
- agently/utils/FunctionShifter.py,sha256=quwugTmf-vzHzRR_2wdv14AxLpr0lwxdUtVoX7Jeq48,5839
68
+ agently/utils/FunctionShifter.py,sha256=kf4zBp3dDkb87GaH6YvnL6Smf8p8slPvovfDV4-OQOI,5920
62
69
  agently/utils/GeneratorConsumer.py,sha256=EXpz2XGnv6rPdz8bPetJu3LpWIVhMvIi8GLG1Bpe7Ys,7459
63
70
  agently/utils/LazyImport.py,sha256=PfXc2iILXb7WVj6UD45_3qInow6z0cvhFlDqxTK-HfY,9120
64
71
  agently/utils/Logger.py,sha256=reIj6a7mNtLYDx3brLKEf0I8LbNkhXmL8Yc-DXnnsCU,2967
@@ -70,8 +77,9 @@ agently/utils/Settings.py,sha256=0vWNhVBKZLRKwuIKoXn-tYNZMajMQHLHdqrGhBA2S3Q,585
70
77
  agently/utils/Storage.py,sha256=E7QyNJ9T0yOUafPgdP90La698hgLMSGjhJ7qCEHzxxw,9438
71
78
  agently/utils/StreamingJSONCompleter.py,sha256=aZ9zuGUTQlP-QKbXHUZCf6EtVuG49MKn8xdhw0VhDEA,4292
72
79
  agently/utils/StreamingJSONParser.py,sha256=sPPJOtj5OYvsrukRErcoxRl4yuV1zDuf7pQ_pvw_Zow,21116
73
- agently/utils/__init__.py,sha256=Uq3uQdk2_OX_m6gF9wAvs4_scC-tsE4EjNTxN_oDagw,1321
74
- agently-4.0.7.1.dist-info/METADATA,sha256=WY94JMooQ57E-n3mWTDbPcx32-V_NhFI-JyY66gVOpM,7112
75
- agently-4.0.7.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
76
- agently-4.0.7.1.dist-info/licenses/LICENSE,sha256=Y5ZgAdYgMFigPT8dhN18dTLRtBshOSfWhTDRO1t0Cq4,11360
77
- agently-4.0.7.1.dist-info/RECORD,,
80
+ agently/utils/TimeInfo.py,sha256=lgdeXpTJQOqw0czvrsMcxNeY84wuvCF7kWpY4W8nhDY,750
81
+ agently/utils/__init__.py,sha256=A2EXx-TVU3Ca1s3fMlWM0se0BgI-ZRCXZgl4Hue-lco,1352
82
+ agently-4.0.7.2.dist-info/METADATA,sha256=QoTPNNNEXhuSgLvqDHL1d9lSE6hjL3dEpEIDH9WeDVY,17085
83
+ agently-4.0.7.2.dist-info/WHEEL,sha256=kJCRJT_g0adfAJzTx2GUMmS80rTJIVHRCfG0DQgLq3o,88
84
+ agently-4.0.7.2.dist-info/licenses/LICENSE,sha256=Y5ZgAdYgMFigPT8dhN18dTLRtBshOSfWhTDRO1t0Cq4,11360
85
+ agently-4.0.7.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.2.1
2
+ Generator: poetry-core 2.3.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,194 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: agently
3
- Version: 4.0.7.1
4
- Summary:
5
- License: Apache-2.0
6
- License-File: LICENSE
7
- Author: Agently Team
8
- Author-email: developer@agently.tech
9
- Requires-Python: >=3.10
10
- Classifier: License :: OSI Approved :: Apache Software License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python :: 3.13
16
- Classifier: Programming Language :: Python :: 3.14
17
- Requires-Dist: greenlet (>=3.2.3,<4.0.0)
18
- Requires-Dist: httpx (>=0.28.1,<0.29.0)
19
- Requires-Dist: httpx-sse (>=0.4.1,<0.5.0)
20
- Requires-Dist: json5 (>=0.12.0,<0.13.0)
21
- Requires-Dist: packaging (>=25.0,<26.0)
22
- Requires-Dist: pydantic (>=2.11.7,<3.0.0)
23
- Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
24
- Requires-Dist: stamina (>=25.1.0,<26.0.0)
25
- Requires-Dist: toml (>=0.10.2,<0.11.0)
26
- Description-Content-Type: text/markdown
27
-
28
- <img width="640" alt="image" src="https://github.com/user-attachments/assets/c645d031-c8b0-4dba-a515-9d7a4b0a6881" />
29
-
30
- # Agently 4
31
-
32
- [English Introduction](https://github.com/AgentEra/Agently/blob/main/README.md) | [中文介绍](https://github.com/AgentEra/Agently/blob/main/README_CN.md)
33
-
34
-
35
- > *Speed Up Your GenAI Application Development*
36
-
37
- [![license](https://img.shields.io/badge/license-Apache2.0-blue.svg?style=flat-square)](https://github.com/AgentEra/Agently/blob/main/LICENSE)
38
- [![PyPI - Downloads](https://img.shields.io/pypi/dm/agently?style=flat-square)](https://pypistats.org/packages/agently)
39
- [![GitHub star chart](https://img.shields.io/github/stars/agentera/agently?style=flat-square)](https://star-history.com/#agentera/agently)
40
- [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/AgentlyTech.svg?style=social&label=Follow%20%40AgentlyTech)](https://x.com/AgentlyTech)
41
- <a href="https://doc.weixin.qq.com/forms/AIoA8gcHAFMAScAhgZQABIlW6tV3l7QQf">
42
- <img alt="WeChat" src="https://img.shields.io/badge/WeChat%20Group-Apply-brightgreen?logo=wechat&style=flat-square">
43
- </a>
44
-
45
- <p>
46
- <a href="https://github.com/AgentEra/Agently/discussions/categories/general">
47
- <img alt="Discussions" src="https://img.shields.io/badge/Agently%20General%20Discussions-JOIN-brightgreen.svg?style=for-the-badge" />
48
- </a>
49
- <a href="https://github.com/AgentEra/Agently/discussions/categories/contribute-to-agently-4">
50
- <img alt="Contribute" src="https://img.shields.io/badge/Contribute%20to%20Agently%204%20-Join-blueviolet.svg?style=for-the-badge">
51
- </a>
52
- <a href="https://github.com/AgentEra/Agently/issues">
53
- <img alt="Issues" src="https://img.shields.io/badge/Report%20Issues-Report-red.svg?style=for-the-badge">
54
- </a>
55
- </p>
56
-
57
- <hr />
58
-
59
- <p align="center">
60
- <b><a href = "https://github.com/AgentEra/Agently/discussions">💬 Official Github Discussion Forum</a> - Welcome to Share Anything about Agently with Us</b>
61
- </p>
62
-
63
- <hr />
64
-
65
- ## Getting Started
66
-
67
- Agently is a Python-based framework for building GenAI applications. You can install it via pip and import features using `from agently import Agently`.
68
-
69
- Install the latest version via pip:
70
-
71
- ```shell
72
- pip install -U agently
73
- ```
74
-
75
- > ℹ️ If you're looking for Agently v3's code and documents, please visit branch [`v3-final`](https://github.com/AgentEra/Agently/tree/v3-final)
76
-
77
- Clone the repository and install locally:
78
-
79
- ```shell
80
- git clone git@github.com:AgentEra/Agently.git
81
- cd Agently
82
- pip install -e .
83
- ```
84
-
85
- ## What is Agently?
86
-
87
- Agently aims to provide an intuitive, efficient, and developer-friendly framework for GenAI application development. By deeply understanding the runtime control needs of model outputs, Agently bridges the gap between large language models and real-world applications.
88
-
89
- Agently abstracts away the complexities of:
90
- - Varying model parameters
91
- - Output formatting
92
- - Communication between engineering modules and GenAI logic
93
-
94
- ...while giving developers full control over business logic and integration with existing systems.
95
-
96
- We believe GenAI is not a generational replacement for current systems but a powerful extension. Engineers and tools are key to turning GenAI's possibilities into reality.
97
-
98
- Our mission is to build the best developer experience (DX) for GenAI application engineers.
99
-
100
- ## Core Features Overview
101
-
102
- ### Structured and Streamed Output Control for LLMs
103
-
104
- Agently allows you to control and consume model outputs using a developer-centric pattern:
105
-
106
- ```python
107
- from agently import Agently
108
-
109
- agent = Agently.create_agent()
110
-
111
- (
112
- agent
113
- .input("What time is it now?", always=True)
114
- .info({
115
- "default_timezone": "",
116
- "tool_list": [{
117
- "name": "get_current_time",
118
- "desc": "Get current time by time zone provided",
119
- "kwargs": {
120
- "timezone_str": (str, "time zone string in ZoneInfo()"),
121
- },
122
- }]
123
- })
124
- .output({
125
- "first_time_response": (str, ),
126
- "tool_using_judgement": (bool, ),
127
- "tool_using_command": (
128
- {
129
- "name": (str, "Decide which tool to use by tool name:{tool_list.[].name}"),
130
- "kwargs": (dict, "According {tool_list.[].args} to output kwargs dictionary"),
131
- },
132
- "If {tool_using_judgement}==False, just output {}",
133
- ),
134
- })
135
- )
136
- ```
137
-
138
- Then, consume the model response:
139
-
140
- ```python
141
- response = agent.get_response()
142
-
143
- # Get raw output
144
- response_text = response.get_text()
145
-
146
- # Get parsed structured result
147
- response_dict = response.get_result()
148
-
149
- # Streamed output
150
- for delta in response.get_generator(content="delta"):
151
- print(delta, end="", flush=True)
152
- ```
153
-
154
- Or use the instant parsing mode:
155
-
156
- ```python
157
- instant_response_generator = response.get_generator(content="instant")
158
-
159
- use_tool = False
160
-
161
- for instant_message in instant_response_generator:
162
- if instant_message.path == "first_time_response":
163
- if instant_message.delta is not None:
164
- print(instant_message.delta, end="", flush=True)
165
- elif instant_message.path == "tool_using_judgement":
166
- use_tool = instant_message.value
167
- print()
168
- if use_tool:
169
- print("[USE TOOL!]")
170
- else:
171
- print("[NO NEED TO USE TOOL!]")
172
- if use_tool:
173
- if instant_message.path == "tool_using_command.name" and instant_message.is_complete:
174
- print(f"I want to use: '{ instant_message.value }'")
175
- elif instant_message.path == "tool_using_command":
176
- print(f"call: { instant_message.value }")
177
- print(f"kwargs: { instant_message.value }")
178
- ```
179
-
180
- ```shell
181
- I can check the current time for you. Please specify a timezone (e.g., 'America/New_York') so I can provide the accurate time.
182
- [NO NEED TO USE TOOL!]
183
- ```
184
-
185
- ## [More documentation coming soon...]
186
-
187
- ## 💬 WeChat Group (Join Us)
188
-
189
- > [Click Here to Apply](https://doc.weixin.qq.com/forms/AIoA8gcHAFMAScAhgZQABIlW6tV3l7QQf)
190
- > or Scan the QR Code Below:
191
-
192
- <p align="center">
193
- <img width="120" alt="WeChat QR" src="https://github.com/AgentEra/Agently/assets/4413155/7f4bc9bf-a125-4a1e-a0a4-0170b718c1a6">
194
- </p>