Workspace layout
Key dependencies
Data flow
- The browser sends a user message to
/api/chatvia NDJSON stream. - The server route sanitizes input (PII), logs with correlation IDs, and creates or resumes a Pi session.
- The Pi server module invokes Amazon Bedrock through a circuit breaker.
- Streaming events (
start,delta,tool,done,error) flow back to the client. - The client hydrates messages from the Pi session file on reload and opens supporting resources/workspace panels on demand.
- Supporting endpoints expose models, resources, workspace files, sessions, and health checks.
- Durable agent context lives in
agent-workspace/, including project memory, plans, artifacts, and workspace-installed Pi resources.