Getting Started
Lifecycle
A flow launched with Launch
response runs through the following states:
The Launch
requires the following arguments:
- request (
fastAPI.Request
) - entry_point (
str
orcallable
) - inputs (
Any
)
Example:
The following example launches a CrewAI Crew
in hymn.app
with core.Launch
.
Events
In the lifetime of a flow execution the following events are tracked.
event | description | method | screen |
---|---|---|---|
meta | flow metadata and entry point information | (internal) | n/a |
inputs | user input data | (internal) | Input |
agent | agent information | agent meta data | n/a |
debug | debug message | debug | Log |
stdout | stdout information | print, sys.stdout | Log |
stderr | stderr information | sys.stderr | Log |
status | flow status change | (internal) | n/a |
error | error information | (internal) | Output/Reasoning/Log |
action | action information | tool result | Reasoning |
result | task result information | result | Reasoning |
final | final result information | final result | Ouput |
Kodosumi provides a couple of helper methods to simplify emitting events:
tracer.debug(message: str)
- emit debug plain text messagetracer.result(message: Any)
- emit result objecttracer.action(message: Any)
- emit action result objecttracer.markdown(message: str)
- emit markdown result stringtracer.html(message: str)
- emit HTML result stringtracer.text(message: str)
- emit plain text result string
The corresponding synchronous methods are
tracer.debug_sync(message: str)
tracer.result_sync(message: Any)
tracer.action_sync(message: Any)
tracer.markdown_sync(message: str)
tracer.html_sync(message: str)
tracer.text_sync(message: str)