Understanding AI Frameworks, Resources, and Tools: A Beginner’s Guide
- Revanth Reddy Tondapu
- Aug 10
- 3 min read
This blog explains how to choose and use AI frameworks, provide extra information (resources) to AI models, and introduce the idea of tools that let models take actions. It’s designed for beginner developers or students exploring AI, who want to understand how to set up and extend large language models (LLMs) step by step.

1. AI Frameworks: What They Are and Why They Matter
AI frameworks give you ready-made code to connect with LLMs, so you can focus on solving your problem without handling low-level API details.
No Framework (Direct API)
You write code that calls LLM APIs directly.
Pros: Full control over prompts, visibility into every step.
Cons: You manage all the glue code yourself.
Model Context Protocol (MCP)
A simple open protocol for connecting models to data and tools.
Think of it as an agreement on how prompts and responses are structured, rather than code you must import.
Lightweight Frameworks
OpenAI Agents SDK
Small library to help structure agent workflows.
Easy to learn; minimal overhead.
Crew
Lightweight with a “low-code” option using YAML configuration.
Good for quick experiments via simple files.
Heavyweight Frameworks
LangGraph
Build complex “computational graphs” of agents and tools.
Powerful but steep learning curve.
AutoGen (Microsoft)
An ecosystem of tools and abstractions for advanced agent workflows.
More concepts to learn but enables sophisticated pipelines.
Choosing a Framework depends on:
Project complexity: simple scripts vs. advanced multi-agent flows
Preferred style: direct code control vs. configuration files
Team skills and long-term maintenance
2. Resources: Enhancing Model Expertise
“Resources” simply means adding extra context—relevant data or facts—into the prompt so the AI can answer more accurately.
How to Use Resources
Gather Relevant DataExample: Ticket prices, product specs, or user manuals.
Insert Into Prompt“Here is the airline’s price list: … Please answer the customer’s question.”
Smart Retrieval (Optional)
Instead of dumping everything, first pick only the most relevant pieces (e.g., use a lightweight model to select matching ticket prices).
This approach is called RAG (Retrieval-Augmented Generation).
Real-World Analogy: Feeding an AI model a library of cookbooks (resources) lets it answer recipe questions better than relying on memory alone.
3. Tools: Giving AI the Power to Act
Tools let an AI model go beyond text responses—tools can run code, query databases, or control devices.
How Tool Calling Works
Prompt the Model with a list of available tools and instructions to reply in a structured way (usually JSON).
Model Responds specifying the tool it wants to use (e.g., "action": "fetch_ticket_price", "city": "Paris").
Your Code checks that tool request, runs the actual function (SQL query or API call), then sends the result back to the model for a final response.
Simple Example
// AI’s JSON response
{
"action": "fetch_ticket_price",
"city": "Paris"
}
Your code sees "fetch_ticket_price" → runs the query → returns price → AI completes the answer.
Everyday Analogy: Asking a virtual assistant to “turn on the lights.” The assistant says, “I’d like to use the light-control tool,” you flip the switch, and then it confirms, “Lights are on.”
4. Step-by-Step Example: Querying Ticket Prices
Step 1: Define Available Tools
tools = [
{
"name": "fetch_ticket_price",
"description": "Get flight price for a city",
"parameters": ["city"]
}
]
Explains to the model what it can ask for.
Step 2: Send Initial Prompt
prompt = """
You are a support agent. You can use:
1. fetch_ticket_price(city)
When you need to look up a flight price, reply with JSON.
User: I'd like to go to Paris. How much is a flight?
"""
Step 3: Model Requests Tool
Model replies:
{"action": "fetch_ticket_price", "city": "Paris"}
Step 4: Execute and Return
if response["action"] == "fetch_ticket_price":
price = fetch_ticket_price(response["city"])
# Then send back to the model:
follow_up = f"Ticket price to Paris is {price}."
Step 5: Final Answer
The model incorporates the price into a friendly response:“A flight to Paris costs $350. Would you like to book?”
5. Flowchart of the Process
[Start]
↓
[Send Prompt with Tools Listed]
↓
[Receive JSON from Model]
↓
{Check action field}
↓
[Execute Corresponding Function]
↓
[Send Function Result Back to Model]
↓
[Model Generates Final Reply]
↓
[End]
✅ Summary
Frameworks: Choose between no framework, lightweight (OpenAI Agents, Crew), or heavyweight (LangGraph, AutoGen) based on your needs.
Resources: Improve AI answers by providing focused context in prompts; consider retrieval techniques for large data.
Tools: Grant AIs the ability to perform actions via structured JSON calls—behind the scenes, it’s simple if-then logic.
What’s Next?
Try building a simple direct-API agent today.
Tomorrow: implement actual tool use in code to see how models decide and act in real time.
Comments