This is a POC to explore the ergonomics of using AgentStack.
I decided to build a tool that scrapes the users' timeline, identifies salient tweets based on the user's interests and proposes drafts to those tweets.
- Most Twitter scraping libraries are dusted. The lone survivor is twikit. Don't dare think of rolling it yourself - just look at the guts of the login method to get an idea of how much work it does to bypass their bot detection.
- Firecrawl will pre-emptively block scraping Twitter and Reddit
- Using
kickoff_for_eachappeared to break the observability as this message was repeatedly thrown:🖇 AgentOps: Could not record event. Start a session by calling agentops.start_session(). - Logging output was surpressed for the code running inside custom tools, would like to figure out a way to get that back.
- It was v useful to see the input tokens and output token counts in the traces.
-
The agent and task taxonomy isn't necessary for simple flows and you're sometimes better off just calling the tools directly. Realizing this I stopped trying to force the Twitter stuff in CrewAI primitives and just invoked it before calling run.
-
Almost always favour using the
output_pydanticoroutput_jsonover natural language expected output alone. It wasn't obvious that expected_output was required in addition to these fields and could use guidance on what to specify besides maybe explaining the pydantic class. -
It wasn't obvious how to map the output of one task to spawn multiple instance of another task.
-
I don't think the list of available models is comprehensive (from the agent gen cli) I couldn't find gpt-4o-mini in the list.
poetry installpoetry shell- To run your project, use the following command:
crewai runorpython src/main.py - To replay tasks from the last run, use the following command:
crewai replay <task_id>
Replace <task_id> with the ID of the task you want to replay.
If you need to reset the memory of your crew before running it again, you can do so by calling the reset memory feature:
crewai reset-memory
This will clear the crew's memory, allowing for a fresh start.