#python#agents#ai#framework#llm#openai#python
The OpenAI Agents SDK is a Python framework that lets you easily build and connect AI agents—smart programs that can talk, use tools, and work together to solve tasks[2][3]. You can turn any Python function into a tool an agent can use, set up safety checks to control what agents do, and automatically pass tasks between different agents when needed[2][4]. The SDK manages conversation history for you, so agents remember past interactions, and it includes tools to track and debug how agents make decisions[2]. This makes it simple to create reliable, customizable AI helpers for things like customer support, research, or automation, with clear oversight and fast development.
https://github.com/openai/openai-agents-python
🚀 Вышел стабильный JavaScript движок от Google для Android
Новая стабильная библиотека Jetpack JavaScript Engine позволит разработчикам выполнять JS код в изолированной и ограниченной среде.
class MainActivity : ComponentActivity() {
// Теперь nullable, без lateinit
private var jsSandbox: JavaScriptSandbox? = null
private var jsIsolate: JavaScriptIsolate? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!JavaScriptSandbox.isSupported()) {
Log.e("JS", "JavaScriptSandbox не поддерживается")
return
}
lifecycleScope.launch {
// Создаём и сохраняем в nullable-поле
jsSandbox = JavaScriptSandbox
.createConnectedInstanceAsync(applicationContext)
.await()
jsIsolate = jsSandbox?.createIsolate()
// При выполнении гарантируем, что jsIsolate != null
val result: String = jsIsolate
?.evaluateJavaScriptAsync(JS_SCRIPT_SCRING)
?.await()
?: "Ошибка: isolate не инициализирован"
Log.d("JS", "Результат выполнения: $result")
}
}
override fun onDestroy() {
super.onDestroy()
// Закрываем только если не null
jsIsolate?.close()
jsSandbox?.close()
}
}
#jetpack#js