Scope:
praisonaiagents Python API, main branch. Test paths are relative to src/praisonai-agents/. Source of truth is the code plus the listed tests — if a docstring disagrees with this page, trust the test, then fix whichever is stale.If your app disagrees with a row, check the Sharp edge column and reproduce on the real call path before filing a bug.
Quick Start
- Streaming
- Memory Prefetch
- Structured Output
- Teams & Handoff
- AG-UI
How to Use This Page
1
Find the knob
Locate the API in the matching section below.
2
Run the listed test
From the SDK’s
src/praisonai-agents/ directory: PYTHONPATH=. python -m pytest <test> -q3
Read the result
Test fails: likely an SDK defect, open a bug. Test passes but behavior differs: it is a sharp edge or a new bug.
1. Chat & Streaming
Streaming is configured throughoutput=, not a constructor kwarg. Agent(stream=True) raises TypeError with the hint “streaming moved into output=; use output=OutputConfig(stream=True).” agent.stream is False unless output="stream" or OutputConfig(stream=True) is used.
2. Memory Prefetch & Scope
Prefetch recalls relevant long-term memories into the prompt before each turn.3. Structured Output
output_pydantic / output_json are per-call chat() / achat() kwargs (forwarded by start() / run()) and Task fields — not Agent constructor params. There is no output_json_schema. Native response_format is used when the model supports structured outputs; otherwise the schema is appended to the prompt as text.
4. Teams & Handoff
Teams run tasks in order; handoffs let one agent delegate to another.5. AG-UI
AG-UI exposes an agent as a FastAPI router that streams events over SSE.Best Practices
Check for None after chat()
Check for None after chat()
chat() returns None on blocked runs and most LLM failures instead of raising.Verify structured output with isinstance
Verify structured output with isinstance
chat(output_pydantic=...) returns the raw string on parse failure, so confirm the type before use.Run the pinned test first
Run the pinned test first
A passing test with differing behavior points to a sharp edge, not an SDK defect.
Keeping This Page in Sync
Any PR that changes the behavior of a listed API should update the matching row (and its test) here and in the upstream copy atsrc/praisonai-agents/docs/sdk-behavior-matrix.md.
Related
Streaming
Stream tokens as they arrive
Memory Prefetch
Recall memories before each turn
Structured Output
Get typed results from agents
Multi-Agent Output
Control team output
AG-UI Server
Serve agents over AG-UI
Handoff
Delegate between agents

