:wave: Hello all -- after much development, <@U02...
# marvin-ai
j
šŸ‘‹ Hello all -- after much development, @Nate just (quietly) released Marvin 3.0, which you could also think of as ControlFlow 1.0. While we are releasing it for testing, it still needs some work (and, in particular, has no published docs yet and its database [yes, it ships with DB support] has no migrations at this time). Therefore we will not be announcing it widely for a bit while we continue building it and readying it for prod. Marvin 3.0 combines ControlFlow's stateful, agentic engine with Marvin's focus on high-level ambient AI functions. Existing Marvin users will be able to compose functions together into
threads
for the first time; existing ControlFlow users will find a variety of "out-of-the-box" entrypoints and a generally streamlined experience. Both sets of users will find their core APIs almost -- but not entirely -- untouched. One of the major motivations here is to replatform from LangChain to our partners at PydanticAI. Almost all functionality is in place except for full streaming support, which is just landing in PAI this week (at least, in the manner that Marvin requires) and will be added to Marvin soon. In the meantime it is probably time to start kicking the Marvin tires if you haven't already and please open an issue for anything you find!
b
Excited to poke around with marvin3! My questions: • is it possible to see the logs of all of the prompts/commands sent to the LLM? I am using the default from the examples and am curious to see the prompts sent to and response from the LLM. • Is the relationship to Prefect still the same? Any tips/tricks on programmatically invoking a flow. For example, if we wanted to use slack as the interface, programmatically reacting to an event/message. Very excited to see this moving forward!
j
Great! there are a couple ways to get the history, and we'll be streamlining this more. Here's a quick demo:
Copy code
import marvin

marvin.run('say hi')

thread = marvin.thread.get_last_thread()

thread.get_messages()
get_last_thread()
is a convenience utility (while in a thread you can also use
get_current_thread()
, and if you provided a thread object or id to mavin.run, you can simply re-hydrate that
Thread
with that ID). Once you have the thread, you can access a lot of its history from the DB. note this shows that right now we are being overly (maybe even needlessly) verbose in our "info messages"!
catjam 1
The relationship to Prefect is different than ControlFlow (and Marvin 2 had no strict relationship). ControlFlow imported Prefect and automatically instrumented everything with Prefect. This created overhead and undesired outcomes for people who just wanted the most straightforward approach. So instead, Marvin 3 focuses on being much more functional (in a programming if not actual sense) such that you can decorate any marvin function as a prefect flow or task and it should "just work", or include Marvin inside other flows/tasks without issue.
upvote 1
b
Oh very cool. Thanks for the quick reply!
šŸ‘ 1