Function Calling (Tools)
Overview
OpenRegister supports function calling (also known as tools), enabling AI agents to perform actions and retrieve information from the system. Agents can manage registers, schemas, objects, applications, and other agents through natural language.
⚠️ Provider Support
| Provider | Function Calling Support | Status |
|---|---|---|
| OpenAI | ✅ Fully Supported | Excellent |
| Ollama | ✅ Supported | Good with compatible models |
| Fireworks AI | ❌ Not Implemented | Use OpenAI or Ollama |
🎯 Recommended Models for Tool-Oriented Agents
For agents that need to use tools (function calling), model selection is critical. Not all models support function calling reliably.
Ollama Models - Function Calling Performance
| Model | Function Calling | Performance | Recommended For |
|---|---|---|---|
| mistral-nemo | ⭐⭐⭐⭐⭐ Excellent | Fast, reliable tool execution | RECOMMENDED for all tool agents |
| llama3.2:3b | ⭐⭐⭐ Good | Lightweight, decent tool support | Basic tool usage, resource-constrained |
| llama3.1:8b | ⭐⭐⭐⭐ Very Good | Reliable function calling | Alternative to mistral-nemo |
| mistral:7b | ⭐⭐ Fair | Inconsistent tool calling | NOT recommended for tools |
| qwen2:0.5b | ⭐ Poor | Minimal function support | Only for chat, not tools |
| phi3:mini | ⭐⭐ Fair | Limited tool support | NOT recommended for tools |
Installation
To install Mistral Nemo (recommended for tool agents):
docker exec openregister-ollama ollama pull mistral-nemo
Agent Configuration
For tool-oriented agents, configure:
{
'provider': 'ollama',
'model': 'mistral-nemo',
'temperature': 0.3,
'tools': ['opencatalogi.cms', 'openregister.objects']
}
Why Mistral Nemo?
- ✅ Reliable function execution - Consistently calls tools when appropriate
- ✅ Proper parameter handling - Correctly formats function arguments
- ✅ Low hallucination - Doesn't invent functions or parameters
- ✅ Fast inference - Reasonable speed even on CPU
- ✅ Good context retention - Remembers conversation history well
⚠️ Important Notes
Function calling is NOT yet implemented for Fireworks AI. If you want to use tools, you must:
- Configure OpenAI or Ollama as your chat provider
- Use a function-calling compatible model (see table above)
- Ensure your agent is configured with at least one tool
- Test with natural language commands (e.g., 'List all applications')
For Ollama users: We strongly recommend mistral-nemo for any agent that needs to use tools. Other models may describe what they would do instead of actually executing functions.
Available Tools
1. Register Tool (openregister.register)
Manage registers (collections of schemas and objects).
Capabilities:
- List all accessible registers
- Get register details by ID or slug
- Create new registers
- Update register configuration
- Delete registers
Example queries:
- 'Show me all registers'
- 'What is in the products register?'
- 'Create a new register called customers'
2. Schema Tool (openregister.schema)
Manage schemas (define object structure and validation).
Capabilities:
- List all accessible schemas
- Get schema details including properties
- Create new schemas
- Update schema configuration
- Delete schemas
Example queries:
- 'List all schemas in the products register'
- 'Show me the person schema'
- 'Create a schema for orders with fields: id, customer, total'
3. Objects Tool (openregister.objects)
Manage objects (data records conforming to schemas).
Capabilities:
- Search and filter objects
- Get object details
- Create new objects
- Update existing objects
- Delete objects
Example queries:
- 'Find all persons named John'
- 'Show me object 123 from the products register'
- 'Create a new product with name: Widget, price: 10'
4. Application Tool (openregister.application)
Manage applications (software modules in your organisation).
Capabilities:
- List all accessible applications
- Get application details
- Create new applications
- Update application configuration
- Delete applications
Example queries:
- 'List all applications'
- 'What applications are available?'
- 'Create an application called HR Portal'
5. Agent Tool (openregister.agent)
Manage AI agents (self-management capability).
Capabilities:
- List all accessible agents
- Get agent configuration
- Create new agents
- Update agent settings
- Delete agents
Example queries:
- 'Show me all agents'
- 'Create a support agent for customer questions'
- 'What is the configuration of agent X?'
Configuration
Enabling Tools for an Agent
- Navigate to Settings → AI → Agents
- Edit or create an agent
- Select the tools you want to enable (e.g., 'Application Management')
- Save the agent
Testing Function Calling
- Ensure you are using OpenAI or Ollama (NOT Fireworks AI)
- Create or edit an agent and enable at least one tool
- Start a conversation with the agent
- Ask the agent to perform an action:
- 'List all applications'
- 'Create a register called test'
- 'Show me schema 5'