This project is a comprehensive, progressive exploration of Agentic AI using IBM's BeeAI Framework — one of the most advanced open-source frameworks for building production-grade AI agent systems.
Across 12 progressive tasks, the project builds from basic LLM calls
to sophisticated multi-agent systems with specialized roles, tool
orchestration, human-in-the-loop controls, custom tools, and
RequirementAgent execution control — all powered by IBM Watsonx,
Llama-4 Maverick, Granite, and GPT-5 Nano.
Domain: Agentic AI — BeeAI Framework
Language: Python 3.11
LLMs: IBM Granite 3.3 · Meta Llama-4 Maverick · OpenAI GPT-5 Nano
Platform: IBM Watsonx.ai
BeeAI-Agent-Systems/
│
├── t1.py # Watsonx.ai environment setup
├── t2.py # Basic LLM chat — Granite 3.3 8B
├── t3.py # Prompt templates with variables
├── t4.py # Structured output with Pydantic
├── t5.py # Minimal RequirementAgent (no tools)
├── t6.py # Agent + WikipediaTool + Trajectory
├── t7.py # Agent + ThinkTool + WikipediaTool
├── t8.py # Controlled execution with Requirements
├── t9.py # Force reasoning after every tool call
├── t10.py # Human-in-the-loop (AskPermission)
├── t11.py # Custom tool creation (Calculator)
├── t12.py # Multi-agent travel planning system
└── README.md
| Component | Technology |
|---|---|
| Agent Framework | BeeAI Framework |
| LLM 1 | IBM Granite 3.3 8B Instruct (Watsonx) |
| LLM 2 | Meta Llama-4 Maverick 17B 128E FP8 (Watsonx) |
| LLM 3 | OpenAI GPT-5 Nano |
| Platform | IBM Watsonx.ai |
| Data Validation | Pydantic BaseModel |
| Memory | UnconstrainedMemory |
| Middleware | GlobalTrajectoryMiddleware |
| Tools | WikipediaTool · ThinkTool · OpenMeteoTool · HandoffTool |
| Async | asyncio |
Configure IBM Watsonx.ai credentials and project ID for Skills Network labs
llm = ChatModel.from_name("watsonx:ibm/granite-3-3-8b-instruct",
ChatModelParameters(temperature=0))
messages = [SystemMessage(...), UserMessage(...)]
response = await llm.create(messages=messages)Simple chat with IBM Granite 3.3 8B — business idea brainstorming
# Custom mustache-style template engine
template = SimplePromptTemplate("Project: {{project_name}}, Problem: {{business_problem}}")
rendered = template.render({"project_name": "ML Classifier", ...})Dynamic prompt rendering for data science project evaluation
class BusinessPlan(BaseModel):
business_name: str
elevator_pitch: str
target_market: str
revenue_streams: List[str]
key_success_factors: List[str]
response = await llm.create_structure(schema=BusinessPlan, messages=messages)GPT-5 Nano generates typed, validated business plans
agent = RequirementAgent(
llm=llm, # Llama-4 Maverick
tools=[], # No tools
memory=UnconstrainedMemory(),
instructions=SYSTEM_INSTRUCTIONS
)
result = await agent.run(ANALYSIS_QUERY)Pure LLM cybersecurity analysis — no tools baseline
agent = RequirementAgent(
llm=llm,
tools=[WikipediaTool()],
middlewares=[GlobalTrajectoryMiddleware(included=[Tool])],
requirements=[ConditionalRequirement(WikipediaTool, max_invocations=2)]
)Research-enhanced agent with full tool usage tracking
agent = RequirementAgent(
tools=[ThinkTool(), WikipediaTool()], # Reasoning + Research
requirements=[
ConditionalRequirement(ThinkTool, max_invocations=2),
ConditionalRequirement(WikipediaTool, max_invocations=2)
]
)Structured reasoning alongside Wikipedia research
requirements=[
ConditionalRequirement(
ThinkTool,
force_at_step=1, # Must think first
min_invocations=1, # At least once
max_invocations=3, # Maximum 3 times
consecutive_allowed=False # No repeated thinking
),
ConditionalRequirement(WikipediaTool, ...)
]Declarative control over tool execution order and behavior
ConditionalRequirement(
ThinkTool,
force_at_step=1,
force_after=Tool, # Think after EVERY tool call
min_invocations=1,
max_invocations=5,
consecutive_allowed=False
)Mandatory reasoning step after each tool invocation
requirements=[
ConditionalRequirement(ThinkTool, force_at_step=1, ...),
AskPermissionRequirement(WikipediaTool) # Human approval required!
]Production-ready security — human must approve external tool access
class SimpleCalculatorTool(Tool[CalculatorInput, ToolRunOptions, StringToolOutput]):
name = "SimpleCalculator"
description = "Performs basic arithmetic calculations"
input_schema = CalculatorInput
async def _run(self, input: CalculatorInput, ...) -> StringToolOutput:
result = self._safe_calculate(input.expression)
return StringToolOutput(f"Result: {result}")Build custom BeeAI tools from scratch with Pydantic input validation
# Agent 1 — Destination Research Expert
destination_expert = RequirementAgent(
tools=[WikipediaTool(), ThinkTool()], ...)
# Agent 2 — Weather & Logistics Specialist
weather_agent = RequirementAgent(
tools=[OpenMeteoTool(), ThinkTool()], ...)
# Agent 3 — Language & Culture Expert
language_expert = RequirementAgent(
tools=[HandoffTool(...), ThinkTool()], ...)
# Coordinated multi-agent travel planning pipeline3-agent specialized system with handoff coordination
| Concept | Implementation |
|---|---|
| ChatModel | from_name() — Watsonx, OpenAI backends |
| RequirementAgent | Core BeeAI agent with tool + memory + requirements |
| ConditionalRequirement | Declarative tool execution control |
| AskPermissionRequirement | Human-in-the-loop approval |
| GlobalTrajectoryMiddleware | Full tool call tracking |
| UnconstrainedMemory | Persistent conversation memory |
| WikipediaTool | External research capability |
| ThinkTool | Structured reasoning steps |
| OpenMeteoTool | Real-time weather data |
| HandoffTool | Agent-to-agent communication |
| Custom Tool | Full BeeAI Tool class from scratch |
| Structured Output | create_structure() + Pydantic |
| Prompt Templates | Mustache-style variable rendering |
- BeeAI Framework — complete agent architecture
- IBM Watsonx.ai integration — Granite + Llama-4 Maverick
- Progressive agent capability building (no tools → multi-agent)
- Declarative execution control with Requirements system
- Human-in-the-loop AI design with AskPermissionRequirement
- Custom tool development with Pydantic validation
- Multi-agent coordination with HandoffTool
- Tool usage trajectory tracking and middleware
- Structured LLM output with Pydantic BaseModel
- Custom prompt template engine
- Async Python — asyncio throughout
- Real-world use cases: Cybersecurity, Business Planning, Travel
| Certification | Issuer | Platform |
|---|---|---|
| IBM Data Science Professional Certificate | IBM | Coursera |
| IBM Generative AI Professional Certificate | IBM | Coursera |
| IBM RAG and Agentic AI Professional Certificate | IBM | Coursera |