Python Implementation of TinyAgent #3046
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was a fan of the HuggingFace Blog post about TinyAgent: I think it's a cool proof-of-concept that shows the power of a simple prompt + MCP servers.
I took the JS implementation and ported it to python for Mozilla.ai's
any-agent
library via mozilla-ai/any-agent#166, and @julien-c mentioned that this code might be useful in the huggingface hub.Try it
pip install -e ".[dev,tests,mcp]" python tiny_agent.py
This is not ready to merge: I have some cleanup to do on this code and would like to better organize it, but figured I would get this PR up so that we can start the discussion. A few questions:
run_interactive
function so that you can ask it a question/chat with it?There's an issue
Relates to:
#2986
mozilla-ai/any-agent#168
mozilla-ai/any-agent#166
Bonus
If you want to run a MCP Server externally so that you can try out the SSE connection, open a python interpreter and run this script
then change my previous agent config to this: