🔧 Highly Extensible

Unlimited
customization

Extend every aspect of Cogency. Build custom tools, override reasoning steps, create specialized agents—all with the same zero-config simplicity.

Custom Tools in Minutes

Create powerful tools with just a few lines of code

tools/database_tool.py
 from cogency.tools.base import BaseTool import sqlite3 class DatabaseTool(BaseTool): def __init__(self): super().__init__( name="database_query", description="Execute SQL queries on the database" ) async def run(self, query: str): # Your database logic here conn = sqlite3.connect("app.db") result = conn.execute(query).fetchall() return "data": result # That's it! Auto-discovered and ready to use 

Instantly available! Drop this file in your tools/ directory and your agent can now query databases naturally.

What You Can Extend

Custom Tools

  • • API integrations
  • • Database connections
  • • File operations
  • • External services
  • • Domain-specific logic

Reasoning Nodes

  • • Custom plan strategies
  • • Specialized reasoning
  • • Domain-specific actions
  • • Custom reflection logic
  • • Response formatting

LLM Providers

  • • Custom model APIs
  • • Local model hosting
  • • Specialized prompting
  • • Custom streaming
  • • Model routing

Advanced: Custom Reasoning Node

Override the reasoning process for specialized behavior

nodes/domain_reasoning.py
 from cogency.nodes.reason import reason from cogency.types import AgentState async def medical_reasoning(state: AgentState): """Custom reasoning for medical diagnosis agents.""" # Add medical-specific reasoning patterns medical_context = """ Consider differential diagnosis: 1. Most common conditions first
					2. Rule out serious conditions 3. Consider patient history and
					symptoms """ # Enhance the reasoning with domain knowledge enhanced_state = state.copy() enhanced_state["medical_context"] = medical_context # Call the standard reasoning with enhancements return await reason(enhanced_state) # Register your custom node agent.workflow.add_node("reason", medical_reasoning) 

Growing Plugin Ecosystem

🌐

Web Tools

Scraping, APIs, automation

📊

Data Tools

Analysis, visualization, ML

🏢

Enterprise

CRM, ERP, workflows

🤖

AI Tools

Vision, audio, specialized models

Ready to Extend Cogency?

Build custom tools and extend every aspect of Cogency's architecture