> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# background • AI Agent SDK

> Background Agents Module for PraisonAI Agents.

# background

<Badge color="blue">AI Agent</Badge>

Background Agents Module for PraisonAI Agents.

Provides the ability to run agents in the background, allowing:

* Long-running tasks without blocking
* Task queuing and management
* Progress monitoring and notifications
* Graceful cancellation

Zero Performance Impact:

* All imports are lazy loaded via **getattr**
* Background processing only when explicitly started
* No overhead when not in use

Usage:
from praisonaiagents.background import BackgroundRunner, BackgroundTask

# Create a background runner

runner = BackgroundRunner()

# Submit a task

task = runner.submit(
agent=my\_agent,
prompt="Research AI trends",
callback=on\_complete
)

# Check status

print(task.status)  # "running", "completed", "failed"

# Wait for completion

result = await task.wait()

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import background
```
