This was started off of the reflex example but meant to be run locally.
To start, either run models locally or create ssh tunnel to remote Ollama models
ssh -L 11434:localhost:11434 -N ollamaservereither set the env variables or use the included .env.sample:
❯ mise run show:secrets
[show:secrets] $ cat .env
JINA_API_KEY = "[redacted]"
SERPAPI_API_KEY = "[redacted]"
FIRECRAWL_API_KEY = "[redacted]"
in another terminal, start the reflex server:
uv run reflex run- Use
pydantic_aifor LLM interactions, allows multiple agents/providers which should be configurable through the app. - Migrate to self-hosted alternative to jinaai and serpai, possible either a model or some alternative like:
- https://github.com/dzhng/deep-research
- typescript and cli
- https://github.com/epuerta9/deep-research-py/
- python and cli
- pydantic/pydantic-ai#901
- https://github.com/assafelovic/gpt-researcher
- python, predates Deep Research
- https://huggingface.co/blog/open-deep-research
- If using Ollama, the models context length is likely to be the default for many model (2048). To extend the model to longer context which is necessary for various parts of this system to work. There is a simple helper script to extend the model in
deepre/utils/ollama_helper.pyand eventually that should be moved into a check done automatically that runs before the model is loaded. - Using the
result_typeargument ofrun/agentdoesnt seem to work when trying to cast the result for the models used. Should ideally be fixed but no obvious ways I've tried have worked. - Should move the tool usage and delegation to agent delegation
- I am deciding if i should use toml for the templates or python files that i can define the
result_typefor the agent/model in as well. - Toml is nice since simplifies
