Agentic AI out of the box
Cogency makes it dead simple to build multi-step reasoning agents. No complex configurations, no verbose setup - just clean, extensible agents that work.
from cogency.agent import Agent
from cogency.llm import GeminiLLM
from cogency.tools.calculator import CalculatorTool
from cogency.tools.web_search import WebSearchTool
llm = GeminiLLM(api_key="your-key")
agent = Agent(name="MyAgent", llm=llm, tools=[CalculatorTool(), WebSearchTool()])
result = agent.run("What is 15 * 23?", enable_trace=True)
print(result["response"])
- Zero config - Agents in 6 lines of code
- Auto-discovery - Drop tools in /tools/ and they just work
- Clean tracing - See exactly what your agent is thinking
- Multi-step reasoning - Built-in plan → reason → act → reflect → respond loop
- Extensible - Add new LLMs and tools easily
- Python - Full-featured implementation
- JavaScript - Coming soon
# Python
pip install cogency
# JavaScript (coming soon)
npm install cogency
- Python Documentation
- JavaScript Documentation (coming soon)
> What is 64/6?
🤖 64 divided by 6 is approximately 10.67.
--- Execution Trace (ID: 6e84519b) ---
PLAN | The user is asking a division problem, requires calculation.
REASON | TOOL_CALL: calculator(operation='divide', num1=64, num2=6)
ACT | calculator -> {'result': 10.666666666666666}
REFLECT | Division calculation completed successfully.
RESPOND | 64 divided by 6 is approximately 10.67.
--- End Trace ---
MIT License - see LICENSE for details.
We welcome contributions! See CONTRIBUTING.md for guidelines.