Skip to Content
Getting StartedCore Concepts

Core Concepts

Understanding these fundamental concepts will help you get the most out of AiQarus.

The TDAO Loop

Every AiQarus agent operates using a structured reasoning loop called TDAO: Think, Decide, Act, Observe.

┌─────────────────────────────────────────────────────────┐ │ │ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │ THINK │────▶│ DECIDE │────▶│ ACT │────▶│ OBSERVE │ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │ │ │ │ │ │ ▼ ▼ ▼ ▼ │ [Analyze] [Choose] [Execute] [Summarize] │ │ │ ├── Complete ──▶ Exit │ ├── Continue ──▶ Loop ─────────────┘ │ └── Fail ──────▶ Exit with Error └─────────────────────────────────────────────────────────┘

Phase Descriptions

PhaseWhat HappensOutput
ThinkAgent analyzes the current situation, considering the original input and any previous observationsReasoning trace
DecideBased on analysis, choose: Continue (with action), Complete (with output), or Fail (with error)Decision + rationale
ActExecute the decided action (tool call, API request, etc.)Action result
ObserveSummarize results to inform the next iterationObservation summary

Why TDAO Matters

Unlike black-box AI systems, TDAO provides:

  • Transparency: Every step of reasoning is recorded
  • Debuggability: When something goes wrong, you can trace exactly where
  • Auditability: Regulators can review the decision-making process
  • Reproducibility: Same inputs produce same reasoning paths

Audit Trails & Hash Chaining

Every action in AiQarus creates a trace event that is cryptographically chained to the previous event.

How It Works

Trace 1 ──▶ Trace 2 ──▶ Trace 3 ──▶ Trace 4 │ │ │ │ ▼ ▼ ▼ ▼ Hash A ◀── Hash B ◀── Hash C ◀── Hash D (includes (includes (includes Hash A) Hash B) Hash C)

Each trace contains:

  • Event Type: What happened (step_started, tool_executed, decision_made, etc.)
  • Payload: Full details of the event
  • Timestamp: When it occurred
  • Previous Hash: Link to the prior trace
  • Current Hash: SHA-256 of all trace data + previous hash

Verification

To verify an audit trail:

  1. Load all traces for a run
  2. Recompute each hash from the trace data
  3. Verify each hash matches and chains correctly

If any trace has been modified, the entire chain becomes invalid.

Agent Lifecycle

Agents progress through defined states:

DRAFT ──▶ ACTIVE ──▶ DEPRECATED ──▶ ARCHIVED │ │ │ │ │ └── Still viewable, not runnable │ └── Superseded by new version └── Editable, not runnable
StateEditableRunnableVersionable
DraftYesNoNo
ActiveNoYesYes
DeprecatedNoNoNo
ArchivedNoNoNo

Once an agent is activated, its definition becomes immutable. This ensures that audit trails always reference the exact configuration that was used.

Multi-Tenancy

AiQarus is designed for enterprise multi-tenancy:

Platform └── Organization (Tenant) └── Project └── Agent └── Run └── Step └── Trace

Data Isolation

  • Every entity has an org_id field
  • Database queries always filter by organization
  • No cross-tenant data access is possible
  • API keys are scoped to organizations

Human-in-the-Loop

Agents can be configured to pause for human approval:

Interactivity Modes

ModeBehaviorUse Case
AutonomousNever pause, execute all actionsLow-risk, high-volume
Key DecisionsPause for high-risk actions onlyStandard workflows
ConversationalFrequent checkpointsSensitive processes

Decision Points

When an agent encounters a high-risk action, it creates a decision point:

┌─────────────────────────────────────────────┐ │ 🛑 APPROVAL REQUIRED │ │ │ │ Action: Revoke admin access │ │ Risk Level: HIGH │ │ │ │ [✓ Approve] [✗ Deny] [⚡ Escalate] │ └─────────────────────────────────────────────┘

Memory System

Agents have access to a 5-level hierarchical memory system:

LevelScopeLifespanUse Case
WorkingSingle runUntil run completesCurrent task context
Short-termSingle agentHours to daysRecent task history
EpisodicSingle agentPermanentPast run experiences
SemanticSingle agentPermanentFacts and knowledge
OrganizationalAll agentsPermanentShared company knowledge

Learn more in the Memory System section.