Praison AI
Enterprise
Agents
Bot
Use Cases
University
Docs
How the agent loop works
Run
from praisonai import Agent, tool @tool def stock_count(item: str) -> int: """Return remaining warehouse units for an item.""" return {'keyboard': 14, 'mouse': 3}.get(item.lower(), 0) agent = Agent( instructions='Always check stock_count before answering inventory questions.', tools=[stock_count], ) print(agent.start('How many mice are left in stock?'))
Press Run. The result appears here.
Esc
Search in
All
Docs
University