BloomAI models
- AIAgent
- AIAgentAccess
- AIApproval · Internal
- AIArtifact · Internal
- AIConversation · Internal
- AIConversationMemory · Internal
- AIMessage · Internal
- AIMessageArtifact · Internal
- AIRun · Internal
- AIRunAttempt · Internal
- AIRunEvent · Internal
- AIToolCall · Internal
- MCPConnection · Internal
- MCPIntegration
Column and nullable values apply to fields stored on the model's table.
AIAgent
bloomerp.models.agents.ai_agent.AIAgent
Configure an assistant with explicit user/group grants and encrypted credentials.
Database table bloomerp_ai_agent
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
internal_tool_mode | CharField | internal_tool_mode | No | All includes newly registered tools. Selected with no tools allows none. User permissions still apply. |
internal_tools | JSONField | internal_tools | No | Stable MCP tool names. Unavailable tools cannot run. Used only when access is set to selected tools. |
internal_resource_mode | CharField | internal_resource_mode | No | All includes newly registered resources. Selected with no resources allows none. User permissions still apply. |
internal_resources | JSONField | internal_resources | No | Stable MCP resource URIs or URI templates. Unavailable resources cannot be read. Used only for selected resource access. |
name | CharField | name | No | Display name shown in the chat agent selector. |
provider | CharField | provider | No | Registered provider used to validate settings and construct the runtime. |
model_identifier | CharField | model_identifier | No | Model identifier accepted by the provider, separate from the display name. |
default_instructions | TextField | default_instructions | No | Base instructions captured when a new run starts with this agent. |
enabled | BooleanField | enabled | No | Allow permitted users to select this agent for new runs. |
credentials_encrypted | JSONField | credentials_encrypted | No | Versioned encryption metadata and encrypted provider credentials. Configure or rotate values through set_credentials; plaintext is never stored here. |
parameters | JSONField | parameters | No | Provider-validated model controls. A max_tokens parameter limits output per response, separate from the total run token budget. |
modalities | JSONField | modalities | No | Supported model inputs and outputs. Defaults to text in both directions. |
base_url | URLField | base_url | Yes | Optional provider API endpoint. Leave blank to use the provider default; exclude credentials and query parameters. |
request_timeout_seconds | PositiveIntegerField | request_timeout_seconds | No | Timeout for an individual provider request, separate from the total run duration. |
max_tokens | PositiveIntegerField | max_tokens | Yes | Maximum total input and output tokens across all attempts of one run. Leave blank for no run token limit. |
max_tool_calls | PositiveIntegerField | max_tool_calls | Yes | Maximum cumulative tool calls across all attempts of one run. Leave blank for no tool-call limit. |
max_duration_seconds | PositiveIntegerField | max_duration_seconds | Yes | Maximum cumulative execution time across all attempts of one run. Leave blank for no duration limit. |
mcp_integrations | ManyToManyField to bloomerp.MCPIntegration | — | — | Tools from enabled external integrations are available to this agent. Shared integrations use their shared connection; personal integrations require the acting user's existing connection. Missing or expired connections require reconnecting. |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
AIAgentAccess
bloomerp.models.agents.ai_agent_access.AIAgentAccess
Grant agent use without granting configuration or credential access.
Database table bloomerp_ai_agent_access
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
name | CharField | name | No | — |
all_staff_users | BooleanField | all_staff_users | No | Allow all active staff users to use this agent. |
all_authenticated_users | BooleanField | all_authenticated_users | No | Allow all active authenticated users to use this agent. |
model | ForeignKey to bloomerp.AIAgent | model_id | No | Agent that these users and groups may use. |
users | ManyToManyField to bloomerp.User | — | — | Users who may use this agent. |
groups | ManyToManyField to auth.Group | — | — | Members of these groups may use this agent. |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
AIApproval
bloomerp.models.agents.ai_approval.AIApproval
Internal model
Record who may approve a proposal and who actually decided it.
Database table bloomerp_ai_approval
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
tool_call | ForeignKey to bloomerp.AIToolCall | tool_call_id | No | — |
required_approver | ForeignKey to bloomerp.User | required_approver_id | Yes | — |
decided_by | ForeignKey to bloomerp.User | decided_by_id | Yes | — |
requirement_snapshot | AgentJSONField | requirement_snapshot | No | — |
proposal_snapshot | AgentJSONField | proposal_snapshot | No | — |
proposal_hash | CharField | proposal_hash | No | — |
status | CharField | status | No | — |
reason | TextField | reason | No | — |
expires_at | DateTimeField | expires_at | Yes | — |
decided_at | DateTimeField | decided_at | Yes | — |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
AIArtifact
bloomerp.models.agents.ai_artifact.AIArtifact
Internal model
Store one immutable file, analytics configuration, or form-patch revision.
Database table bloomerp_ai_artifact
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
conversation | ForeignKey to bloomerp.AIConversation | conversation_id | No | — |
created_by_message | ForeignKey to bloomerp.AIMessage | created_by_message_id | Yes | — |
created_by_tool_call | ForeignKey to bloomerp.AIToolCall | created_by_tool_call_id | Yes | — |
previous_revision | ForeignKey to bloomerp.AIArtifact | previous_revision_id | Yes | — |
file | ForeignKey to bloomerp.FileNode | file_id | Yes | — |
kind | CharField | kind | No | — |
schema_version | PositiveIntegerField | schema_version | No | — |
payload | AgentJSONField | payload | No | — |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
AIConversation
bloomerp.models.agents.ai_conversation.AIConversation
Internal model
Own a private transcript and its durable executions and artifacts.
Database table bloomerp_ai_conversation
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
owner | ForeignKey to bloomerp.User | owner_id | No | — |
selected_agent | ForeignKey to bloomerp.AIAgent | selected_agent_id | Yes | — |
approval_rules | JSONField | approval_rules | No | Conversation approval policy for new tool calls. Can be changed during a conversation; pending approvals still require a decision. |
title | CharField | title | No | — |
status | CharField | status | No | — |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
AIConversationMemory
bloomerp.models.agents.ai_conversation_memory.AIConversationMemory
Internal model
Store one versioned fact per conversation, tool and endpoint-defined key.
Database table bloomerp_ai_conversation_memory
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
conversation | ForeignKey to bloomerp.AIConversation | conversation_id | No | — |
tool_identifier | CharField | tool_identifier | No | — |
key | CharField | key | No | — |
payload | AgentJSONField | payload | No | — |
version | PositiveIntegerField | version | No | — |
source_tool_call | ForeignKey to bloomerp.AIToolCall | source_tool_call_id | No | — |
expires_at | DateTimeField | expires_at | Yes | — |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
AIMessage
bloomerp.models.agents.ai_message.AIMessage
Internal model
Store one ordered transcript entry, optionally produced by a run.
Database table bloomerp_ai_message
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
conversation | ForeignKey to bloomerp.AIConversation | conversation_id | No | — |
run | ForeignKey to bloomerp.AIRun | run_id | Yes | — |
sequence | PositiveBigIntegerField | sequence | No | — |
role | CharField | role | No | — |
content_blocks | AgentJSONField | content_blocks | No | — |
status | CharField | status | No | — |
schema_version | PositiveIntegerField | schema_version | No | — |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
AIMessageArtifact
bloomerp.models.agents.ai_message_artifact.AIMessageArtifact
Internal model
Attach a particular immutable artifact revision to a message position.
Database table bloomerp_ai_message_artifact
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
message | ForeignKey to bloomerp.AIMessage | message_id | No | — |
artifact | ForeignKey to bloomerp.AIArtifact | artifact_id | No | — |
position | PositiveIntegerField | position | No | — |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
AIRun
bloomerp.models.agents.ai_run.AIRun
Internal model
Persist one task across inline or worker attempts, waits, and retries.
Database table bloomerp_ai_run
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
conversation | ForeignKey to bloomerp.AIConversation | conversation_id | No | — |
trigger_message | ForeignKey to bloomerp.AIMessage | trigger_message_id | Yes | — |
initiated_by | ForeignKey to bloomerp.User | initiated_by_id | No | — |
trigger_type | CharField | trigger_type | No | — |
trigger_context | AgentJSONField | trigger_context | No | — |
agent_key | CharField | agent_key | No | — |
agent_version | CharField | agent_version | No | — |
config_snapshot | AgentJSONField | config_snapshot | No | — |
status | CharField | status | No | — |
origin_browser_context | AgentJSONField | origin_browser_context | Yes | — |
checkpoint | AgentJSONField | checkpoint | Yes | — |
checkpoint_runtime | CharField | checkpoint_runtime | No | — |
checkpoint_version | PositiveIntegerField | checkpoint_version | No | — |
consumed_message_sequence | PositiveBigIntegerField | consumed_message_sequence | No | — |
wait_condition | AgentJSONField | wait_condition | Yes | — |
resume_after | DateTimeField | resume_after | Yes | — |
cancel_requested_at | DateTimeField | cancel_requested_at | Yes | — |
budgets | AgentJSONField | budgets | No | — |
usage | AgentJSONField | usage | No | — |
error | AgentJSONField | error | Yes | — |
finished_at | DateTimeField | finished_at | Yes | — |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
AIRunAttempt
bloomerp.models.agents.ai_run_attempt.AIRunAttempt
Internal model
Record a leased inline or worker execution, ending on pause or termination.
Database table bloomerp_ai_run_attempt
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
run | ForeignKey to bloomerp.AIRun | run_id | No | — |
number | PositiveIntegerField | number | No | — |
execution_mode | CharField | execution_mode | No | — |
executor_id | CharField | executor_id | No | — |
status | CharField | status | No | — |
lease_token | UUIDField | lease_token | No | — |
lease_expires_at | DateTimeField | lease_expires_at | No | — |
heartbeat_at | DateTimeField | heartbeat_at | No | — |
started_at | DateTimeField | started_at | No | — |
finished_at | DateTimeField | finished_at | Yes | — |
usage | AgentJSONField | usage | No | — |
error | AgentJSONField | error | Yes | — |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
AIRunEvent
bloomerp.models.agents.ai_run_event.AIRunEvent
Internal model
Append an event to a run, optionally emitted by a particular attempt.
Database table bloomerp_ai_run_event
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
run | ForeignKey to bloomerp.AIRun | run_id | No | — |
attempt | ForeignKey to bloomerp.AIRunAttempt | attempt_id | Yes | — |
sequence | PositiveBigIntegerField | sequence | No | — |
event_type | CharField | event_type | No | — |
schema_version | PositiveIntegerField | schema_version | No | — |
payload | AgentJSONField | payload | No | — |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
AIToolCall
bloomerp.models.agents.ai_tool_call.AIToolCall
Internal model
Track a logical tool action independently of executor retries.
Database table bloomerp_ai_tool_call
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
run | ForeignKey to bloomerp.AIRun | run_id | No | — |
first_dispatch_attempt | ForeignKey to bloomerp.AIRunAttempt | first_dispatch_attempt_id | Yes | — |
tool_identifier | CharField | tool_identifier | No | — |
tool_version | CharField | tool_version | No | — |
tool_title | CharField | tool_title | No | — |
provider_call_id | CharField | provider_call_id | No | — |
idempotency_key | UUIDField | idempotency_key | No | — |
status | CharField | status | No | — |
arguments | AgentJSONField | arguments | No | — |
proposal_hash | CharField | proposal_hash | No | — |
result | AgentJSONField | result | Yes | — |
error | AgentJSONField | error | Yes | — |
started_at | DateTimeField | started_at | Yes | — |
finished_at | DateTimeField | finished_at | Yes | — |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
MCPConnection
bloomerp.models.agents.mcp_connection.MCPConnection
Internal model
Associate private credentials with a shared integration or one user.
Database table bloomerp_mcp_connection
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
integration | ForeignKey to bloomerp.MCPIntegration | integration_id | No | — |
user | ForeignKey to bloomerp.User | user_id | Yes | — |
credentials_encrypted | JSONField | credentials_encrypted | No | — |
status | CharField | status | No | — |
last_checked_at | DateTimeField | last_checked_at | Yes | — |
expires_at | DateTimeField | expires_at | Yes | — |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
MCPIntegration
bloomerp.models.agents.mcp_server.MCPIntegration
External MCP server configuration independent of an account.
Describe an external server independently of its account credentials.
Database table bloomerp_mcp_integration
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
name | CharField | name | No | — |
endpoint_url | URLField | endpoint_url | No | — |
enabled | BooleanField | enabled | No | — |
connection_mode | CharField | connection_mode | No | — |
authentication_type | CharField | authentication_type | No | — |
oauth_client_id | CharField | oauth_client_id | No | Optional pre-registered OAuth client ID. Leave blank for automatic client registration. |
oauth_scopes | CharField | oauth_scopes | No | Optional space-separated OAuth scopes; a server challenge takes precedence. |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
