Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.praison.ai/llms.txt

Use this file to discover all available pages before exploring further.

background

AI Agent 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

from praisonaiagents import background