Skip to content

Latest commit

 

History

History
161 lines (118 loc) · 4.24 KB

File metadata and controls

161 lines (118 loc) · 4.24 KB

🚀 Quick Setup Guide

Repository: https://github.com/kython220282/AgenticAI-MVP-Project-Template

Before You Start - Required Actions

This template requires some setup before it will work. Follow these steps:

✅ Step 0: Get the Template

# Clone the repository
git clone https://github.com/kython220282/AgenticAI-MVP-Project-Template.git
cd AgenticAI-MVP-Project-Template

Or click "Use this template" on GitHub.

✅ Step 1: Environment Variables (REQUIRED)

# Copy the example environment file
cp .env.example .env  # Mac/Linux
copy .env.example .env  # Windows

Then edit .env and add your API keys:

# Choose your LLM provider and add the key
OPENAI_API_KEY=sk-your-actual-key-here
# OR
ANTHROPIC_API_KEY=sk-ant-your-actual-key-here

✅ Step 2: Implement LLM Integration (REQUIRED)

Open agents/base.py and find the SimpleLLMAgent.execute() method (around line 103).

Replace the placeholder with your actual LLM call:

For OpenAI:

def execute(self, task: str, context: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
    self.add_to_memory({"type": "task", "content": task, "context": context})
    
    # Actual OpenAI implementation
    from openai import OpenAI
    client = OpenAI(api_key=config.OPENAI_API_KEY)
    
    response = client.chat.completions.create(
        model=config.OPENAI_MODEL,
        messages=[
            {"role": "system", "content": self.system_prompt},
            {"role": "user", "content": task}
        ]
    )
    
    output = response.choices[0].message.content
    
    result = {
        "agent": self.name,
        "task": task,
        "output": output,
        "status": "success"
    }
    
    self.add_to_memory({"type": "result", "content": result})
    return result

For Anthropic:

def execute(self, task: str, context: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
    self.add_to_memory({"type": "task", "content": task, "context": context})
    
    # Actual Anthropic implementation
    from anthropic import Anthropic
    client = Anthropic(api_key=config.ANTHROPIC_API_KEY)
    
    response = client.messages.create(
        model=config.ANTHROPIC_MODEL,
        system=self.system_prompt,
        messages=[{"role": "user", "content": task}]
    )
    
    output = response.content[0].text
    
    result = {
        "agent": self.name,
        "task": task,
        "output": output,
        "status": "success"
    }
    
    self.add_to_memory({"type": "result", "content": result})
    return result

✅ Step 3: Install Dependencies

pip install -r requirements.txt

# Install your chosen LLM provider SDK
pip install openai  # For OpenAI
# OR
pip install anthropic  # For Anthropic

✅ Step 4: Test Your Setup

# Run a basic example
python examples/basic_agent.py

# Or start the web dashboard
python run_server.py

What Files Need User Action?

File What You Need To Do Required?
.env Add your API keys ✅ YES
agents/base.py Implement LLM call in SimpleLLMAgent.execute() ✅ YES
main.py Customize for your use case Optional
tools/implementations.py Add custom tools Optional
api/app.py Customize API endpoints Optional

Common Issues

"No API key found"

  • Did you copy .env.example to .env?
  • Did you add your actual API key (not the placeholder)?

"Module not found: openai/anthropic"

  • Run: pip install openai or pip install anthropic

"Agent returns placeholder output"

  • You haven't implemented the LLM call in agents/base.py
  • Follow Step 2 above

"Import errors with utils"

  • Make sure you have utils/__init__.py and utils/helpers.py
  • Restart your Python language server

Next Steps

Once you've completed the setup:

  1. ✅ Verify everything works with python examples/basic_agent.py
  2. 📖 Read QUICKSTART.md for detailed usage
  3. 🎨 Customize agents and tools for your domain
  4. 🚀 Build your agentic AI application!

Need Help?