Skip to main content
Acontext batches messages before processing to reduce LLM costs.

When Processing Happens

Buffer full: When unprocessed messages reach PROJECT_SESSION_MESSAGE_BUFFER_MAX_TURNS Idle timeout: When no new messages for PROJECT_SESSION_MESSAGE_BUFFER_TTL_SECONDS

Force Processing

client.sessions.flush(session_id)

Check Status

status = client.sessions.messages_observing_status(session_id)
print(f"Observed: {status.observed}")
print(f"In Process: {status.in_process}")
print(f"Pending: {status.pending}")
  • Observed: Fully processed
  • In Process: Currently being analyzed
  • Pending: Waiting in buffer

Next Steps

Settings

Customize buffer behavior