You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Long-running servers can stop the wrapper's background async loop explicitly:
343
+
344
+
```python
345
+
from praisonai._async_bridge import shutdown
346
+
347
+
# On SIGTERM / server stop
348
+
shutdown()
349
+
```
350
+
351
+
`shutdown()`is also registered via `atexit`, so it runs automatically on interpreter exit. Call it manually when you need deterministic cleanup (flushing telemetry exporters, closing async HTTP/DB clients) before the process exits.
As of recent PraisonAI versions, the `PRAISONAI_ALLOW_LOCAL_TOOLS` gate is enforced consistently across the CLI (`praisonai run`), YAML workflows, and Python (`AgentsGenerator`) entry points. Previously it was only enforced on one path.
108
+
107
109
**Usage Example**:
108
110
```python
109
111
from praisonaiagents import Agent
@@ -185,6 +187,22 @@ server = BrowserServer(host="0.0.0.0", port=8080)
185
187
server.start()
186
188
```
187
189
190
+
### PRAISONAI_RUN_SYNC_TIMEOUT
191
+
192
+
Default maximum seconds the wrapper's sync-to-async bridge will wait for a coroutine to complete.
193
+
194
+
**Default:**`300` (5 minutes)
195
+
196
+
```bash
197
+
# Tighten for latency-sensitive servers
198
+
export PRAISONAI_RUN_SYNC_TIMEOUT=30
199
+
200
+
# Loosen for long-running batch jobs
201
+
export PRAISONAI_RUN_SYNC_TIMEOUT=3600
202
+
```
203
+
204
+
Applies to every `praisonai` CLI entry and wrapper-based server (gateway, a2u, mcp_server, scheduler). The SDK (`praisonaiagents`) uses a separate bridge — see [Async Bridge](/docs/features/async-bridge).
0 commit comments