How pcfpcfpcf/straw works
Straw is a FastAPI harness for domain-specific reasoning agents, with a stated aim of enabling models to learn continuously. Its visible workflow accepts an authenticated agent request, optionally loads and compacts chat history, runs an agent against an external model API, and streams reasoning events while persisting the final messages. The harness also exposes reducer, misc-function, and direct-tool endpoints. The README describes broader learning ambitions, but the excerpts do not show a learning or model-training subsystem, nor concrete domain tool implementations.
Main entry points: domain.py Authenticated API · agent.py Agent loop · chats.py Chat history
Components 11
Harness API
- Authenticated API
core/domain.py - Reducers
core/domain.py - Misc functions
core/domain.py - Direct tool route
core/domain.py
Agent Runtime
- Agent loop
core/agent.py - Tool definitions
core/types.py - Tool executor
core/agent.py
Conversation State
- Chat history
core/chats.py - SQLite chat store
core/chats.py
Other components
- API caller
- Model API
Connections 9
- API caller → Authenticated API: sends requests
core/domain.py - Authenticated API → Reducers: dispatches reduce
core/domain.py - Authenticated API → Misc functions: dispatches misc
core/domain.py - Authenticated API → Direct tool route: routes tools
core/domain.py - Authenticated API → Agent loop: runs agent
core/domain.py - Authenticated API → Chat history: loads and appends
core/domain.py - Authenticated API → Tool executor: executes direct tool
core/domain.py - Agent loop → Model API: calls model
core/agent.py - Chat history → SQLite chat store: reads and writes
core/chats.py