This section of the documentation is currently work in progress. Please check back soon for updates.

Agent logs

Agent logs are available via both the CLI and Dashboard. You can view logs for a specific agent by running the following command:

pcc agent logs my-agent

This command accept various filters to help you narrow down the logs you are looking for. For example, you can filter logs by severity level:

pcc agent logs my-agent -l ERROR

Session logging

We recommend using the loguru library for logging within your agent. This will ensure any logging within your agent associated to the session it is running in.

from loguru import logger

async def bot():
	logger.info("Hello, world!") # will be associated with the session id

If you are handling logging manually, you can obtain the active session ID from the PipecatSessionArguments object (or subclass alternative) passed to your bot() method:

from pipecatcloud.agent import PipecatSessionArguments

async def bot(args: PipecatSessionArguments):
	session_id = args.session_id

See the Session Arguments reference for more additional SessionArgument types.