Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.
TypeScript agent-harnessagent-harness-engineeringai-engineeringai-observabilityamd-gpuclaude-codeclickhousecodexcoding-agentcoding-agentscursorgenaigpu-monitoringllm-observabilityllmopsnvidia-smiobservabilityopen-sourceopenaiopentelemetry
[Feat]: Add OpenTelemetry Instrumentation for monitoring Julep AI (#524)
Patcherce906f29766b
diff --git a/docs/images/docs-julep-banner.gif b/docs/images/docs-julep-banner.gifnew file mode 100644index 00000000..d1fa0c04Binary files /dev/null and b/docs/images/docs-julep-banner.gif differdiff --git a/docs/latest/integrations/introduction.mdx b/docs/latest/integrations/introduction.mdxindex c2b7cbf3..696afda2 100644--- a/docs/latest/integrations/introduction.mdx+++ b/docs/latest/integrations/introduction.mdx@@ -2091,6 +2091,45 @@ Start integrating and monitoring your applications with OpenLIT in just one line}></Card>+ <Card+ title="Julep AI"+ href="/latest/integrations/julep-ai"+ iconType="duotone"+ icon={+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150">+ <path d="M0 0 C2.2966156 1.59425354 2.2966156 1.59425354 4.63842773 3.83422852 C5.9464888 5.07295212 5.9464888 5.07295212 7.28097534 6.33670044 C8.17825348 7.21558929 9.07553162 8.09447815 10 9 C10.86271515 9.83739716 11.7254303 10.67479431 12.61428833 11.53756714 C15.35619954 14.22468774 18.0734617 16.93474421 20.78515625 19.65234375 C21.7772341 20.64374583 22.76946017 21.63499962 23.76182556 22.62611389 C25.81801959 24.68084928 27.87243328 26.73734301 29.92553711 28.79516602 C32.55828491 31.4336707 35.19557968 34.06757816 37.83417606 36.70023251 C39.873382 38.73583414 41.91021194 40.77379971 43.94631767 42.81250191 C44.91883397 43.78568473 45.89209213 44.75812678 46.86610603 45.72981071 C48.21792166 47.07909555 49.56620423 48.43191731 50.91430664 49.78491211 C51.68134415 50.55274521 52.44838165 51.32057831 53.23866272 52.11167908 C55.6663187 54.71435696 55.97313219 55.75818971 56.375 59.375 C56 63 56 63 53.8125 65.4375 C50.6005821 67.22189883 49.59103739 67.67046243 46 67 C43.39811722 65.02807539 41.2256338 62.6926917 39 60.3125 C38.39671875 59.68666016 37.7934375 59.06082031 37.171875 58.41601562 C35.98772638 57.18681787 34.80791795 55.95342198 33.6328125 54.71557617 C30.54749928 51.47387522 27.47457286 48.38559045 24 45.5625 C20.92096119 42.93248768 18.54921599 40.1374966 16 37 C12.78975668 33.72373796 9.49279944 30.54626213 6.171875 27.3828125 C4.36418372 25.63062051 2.55690348 23.87800437 0.75 22.125 C-0.17296875 21.25230469 -1.0959375 20.37960938 -2.046875 19.48046875 C-9.48913543 12.20237583 -9.48913543 12.20237583 -10.2421875 8.05078125 C-10 5 -10 5 -7.875 2.0625 C-4.67976533 -0.22973357 -3.79701483 -0.53611417 0 0 Z " fill="currentColor" transform="translate(72,44)"/>+ <path d="M0 0 C3.92064124 1.42254992 5.76413851 2.80211536 8.67219543 5.73973083 C10.04315117 7.10641151 10.04315117 7.10641151 11.44180298 8.5007019 C12.4156727 9.49679032 13.38919044 10.49322298 14.36238098 11.48997498 C15.3778902 12.51228141 16.39444323 13.53355193 17.4119873 14.55383301 C20.07756472 17.23277558 22.72737361 19.92681542 25.37452698 22.62394714 C27.53936744 24.8242488 29.71539001 27.01330156 31.89205647 29.20189571 C34.4902481 31.81488044 37.08320279 34.43303161 39.67488098 37.05247498 C40.16829798 37.55080275 40.66171497 38.04913052 41.170084 38.56255913 C42.56553056 39.9743075 43.95684962 41.39013212 45.34797668 42.80613708 C46.13960709 43.6106279 46.93123749 44.41511871 47.74685669 45.24398804 C49.68659973 47.33763123 49.68659973 47.33763123 51.68659973 50.33763123 C51.50795686 53.67229808 51.2426495 56.32365812 49.62409973 59.27513123 C46.21598729 61.14409611 43.35306736 61.35196222 39.68659973 60.33763123 C35.50316432 57.36906765 32.01160556 53.74064813 28.44050598 50.08372498 C27.37947747 49.02300668 26.31711255 47.96362366 25.253479 46.90551758 C23.03276567 44.68756782 20.82659833 42.45636809 18.63020325 40.21434021 C15.82038698 37.34775175 12.98051983 34.51336596 10.1295023 31.68781948 C7.93308772 29.50534579 5.75170796 27.30833067 3.57470512 25.10650826 C2.53307358 24.05587392 1.48727541 23.00935299 0.43721199 21.96714592 C-1.03065815 20.50512818 -2.47756316 19.02506222 -3.920578 17.53855896 C-5.16012489 16.28280312 -5.16012489 16.28280312 -6.42471313 15.00167847 C-8.75899723 11.70910396 -9.17942273 9.34454565 -9.31340027 5.33763123 C-6.61896872 1.06370532 -5.13846435 -1.02721013 0 0 Z " fill="currentColor" transform="translate(72.31340026855469,75.66236877441406)"/>+ <path d="M0 0 C7.31180899 4.80680931 13.48890284 12.3362921 19.65698242 18.52661133 C21.45442236 20.32947341 23.25722661 22.12684985 25.06054688 23.92382812 C26.20605047 25.06999147 27.35124439 26.21646442 28.49609375 27.36328125 C29.03455429 27.89971756 29.57301483 28.43615387 30.12779236 28.98884583 C34.86478542 33.75602587 34.86478542 33.75602587 35.3125 37.875 C35 41 35 41 33.25 43.3125 C30.96967934 45.02274049 29.82549608 45.82875781 27 46 C21.57560227 44.6285947 18.33853184 40.73642378 14.546875 36.875 C13.84604797 36.1722998 13.14522095 35.46959961 12.42315674 34.74560547 C10.94720005 33.26294007 9.47483877 31.77668796 8.00585938 30.28710938 C5.75125172 28.00126906 3.48607531 25.72634457 1.21875 23.453125 C-0.21416855 22.01103929 -1.64648148 20.56835151 -3.078125 19.125 C-3.75723938 18.44163574 -4.43635376 17.75827148 -5.13604736 17.05419922 C-5.76049744 16.4201416 -6.38494751 15.78608398 -7.02832031 15.1328125 C-7.8550827 14.29580811 -7.8550827 14.29580811 -8.69854736 13.44189453 C-10.64359963 11.28694847 -10.99437821 10.05172051 -11.3125 7.125 C-11 4 -11 4 -9.125 1.6875 C-5.65469861 -1.06832758 -4.24950914 -1.20196627 0 0 Z " fill="currentColor" transform="translate(76,108)"/>+ <path d="M0 0 C8.2930246 1.75429367 15.28539217 11.41485508 21.19799805 17.23046875 C22.19742335 18.20810688 23.20307422 19.17941798 24.21459961 20.14453125 C25.69825076 21.56112338 27.16109471 22.99659012 28.62109375 24.4375 C29.48661865 25.27796875 30.35214355 26.1184375 31.24389648 26.984375 C33.7070928 30.30340989 34.14531776 32.58371763 34.25 36.6875 C32.25 39.6875 32.25 39.6875 29.25 41.6875 C24.83709245 41.70037236 22.14155421 40.93661565 18.90087891 38.03540039 C17.74383709 36.8841238 16.60305391 35.71634237 15.4765625 34.53515625 C14.86734955 33.91982529 14.2581366 33.30449432 13.63046265 32.67051697 C11.69746041 30.71067394 9.78661026 28.73069011 7.875 26.75 C6.56774329 25.42120934 5.25916232 24.0937201 3.94921875 22.76757812 C-6.60432092 12.0277475 -6.60432092 12.0277475 -7.0625 7.8125 C-6.75 4.6875 -6.75 4.6875 -5.125 2.3125 C-2.75 0.6875 -2.75 0.6875 0 0 Z " fill="currentColor" transform="translate(98.75,43.3125)"/>+ <path d="M0 0 C2.3515625 1.57421875 2.3515625 1.57421875 4.625 3.6875 C5.38039063 4.37199219 6.13578125 5.05648437 6.9140625 5.76171875 C9 8 9 8 10.3659668 10.36987305 C12.07508278 13.12085265 13.8982531 15.08148727 16.23046875 17.3203125 C17.03291016 18.10277344 17.83535156 18.88523437 18.66210938 19.69140625 C20.35568389 21.32342005 22.05101865 22.95360905 23.74804688 24.58203125 C24.9459082 25.75185547 24.9459082 25.75185547 26.16796875 26.9453125 C26.90297607 27.65187988 27.6379834 28.35844727 28.39526367 29.08642578 C30 31 30 31 30 34 C27 35 27 35 24 34 C24 35.32 24 36.64 24 38 C23.01 38 22.02 38 21 38 C20.34 38.66 19.68 39.32 19 40 C14.61612819 36.42132913 10.86724673 32.80238748 7.23828125 28.47265625 C5.37986074 26.41963673 3.48698086 24.5244108 1.48046875 22.62109375 C0.84826416 22.01523438 0.21605957 21.409375 -0.43530273 20.78515625 C-1.70780487 19.57303591 -2.99221054 18.37326519 -4.28930664 17.1875 C-7.41087432 14.19445998 -8.85622538 12.51501357 -10.046875 8.25 C-10 5 -10 5 -7.875 2.0625 C-4.6789821 -0.23029545 -3.79741198 -0.52299686 0 0 Z " fill="currentColor" transform="translate(72,44)"/>+ <path d="M0 0 C14.70717423 12.30600293 14.70717423 12.30600293 15.3125 17.875 C15 21 15 21 13.25 23.3125 C10.96967934 25.02274049 9.82549608 25.82875781 7 26 C3.14947487 24.76824281 0.82175707 23.18326334 -1.98828125 20.3046875 C-2.69404297 19.58925781 -3.39980469 18.87382812 -4.12695312 18.13671875 C-4.84818359 17.39035156 -5.56941406 16.64398438 -6.3125 15.875 C-7.42334961 14.74384766 -7.42334961 14.74384766 -8.55664062 13.58984375 C-10.37806633 11.73316465 -12.19210536 9.86984148 -14 8 C-12.68 7.67 -11.36 7.34 -10 7 C-10 7.99 -10 8.98 -10 10 C-9.34 10 -8.68 10 -8 10 C-8 9.34 -8 8.68 -8 8 C-5.525 8.99 -5.525 8.99 -3 10 C-3.33 11.65 -3.66 13.3 -4 15 C-3.34 15 -2.68 15 -2 15 C-1.16623886 12.49871657 -0.48133102 10.06196206 0.125 7.5 C0.31320313 6.7265625 0.50140625 5.953125 0.6953125 5.15625 C1.18851468 2.82245789 1.18851468 2.82245789 0 0 Z M-10 4 C-9.01 4.495 -9.01 4.495 -8 5 C-8 5.66 -8 6.32 -8 7 C-8.66 7 -9.32 7 -10 7 C-10 6.01 -10 5.02 -10 4 Z " fill="currentColor" transform="translate(96,128)"/>+ <path d="M0 0 C4.12444855 3.42241475 8.086568 6.95843293 11.9375 10.6875 C13.09572266 11.80705078 13.09572266 11.80705078 14.27734375 12.94921875 C16 15 16 15 16 18 C13 19 13 19 10 18 C10 19.32 10 20.64 10 22 C9.01 22 8.02 22 7 22 C6.34 22.66 5.68 23.32 5 24 C-7.01939655 14.29202586 -7.01939655 14.29202586 -8.875 8.0625 C-8.91625 7.381875 -8.9575 6.70125 -9 6 C-8.01 6.33 -7.02 6.66 -6 7 C-5.7525 6.360625 -5.505 5.72125 -5.25 5.0625 C-4 3 -4 3 -1.875 2.25 C-1.25625 2.1675 -0.6375 2.085 0 2 C0 1.34 0 0.68 0 0 Z " fill="currentColor" transform="translate(86,60)"/>+ <path d="M0 0 C0.86625 0.24105469 1.7325 0.48210937 2.625 0.73046875 C5.43024807 2.00851762 6.46584005 3.16214033 8 5.8125 C8.5 9.3125 8.5 9.3125 8 12.8125 C5.62981915 15.45355866 4.12832813 16.65888645 0.58984375 17.140625 C-2.78648525 16.71285481 -3.90354906 15.54757626 -6.25 13.125 C-6.93578125 12.44050781 -7.6215625 11.75601563 -8.328125 11.05078125 C-10.16873581 8.58659903 -10.63983377 6.83683703 -11 3.8125 C-10.34 3.8125 -9.68 3.8125 -9 3.8125 C-8.896875 3.173125 -8.79375 2.53375 -8.6875 1.875 C-8.460625 1.194375 -8.23375 0.51375 -8 -0.1875 C-4.55148492 -1.33700503 -3.41587509 -1.00138005 0 0 Z " fill="currentColor" transform="translate(120,94.1875)"/>+ <path d="M0 0 C4.68209149 3.24346003 8.65679884 7.40309841 12 12 C9.53199953 10.84826645 7.95216435 9.95216435 6 8 C5.01 8.66 4.02 9.32 3 10 C2.34 9.67 1.68 9.34 1 9 C1 9.99 1 10.98 1 12 C-0.98 12.33 -2.96 12.66 -5 13 C-4.01 13.99 -3.02 14.98 -2 16 C-2.33 16.99 -2.66 17.98 -3 19 C-4.14888283 17.87811441 -5.29401137 16.75238316 -6.4375 15.625 C-7.39462891 14.68527344 -7.39462891 14.68527344 -8.37109375 13.7265625 C-10.54641239 11.42082907 -10.96616846 10.31125017 -11.3125 7.125 C-11 4 -11 4 -9.125 1.6875 C-5.65842191 -1.06537084 -4.24433411 -1.23609136 0 0 Z " fill="currentColor" transform="translate(76,108)"/>+ <path d="M0 0 C2.45703125 1.75 2.45703125 1.75 4.8125 4 C5.60269531 4.7425 6.39289063 5.485 7.20703125 6.25 C7.79871094 6.8275 8.39039062 7.405 9 8 C7 8 5 8 3 8 C2.01 9.485 2.01 9.485 1 11 C0.01 12.485 0.01 12.485 -1 14 C-1.66 14 -2.32 14 -3 14 C-2.67 15.32 -2.34 16.64 -2 18 C-5.96562499 15.17332736 -8.60434719 13.1276105 -10.25 8.4375 C-10 5 -10 5 -7.875 2.0625 C-4.6764072 -0.23214266 -3.80144387 -0.54953809 0 0 Z " fill="currentColor" transform="translate(72,44)"/>+ <path d="M0 0 C0.66 0 1.32 0 2 0 C2 0.99 2 1.98 2 3 C2.556875 2.731875 3.11375 2.46375 3.6875 2.1875 C6 2 6 2 8.875 3.8125 C11.27376271 7.41064407 11.24279121 8.10575275 10.5625 12.1875 C10.00390625 14.79296875 10.00390625 14.79296875 9 17 C6.90234375 18.30078125 6.90234375 18.30078125 5 19 C5 17.35 5 15.7 5 14 C3.68 13.34 2.36 12.68 1 12 C1 12.66 1 13.32 1 14 C0.34 14 -0.32 14 -1 14 C-1 13.01 -1 12.02 -1 11 C-1.66 11 -2.32 11 -3 11 C-2.67 8.36 -2.34 5.72 -2 3 C-1.34 3 -0.68 3 0 3 C0 2.01 0 1.02 0 0 Z M-1 8 C-1 8.99 -1 9.98 -1 11 C-0.34 11 0.32 11 1 11 C0.67 10.01 0.34 9.02 0 8 C-0.33 8 -0.66 8 -1 8 Z " fill="currentColor" transform="translate(87,124)"/>+ <path d="M0 0 C3.07858551 2.40514493 3.93149012 3.57371632 4.5625 7.5 C4 11 4 11 1.8125 13.4375 C-1.25243048 15.14023915 -2.58302532 15.78853262 -6 15 C-8.3125 12.5 -8.3125 12.5 -10 10 C-7.03 9.01 -4.06 8.02 -1 7 C-0.67 4.69 -0.34 2.38 0 0 Z " fill="currentColor" transform="translate(124,96)"/>+ <path d="M0 0 C1.8125 1.75 1.8125 1.75 3 4 C3 5.32 3 6.64 3 8 C2.34 8 1.68 8 1 8 C1 7.34 1 6.68 1 6 C-1.75383923 7.37691962 -2.51483101 9.36720042 -4 12 C-4.99 11.67 -5.98 11.34 -7 11 C-7 10.01 -7 9.02 -7 8 C-7.66 8 -8.32 8 -9 8 C-9 6.02 -9 4.04 -9 2 C-5.89608238 0.16064141 -3.60570855 -0.55472439 0 0 Z " fill="currentColor" transform="translate(73,77)"/>+ <path d="M0 0 C6.84026369 5.53042596 6.84026369 5.53042596 7.3125 9.875 C7 13 7 13 5.25 15.3125 C2.96967934 17.02274049 1.82549608 17.82875781 -1 18 C-4.7810303 16.91970563 -5.76204175 16.35693737 -8 13 C-5.525 13.99 -5.525 13.99 -3 15 C-2.67 14.01 -2.34 13.02 -2 12 C-1.34 11.71125 -0.68 11.4225 0 11.125 C2.24207258 10.14356509 2.24207258 10.14356509 2.9375 7.5625 C3.28604015 4.95585942 3.28604015 4.95585942 1.5625 3.3125 C1.046875 2.879375 0.53125 2.44625 0 2 C0 1.34 0 0.68 0 0 Z " fill="currentColor" transform="translate(104,136)"/>+ <path d="M0 0 C0.33 0.99 0.66 1.98 1 3 C1.99 3.33 2.98 3.66 4 4 C4.6875 6.0625 4.6875 6.0625 5 8 C3.8553125 8.1546875 3.8553125 8.1546875 2.6875 8.3125 C-0.17059424 9.04364039 -1.15742885 9.76951913 -3 12 C-5.475 11.01 -5.475 11.01 -8 10 C-8 8.68 -8 7.36 -8 6 C-6.68 6 -5.36 6 -4 6 C-4.33 5.34 -4.66 4.68 -5 4 C-4.67 3.34 -4.34 2.68 -4 2 C-2.68 2 -1.36 2 0 2 C0 1.34 0 0.68 0 0 Z " fill="currentColor" transform="translate(74,107)"/>+ <path d="M0 0 C1.32 0.66 2.64 1.32 4 2 C3.66215151 5.12509851 3.4813882 6.5807264 1.0625 8.6875 C0.381875 9.120625 -0.29875 9.55375 -1 10 C-1.66 10.66 -2.32 11.32 -3 12 C-2.34 12.33 -1.68 12.66 -1 13 C-2.9375 12.6875 -2.9375 12.6875 -5 12 C-6.39195915 7.82412255 -4.82323219 5.86525224 -3 2 C-2.34 2 -1.68 2 -1 2 C-0.67 1.34 -0.34 0.68 0 0 Z " fill="currentColor" transform="translate(104,139)"/>+ <path d="M0 0 C3.46284252 2.21977085 4.82679079 3.47074964 6.125 7.4375 C6 11 6 11 3.875 13.9375 C0.82477699 16.12570346 -0.35663645 16.52048051 -4 16 C-2.68 15.67 -1.36 15.34 0 15 C0 14.34 0 13.68 0 13 C0.99 13 1.98 13 3 13 C3 11.02 3 9.04 3 7 C2.34 7 1.68 7 1 7 C0.67 4.69 0.34 2.38 0 0 Z " fill="currentColor" transform="translate(127,69)"/>+ <path d="M0 0 C0 0.66 0 1.32 0 2 C-1.32 2 -2.64 2 -4 2 C-3.67 3.32 -3.34 4.64 -3 6 C-3.99 6.495 -3.99 6.495 -5 7 C-5.99 6.67 -6.98 6.34 -8 6 C-8 7.32 -8 8.64 -8 10 C-7.34 10 -6.68 10 -6 10 C-5.67 11.65 -5.34 13.3 -5 15 C-7.7822335 12.73943528 -8.90092877 11.5944274 -9.5 8 C-8.89445555 4.36673332 -7.8441085 3.25855675 -5 1 C-3 0 -3 0 0 0 Z " fill="currentColor" transform="translate(74,107)"/>+ <path d="M0 0 C0.99 0.495 0.99 0.495 2 1 C2 1.66 2 2.32 2 3 C1.34 3 0.68 3 0 3 C0 2.01 0 1.02 0 0 Z M-4 3 C-2.68 3 -1.36 3 0 3 C0 3.99 0 4.98 0 6 C0.66 6 1.32 6 2 6 C2 5.34 2 4.68 2 4 C2.99 4.33 3.98 4.66 5 5 C4.67 6.98 4.34 8.96 4 11 C2.85073734 10.04578192 1.70569459 9.08647955 0.5625 8.125 C-0.07558594 7.59132812 -0.71367188 7.05765625 -1.37109375 6.5078125 C-3 5 -3 5 -4 3 Z " fill="currentColor" transform="translate(86,132)"/>+ <path d="M0 0 C0 3 0 3 -1 5 C-0.34 5 0.32 5 1 5 C1.33 4.34 1.66 3.68 2 3 C2.99 4.485 2.99 4.485 4 6 C3.34 7.32 2.68 8.64 2 10 C-0.31 7.69 -2.62 5.38 -5 3 C-3.68 2.34 -2.36 1.68 -1 1 C-0.67 0.67 -0.34 0.34 0 0 Z " fill="currentColor" transform="translate(79,125)"/>+ <path d="M0 0 C2.86207152 1.28299758 5.0245088 2.530636 7 5 C7 5.99 7 6.98 7 8 C6.01 8.33 5.02 8.66 4 9 C3.01 8.34 2.02 7.68 1 7 C0.3125 3.375 0.3125 3.375 0 0 Z " fill="currentColor" transform="translate(95,70)"/>+ <path d="M0 0 C2.86207152 1.28299758 5.0245088 2.530636 7 5 C7 5.99 7 6.98 7 8 C6.01 8.33 5.02 8.66 4 9 C3.87625 8.360625 3.7525 7.72125 3.625 7.0625 C3.41875 6.381875 3.2125 5.70125 3 5 C2.34 4.67 1.68 4.34 1 4 C1 3.34 1 2.68 1 2 C0.34 1.67 -0.32 1.34 -1 1 C-0.67 0.67 -0.34 0.34 0 0 Z " fill="currentColor" transform="translate(87,62)"/>+ <path d="M0 0 C3.27642756 0.25866533 4.60820723 0.55416685 6.8125 3.0625 C7.204375 3.701875 7.59625 4.34125 8 5 C5.69 4.67 3.38 4.34 1 4 C1 3.34 1 2.68 1 2 C0.34 1.67 -0.32 1.34 -1 1 C-0.67 0.67 -0.34 0.34 0 0 Z " fill="currentColor" transform="translate(103,78)"/>+ <path d="M0 0 C2.5 1.8125 2.5 1.8125 5 4 C5 4.99 5 5.98 5 7 C4.01 7.33 3.02 7.66 2 8 C2 7.01 2 6.02 2 5 C1.01 5.33 0.02 5.66 -1 6 C-0.67 4.02 -0.34 2.04 0 0 Z " fill="currentColor" transform="translate(81,55)"/>+ <path d="M0 0 C1.9375 0.625 1.9375 0.625 4 2 C4.75 5.125 4.75 5.125 5 8 C3.02 6.35 1.04 4.7 -1 3 C-0.67 2.01 -0.34 1.02 0 0 Z " fill="currentColor" transform="translate(92,112)"/>+ <path d="M0 0 C1.14926266 0.95421808 2.29430541 1.91352045 3.4375 2.875 C4.07558594 3.40867187 4.71367188 3.94234375 5.37109375 4.4921875 C7 6 7 6 8 8 C4 8 4 8 1 6 C0.3125 2.875 0.3125 2.875 0 0 Z " fill="currentColor" transform="translate(88,120)"/>+ <path d="M0 0 C3.82946843 1.45255699 5.12050295 3.42895561 7 7 C4 7 4 7 2.375 5.75 C0.8631638 3.82584484 0.41208721 2.39010582 0 0 Z " fill="currentColor" transform="translate(114,74)"/>+ <path d="M0 0 C0.99 0.33 1.98 0.66 3 1 C3.33 2.98 3.66 4.96 4 7 C2.02 5.35 0.04 3.7 -2 2 C-1.34 1.34 -0.68 0.68 0 0 Z " fill="currentColor" transform="translate(77,97)"/>+ <path d="M0 0 C1.32 0 2.64 0 4 0 C4.66 0.99 5.32 1.98 6 3 C5.67 3.99 5.34 4.98 5 6 C4.67 5.34 4.34 4.68 4 4 C1.47266765 3.34444881 1.47266765 3.34444881 -1 3 C-0.67 2.01 -0.34 1.02 0 0 Z " fill="currentColor" transform="translate(107,83)"/>+ </svg>+ }+ >+ </Card><Cardtitle="Dynamiq"href="/latest/integrations/dynamiq"diff --git a/docs/latest/integrations/julep-ai.mdx b/docs/latest/integrations/julep-ai.mdxnew file mode 100644index 00000000..38e3bb5f--- /dev/null+++ b/docs/latest/integrations/julep-ai.mdx@@ -0,0 +1,78 @@+---+title: 'Monitor Julep AI using OpenTelemetry'+sidebarTitle: 'Julep AI'+---++<Frame>+ <img src="/images/docs-julep-banner.gif" />+</Frame>++OpenLIT uses OpenTelemetry Auto-Instrumentation to help you monitor AI Agents built using Julep AI. This includes tracking performance and operation stats.++Auto-instrumentation means you don't have to set up monitoring manually for different LLMs, frameworks, or databases. By simply adding OpenLIT in your application, all the necessary monitoring configurations are automatically set up.++The integration is compatible with+- Julep AI Python SDK client `>= 1.42.0`++## Get Started++<Steps>+ <Step title="Install OpenLIT">+ Open your command line or terminal and run:+ ```shell+ pip install openlit+ ```+ </Step>+ <Step title="Initialize OpenLIT in your Application">+ You can set up OpenLIT in your application using either function arguments directly in your code or by using environment variables.+ <Tabs>+ <Tab title="Setup using function arguments">++ Add the following two lines to your application code:++ ```python+ import openlit++ openlit.init(+ otlp_endpoint="YOUR_OTEL_ENDPOINT",+ )+ ```++ Replace:+ 1. `YOUR_OTEL_ENDPOINT` with the URL of your OpenTelemetry backend, such as `http://127.0.0.1:4318` if you are using OpenLIT and a local OTel Collector.+ </Tab>+ <Tab title="Setup using Environment Variables">++ Add the following two lines to your application code:++ ```python+ import openlit++ openlit.init()+ ```++ Then, configure the your OTLP endpoint using environment variable:+ ```shell+ export OTEL_EXPORTER_OTLP_ENDPOINT = "YOUR_OTEL_ENDPOINT"+ ```++ Replace:+ 1. `YOUR_OTEL_ENDPOINT` with the URL of your OpenTelemetry backend, such as `http://127.0.0.1:4318` if you are using OpenLIT and a local OTel Collector.+ </Tab>+ </Tabs>+ To send metrics and traces to other Observability tools, refer to the [Connections Guide](/latest/connections/intro).++ For more advanced configurations and application use cases, visit the [OpenLIT Python repository](https://github.com/openlit/openlit/tree/main/sdk/python).+ </Step>+</Steps>++---++<CardGroup cols={2}>+<Card title="Connections" href="/latest/connections/intro" icon='link'>+Connect to your existing Observablity Stack+</Card>+<Card title="SDK configuration" href="/latest/sdk-configuration" icon='file-code'>+Documentation of the configuration options for the OpenLIT SDK.+</Card>+</CardGroup>\ No newline at end of filediff --git a/docs/mint.json b/docs/mint.jsonindex 791f5667..0c0e8953 100644--- a/docs/mint.json+++ b/docs/mint.json@@ -134,6 +134,7 @@"latest/integrations/guardrails","latest/integrations/phidata","latest/integrations/multion",+ "latest/integrations/julep-ai","latest/integrations/dynamiq"]},diff --git a/sdk/python/README.md b/sdk/python/README.mdindex 521be92e..c6810f40 100644--- a/sdk/python/README.md+++ b/sdk/python/README.md@@ -47,7 +47,7 @@ This project proudly follows and maintains the [Semantic Conventions](https://gi| [✅ Amazon Bedrock](https://docs.openlit.io/latest/integrations/bedrock) | | [✅ Phidata](https://docs.openlit.io/latest/integrations/phidata) | || | | [✅ mem0](https://docs.openlit.io/latest/integrations/mem0) | || [✅ Vertex AI](https://docs.openlit.io/latest/integrations/vertexai) | | [✅ MultiOn](https://docs.openlit.io/latest/integrations/multion) | |-| [✅ Groq](https://docs.openlit.io/latest/integrations/groq) | | | |+| [✅ Groq](https://docs.openlit.io/latest/integrations/groq) | | [✅ Julep AI](https://docs.openlit.io/latest/integrations/julep-ai) | || [✅ ElevenLabs](https://docs.openlit.io/latest/integrations/elevenlabs) | | | || [✅ vLLM](https://docs.openlit.io/latest/integrations/vllm) | | | || [✅ OLA Krutrim](https://docs.openlit.io/latest/integrations/krutrim) | | | |@@ -58,6 +58,7 @@ This project proudly follows and maintains the [Semantic Conventions](https://gi| [✅ xAI](https://docs.openlit.io/latest/integrations/xai) | | | || [✅ Prem AI](https://docs.openlit.io/latest/integrations/premai) | | | |+## Supported Destinations- [✅ OpenTelemetry Collector](https://docs.openlit.io/latest/connections/otelcol)- [✅ Prometheus + Tempo](https://docs.openlit.io/latest/connections/prometheus-tempo)diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.tomlindex f8cd0df1..3185414e 100644--- a/sdk/python/pyproject.toml+++ b/sdk/python/pyproject.toml@@ -1,6 +1,6 @@[tool.poetry]name = "openlit"-version = "1.32.1"+version = "1.32.2"description = "OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications and GPUs, facilitating the integration of observability into your GenAI-driven projects"authors = ["OpenLIT"]repository = "https://github.com/openlit/openlit/tree/main/openlit/python"diff --git a/sdk/python/src/openlit/__init__.py b/sdk/python/src/openlit/__init__.pyindex e21325a3..e7852a8a 100644--- a/sdk/python/src/openlit/__init__.py+++ b/sdk/python/src/openlit/__init__.py@@ -55,6 +55,7 @@ from openlit.instrumentation.ag2 import AG2Instrumentorfrom openlit.instrumentation.multion import MultiOnInstrumentorfrom openlit.instrumentation.dynamiq import DynamiqInstrumentorfrom openlit.instrumentation.phidata import PhidataInstrumentor+from openlit.instrumentation.julep import JulepInstrumentorfrom openlit.instrumentation.gpu import GPUInstrumentorimport openlit.guardimport openlit.evals@@ -248,6 +249,7 @@ def init(environment="default", application_name="default", tracer=None, otlp_en"phidata": "phi","reka-api": "reka","premai": "premai",+ "julep": "julep",}invalid_instrumentors = [@@ -336,6 +338,7 @@ def init(environment="default", application_name="default", tracer=None, otlp_en"phidata": PhidataInstrumentor(),"reka-api": RekaInstrumentor(),"premai": PremAIInstrumentor(),+ "julep": JulepInstrumentor(),}# Initialize and instrument only the enabled instrumentorsdiff --git a/sdk/python/src/openlit/instrumentation/julep/__init__.py b/sdk/python/src/openlit/instrumentation/julep/__init__.pynew file mode 100644index 00000000..6a581b9b--- /dev/null+++ b/sdk/python/src/openlit/instrumentation/julep/__init__.py@@ -0,0 +1,80 @@+# pylint: disable=useless-return, bad-staticmethod-argument, disable=duplicate-code+"""Initializer of Auto Instrumentation of Juelp Functions"""++from typing import Collection+import importlib.metadata+from opentelemetry.instrumentation.instrumentor import BaseInstrumentor+from wrapt import wrap_function_wrapper++from openlit.instrumentation.julep.julep import (+ wrap_julep+)++from openlit.instrumentation.julep.async_julep import (+ async_wrap_julep+)++_instruments = ("julep >= 1.42.0",)++class JulepInstrumentor(BaseInstrumentor):+ """+ An instrumentor for Julep's client library.+ """++ def instrumentation_dependencies(self) -> Collection[str]:+ return _instruments++ def _instrument(self, **kwargs):+ application_name = kwargs.get("application_name", "default_application")+ environment = kwargs.get("environment", "default_environment")+ tracer = kwargs.get("tracer")+ metrics = kwargs.get("metrics_dict")+ pricing_info = kwargs.get("pricing_info", {})+ trace_content = kwargs.get("trace_content", False)+ disable_metrics = kwargs.get("disable_metrics")+ version = importlib.metadata.version("julep")++ # sync+ wrap_function_wrapper(+ "julep.resources.agents.agents",+ "AgentsResource.create",+ wrap_julep("julep.agents_create", version, environment, application_name,+ tracer, pricing_info, trace_content, metrics, disable_metrics),+ )+ wrap_function_wrapper(+ "julep.resources.tasks",+ "TasksResource.create",+ wrap_julep("julep.task_create", version, environment, application_name,+ tracer, pricing_info, trace_content, metrics, disable_metrics),+ )+ wrap_function_wrapper(+ "julep.resources.executions.executions",+ "ExecutionsResource.create",+ wrap_julep("julep.execution_create", version, environment, application_name,+ tracer, pricing_info, trace_content, metrics, disable_metrics),+ )++ # async+ wrap_function_wrapper(+ "julep.resources.agents.agents",+ "AsyncAgentsResource.create",+ async_wrap_julep("julep.agents_create", version, environment, application_name,+ tracer, pricing_info, trace_content, metrics, disable_metrics),+ )+ wrap_function_wrapper(+ "julep.resources.tasks",+ "AsyncTasksResource.create",+ async_wrap_julep("julep.task_create", version, environment, application_name,+ tracer, pricing_info, trace_content, metrics, disable_metrics),+ )+ wrap_function_wrapper(+ "julep.resources.executions.executions",+ "AsyncExecutionsResource.create",+ async_wrap_julep("julep.execution_create", version, environment, application_name,+ tracer, pricing_info, trace_content, metrics, disable_metrics),+ )+++ def _uninstrument(self, **kwargs):+ # Proper uninstrumentation logic to revert patched methods+ passdiff --git a/sdk/python/src/openlit/instrumentation/julep/async_julep.py b/sdk/python/src/openlit/instrumentation/julep/async_julep.pynew file mode 100644index 00000000..67936d62--- /dev/null+++ b/sdk/python/src/openlit/instrumentation/julep/async_julep.py@@ -0,0 +1,111 @@+# pylint: disable=duplicate-code, broad-exception-caught, too-many-statements, unused-argument+"""+Module for monitoring Julep.+"""++import logging+from opentelemetry.trace import SpanKind, Status, StatusCode+from opentelemetry.sdk.resources import TELEMETRY_SDK_NAME+from openlit.__helpers import handle_exception+from openlit.semcov import SemanticConvetion++# Initialize logger for logging potential issues and operations+logger = logging.getLogger(__name__)++def async_wrap_julep(gen_ai_endpoint, version, environment, application_name,+ tracer, pricing_info, trace_content, metrics, disable_metrics):+ """+ Creates a wrapper around a function call to trace and log its execution metrics.++ This function wraps any given function to measure its execution time,+ log its operation, and trace its execution using OpenTelemetry.++ Parameters:+ - gen_ai_endpoint (str): A descriptor or name for the endpoint being traced.+ - version (str): The version of the application.+ - environment (str): The deployment environment (e.g., 'production', 'development').+ - application_name (str): Name of the application.+ - tracer (opentelemetry.trace.Tracer): The tracer object used for OpenTelemetry tracing.+ - pricing_info (dict): Information about the pricing for internal metrics (currently not used).+ - trace_content (bool): Flag indicating whether to trace the content of the response.++ Returns:+ - function: A higher-order function that takes a function 'wrapped' and returns+ a new function that wraps 'wrapped' with additional tracing and logging.+ """++ async def wrapper(wrapped, instance, args, kwargs):+ """+ An inner wrapper function that executes the wrapped function, measures execution+ time, and records trace data using OpenTelemetry.++ Parameters:+ - wrapped (Callable): The original function that this wrapper will execute.+ - instance (object): The instance to which the wrapped function belongs. This+ is used for instance methods. For static and classmethods,+ this may be None.+ - args (tuple): Positional arguments passed to the wrapped function.+ - kwargs (dict): Keyword arguments passed to the wrapped function.++ Returns:+ - The result of the wrapped function call.++ The wrapper initiates a span with the provided tracer, sets various attributes+ on the span based on the function's execution and response, and ensures+ errors are handled and logged appropriately.+ """++ with tracer.start_as_current_span(gen_ai_endpoint, kind= SpanKind.CLIENT) as span:+ response = await wrapped(*args, **kwargs)++ try:+ span.set_attribute(TELEMETRY_SDK_NAME, "openlit")+ span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,+ gen_ai_endpoint)+ span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,+ SemanticConvetion.GEN_AI_SYSTEM_JULEP)+ span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,+ environment)+ span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,+ application_name)+ span.set_attribute(SemanticConvetion.GEN_AI_TYPE,+ SemanticConvetion.GEN_AI_TYPE_AGENT)++ if gen_ai_endpoint == "julep.agents_create":+ span.set_attribute(SemanticConvetion.GEN_AI_AGENT_ID,+ response.id)+ span.set_attribute(SemanticConvetion.GEN_AI_AGENT_ROLE,+ kwargs.get("name", ""))+ span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_MODEL,+ kwargs.get("model", "gpt-4-turbo"))+ span.set_attribute(SemanticConvetion.GEN_AI_AGENT_CONTEXT,+ kwargs.get("about", ""))++ elif gen_ai_endpoint == "julep.task_create":+ span.set_attribute(SemanticConvetion.GEN_AI_AGENT_TOOLS,+ str(kwargs.get("tools", "")))++ elif gen_ai_endpoint == "julep.execution_create":+ span.set_attribute(SemanticConvetion.GEN_AI_AGENT_TASK_ID,+ kwargs.get("task_id", ""))+ if trace_content:+ span.add_event(+ name=SemanticConvetion.GEN_AI_CONTENT_PROMPT_EVENT,+ attributes={+ SemanticConvetion.GEN_AI_CONTENT_PROMPT:str(kwargs.get("input", "")),+ },+ )++ span.set_status(Status(StatusCode.OK))++ # Return original response+ return response++ except Exception as e:+ handle_exception(span, e)+ logger.error("Error in trace creation: %s", e)++ # Return original response+ return response++ return wrapperdiff --git a/sdk/python/src/openlit/instrumentation/julep/julep.py b/sdk/python/src/openlit/instrumentation/julep/julep.pynew file mode 100644index 00000000..9bb02aed--- /dev/null+++ b/sdk/python/src/openlit/instrumentation/julep/julep.py@@ -0,0 +1,112 @@+# pylint: disable=duplicate-code, broad-exception-caught, too-many-statements, unused-argument+"""+Module for monitoring Julep.+"""++import logging+from opentelemetry.trace import SpanKind, Status, StatusCode+from opentelemetry.sdk.resources import TELEMETRY_SDK_NAME+from openlit.__helpers import handle_exception+from openlit.semcov import SemanticConvetion++# Initialize logger for logging potential issues and operations+logger = logging.getLogger(__name__)++def wrap_julep(gen_ai_endpoint, version, environment, application_name,+ tracer, pricing_info, trace_content, metrics, disable_metrics):+ """+ Creates a wrapper around a function call to trace and log its execution metrics.++ This function wraps any given function to measure its execution time,+ log its operation, and trace its execution using OpenTelemetry.++ Parameters:+ - gen_ai_endpoint (str): A descriptor or name for the endpoint being traced.+ - version (str): The version of the Langchain application.+ - environment (str): The deployment environment (e.g., 'production', 'development').+ - application_name (str): Name of the Langchain application.+ - tracer (opentelemetry.trace.Tracer): The tracer object used for OpenTelemetry tracing.+ - pricing_info (dict): Information about the pricing for internal metrics (currently not used).+ - trace_content (bool): Flag indicating whether to trace the content of the response.++ Returns:+ - function: A higher-order function that takes a function 'wrapped' and returns+ a new function that wraps 'wrapped' with additional tracing and logging.+ """++ def wrapper(wrapped, instance, args, kwargs):+ """+ An inner wrapper function that executes the wrapped function, measures execution+ time, and records trace data using OpenTelemetry.++ Parameters:+ - wrapped (Callable): The original function that this wrapper will execute.+ - instance (object): The instance to which the wrapped function belongs. This+ is used for instance methods. For static and classmethods,+ this may be None.+ - args (tuple): Positional arguments passed to the wrapped function.+ - kwargs (dict): Keyword arguments passed to the wrapped function.++ Returns:+ - The result of the wrapped function call.++ The wrapper initiates a span with the provided tracer, sets various attributes+ on the span based on the function's execution and response, and ensures+ errors are handled and logged appropriately.+ """++ with tracer.start_as_current_span(gen_ai_endpoint, kind= SpanKind.CLIENT) as span:+ response = wrapped(*args, **kwargs)++ try:+ span.set_attribute(TELEMETRY_SDK_NAME, "openlit")+ span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,+ gen_ai_endpoint)+ span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,+ SemanticConvetion.GEN_AI_SYSTEM_JULEP)+ span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,+ environment)+ span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,+ application_name)+ span.set_attribute(SemanticConvetion.GEN_AI_TYPE,+ SemanticConvetion.GEN_AI_TYPE_AGENT)++ if gen_ai_endpoint == "julep.agents_create":+ span.set_attribute(SemanticConvetion.GEN_AI_AGENT_ID,+ response.id)+ span.set_attribute(SemanticConvetion.GEN_AI_AGENT_ROLE,+ kwargs.get("name", ""))+ span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_MODEL,+ kwargs.get("model", "gpt-4-turbo"))+ span.set_attribute(SemanticConvetion.GEN_AI_AGENT_CONTEXT,+ kwargs.get("about", ""))++ elif gen_ai_endpoint == "julep.task_create":+ span.set_attribute(SemanticConvetion.GEN_AI_AGENT_TOOLS,+ str(kwargs.get("tools", "")))++ elif gen_ai_endpoint == "julep.execution_create":+ span.set_attribute(SemanticConvetion.GEN_AI_AGENT_TASK_ID,+ kwargs.get("task_id", ""))+ if trace_content:+ span.add_event(+ name=SemanticConvetion.GEN_AI_CONTENT_PROMPT_EVENT,+ attributes={+ SemanticConvetion.GEN_AI_CONTENT_PROMPT:str(kwargs.get("input", "")),+ },+ )+++ span.set_status(Status(StatusCode.OK))++ # Return original response+ return response++ except Exception as e:+ handle_exception(span, e)+ logger.error("Error in trace creation: %s", e)++ # Return original response+ return response++ return wrapperdiff --git a/sdk/python/src/openlit/semcov/__init__.py b/sdk/python/src/openlit/semcov/__init__.pyindex 7cd6de82..6ecab575 100644--- a/sdk/python/src/openlit/semcov/__init__.py+++ b/sdk/python/src/openlit/semcov/__init__.py@@ -118,6 +118,7 @@ class SemanticConvetion:GEN_AI_SYSTEM_MULTION = "multion"GEN_AI_SYSTEM_DYNAMIQ = "dynamiq"GEN_AI_SYSTEM_PHIDATA = "phidata"+ GEN_AI_SYSTEM_JULEP = "julep"# Vector DBDB_REQUESTS = "db.total.requests"diff --git a/sdk/python/tests/requirements.txt b/sdk/python/tests/requirements.txtindex 09f1bf94..48ace1af 100644--- a/sdk/python/tests/requirements.txt+++ b/sdk/python/tests/requirements.txt@@ -21,6 +21,7 @@ azure-ai-inferencereka-apimultionmem0ai+julep# Vector DBschromadb@@ -42,6 +43,7 @@ tiktokentensorflowtf_kerasaiohttp+pyyaml# OpenTelemetryopentelemetry-apidiff --git a/sdk/python/tests/test_julep.py b/sdk/python/tests/test_julep.pynew file mode 100644index 00000000..59acef47--- /dev/null+++ b/sdk/python/tests/test_julep.py@@ -0,0 +1,189 @@+# pylint: disable=duplicate-code, no-name-in-module, invalid-name, global-statement+"""+This module contains tests for Julep functionality using the Julep Python library.++Tests cover various SDK functions.+These tests validate integration with OpenLIT.++Environment Variables:+ - JULEP_API_KEY: OpenAI API key for authentication.++Note: Ensure the environment is properly configured for Julep and OpenLIT monitoring+prior to running these tests.+"""++from julep import Julep+import yaml+import openlit++# Initialize synchronous Julep client+sync_client = Julep()++# Initialize environment and application name for OpenLIT monitoring+openlit.init(environment="openlit-python-testing", application_name="openlit-python-julep-test")++agent_id = None+task_id = None++TASK_YAML = """+name: Storyteller+description: Create a story based on an idea.++tools:+ - name: research_wikipedia+ type: integration+ integration:+ provider: wikipedia+ method: search++main:+ # Step 1: Generate plot idea+ - prompt:+ - role: system+ content: You are {{agent.name}}. {{agent.about}}+ - role: user+ content: >+ Based on the idea '{{_.idea}}', generate a list of 5 plot ideas.+ Go crazy and be as creative as possible.+ Return your output as a list of long strings inside ```yaml+ tags at the end of your response.+ unwrap: true++ - evaluate:+ plot_ideas: load_yaml(_.split('```yaml')[1].split('```')[0].strip())++ # Step 2: Extract research fields from the plot ideas+ - prompt:+ - role: system+ content: You are {{agent.name}}. {{agent.about}}+ - role: user+ content: >+ Here are some plot ideas for a story:+ {% for idea in _.plot_ideas %}+ - {{idea}}+ {% endfor %}++ To develop the story, we need to research for the plot ideas.+ What should we research? Write down wikipedia search queries for the plot ideas you think are interesting.+ Return your output as a yaml list inside ```yaml tags at the end of your response.+ unwrap: true+ settings:+ model: gpt-4o-mini+ temperature: 0.7++ - evaluate:+ research_queries: load_yaml(_.split('```yaml')[1].split('```')[0].strip())++ # Step 3: Research each plot idea+ - foreach:+ in: _.research_queries+ do:+ tool: research_wikipedia+ arguments:+ query: _++ - evaluate:+ wikipedia_results: 'NEWLINE.join([f"- {doc.metadata.title}: {doc.metadata.summary}" for item in _ for doc in item.documents])'++ # Step 4: Think and deliberate+ - prompt:+ - role: system+ content: You are {{agent.name}}. {{agent.about}}+ - role: user+ content: |-+ Before we write the story, let's think and deliberate. Here are some plot ideas:+ {% for idea in outputs[1].plot_ideas %}+ - {{idea}}+ {% endfor %}++ Here are the results from researching the plot ideas on Wikipedia:+ {{_.wikipedia_results}}++ Think about the plot ideas critically. Combine the plot ideas with the results from Wikipedia to create a detailed plot for a story.+ Write down all your notes and thoughts.+ Then finally write the plot as a yaml object inside ```yaml tags at the end of your response. The yaml object should have the following structure:++ ```yaml+ title: "<string>"+ characters:+ - name: "<string>"+ about: "<string>"+ synopsis: "<string>"+ scenes:+ - title: "<string>"+ description: "<string>"+ characters:+ - name: "<string>"+ role: "<string>"+ plotlines:+ - "<string>"```++ Make sure the yaml is valid and the characters and scenes are not empty. Also take care of semicolons and other gotchas of writing yaml.+ unwrap: true++ - evaluate:+ plot: "load_yaml(_.split('```yaml')[1].split('```')[0].strip())"+"""++def test_sync_create_agent():+ """+ Tests synchronous creation of agent++ Raises:+ AssertionError: If the agent creation response object is not as expected.+ """++ global agent_id++ try:+ response = sync_client.agents.create(+ name="Observability Expert",+ about="You are a AI Observability Expert.",+ )+ agent_id = response.id+ assert isinstance(agent_id, str)++ # pylint: disable=broad-exception-caught, try-except-raise+ except Exception:+ raise++def test_sync_task_create():+ """+ Tests synchronous creation of task++ Raises:+ AssertionError: If the task creation response object is not as expected.+ """++ global task_id++ try:+ task = sync_client.tasks.create(+ agent_id=agent_id,+ **yaml.safe_load(TASK_YAML)+ )+ task_id = task.id+ assert isinstance(task_id, str)++ # pylint: disable=broad-exception-caught, try-except-raise+ except Exception:+ raise++def test_sync_create_execution():+ """+ Tests synchronous creation of execution++ Raises:+ AssertionError: If the execution creation response object is not as expected.+ """++ try:+ execution = sync_client.executions.create(+ task_id=task_id,+ input={"idea": "A cat who learns to fly"}+ )+ assert isinstance(execution.id, str)++ # pylint: disable=broad-exception-caught, try-except-raise+ except Exception:+ raise