Documentation Index
Fetch the complete documentation index at: https://spacesail.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The README Generator Agent is an intelligent automation tool that creates comprehensive, professional README files for open source projects. This agent leverages the power of AI to analyze GitHub repositories and generate well-structured documentation automatically.
Code
cookbook/examples/agents/readme_generator.py
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.github import GithubTools
from agno.tools.local_file_system import LocalFileSystemTools
readme_gen_agent = Agent(
model=OpenAIChat(id="gpt-5-mini"),
name="Readme Generator Agent",
tools=[GithubTools(), LocalFileSystemTools()],
markdown=True,
instructions=[
"You are readme generator agent",
"You'll be given repository url or repository name from user."
"You'll use the `get_repository` tool to get the repository details."
"You have to pass the repo_name as argument to the tool. It should be in the format of owner/repo_name. If given url extract owner/repo_name from it."
"Also call the `get_repository_languages` tool to get the languages used in the repository."
"Write a useful README for a open source project, including how to clone and install the project, run the project etc. Also add badges for the license, size of the repo, etc"
"Don't include the project's languages-used in the README"
"Write the produced README to the local filesystem",
],
)
readme_gen_agent.print_response(
"Get details of https://github.com/agno-agi/agno", markdown=True
)
Usage
Create a virtual environment
Open the Terminal and create a python virtual environment.python3 -m venv .venv
source .venv/bin/activate
Set your API key
export OPENAI_API_KEY=xxx
export GITHUB_ACCESS_TOKEN=xxx
Install libraries
pip install -U agno PyGithub
Run Agent
python cookbook/examples/agents/readme_generator.py