Description This is an anthropic AI agent that analyzes CSV data and generates new rows based on analysis results. The agent uses OpenAI's Sonnet model to generate text and Docker to containerize the application.
Features
- Analyzer Agent: Analyzes a given CSV file, identifying its structure, patterns, and meaning.
- Generator Agent: Generates new CSV rows based on analysis results and sample data.
- Docker Containerization: The agent is packaged in a Docker container for easy deployment and management.
Prerequisites
- Python 3.11 or higher
- Docker installed
- Annotated Types, Anthropic, AnyIO, Certifi, and other dependencies (listed below)
Dependencies
See requirements.txt
file for the list of dependencies.
How to Use
- Run the Docker container:
docker run -it <image_name>
- Pass a CSV file as an argument to the agent:
<agent_name> analyze <csv_file>
- Generate new CSV rows based on analysis results and sample data:
<agent_name> generate <num_rows>
Code Structure
The project consists of the following files:
prompts.py
: Defines system and user prompts for the analyzer and generator agents.agents.py
: Contains the implementation of the analyzer and generator agents.Dockerfile
: Builds a Docker image for the agent..pylintrc
: Configures Python linter settings.
Additional Information
For more information on how to use the agents or customize their behavior, refer to the code comments and prompts in prompts.py
and agents.py
.
I hope this helps! Let me know if you have any further questions.