❱ Agents
The Majestix AI Inference Hub agent system provides scheduled, server-side AI task execution with integrated tool use. Agents are autonomous routines that run on a defined schedule, invoke LLMs, call external APIs, and deliver results -- all without user intervention after initial configuration.
Key Concepts
Tasks
A task is a Firestore document that defines what an agent does, how it runs, and when it runs. Each task includes:
A system prompt and task prompt that instruct the LLM.
A model selection (any model available on the platform).
A schedule expressed as a cron string.
A set of tools the agent is permitted to use.
A list of integrations (approved external APIs) the agent can access.
Credentials stored as an encrypted subcollection, injected at runtime.
Tasks are owned by a user and billed against that user's credit balance.
Executions
An execution is a record of a single run of a task. Every time the scheduler fires, the executor creates an execution document that captures:
execution_id
Unique identifier
task_id
Parent task reference
status
running, completed, failed, timeout, killed
started_at
Timestamp of execution start
completed_at
Timestamp of execution end
iterations
Number of agentic loop iterations consumed
credits_used
Total credits charged for the execution
tool_calls
Array of tool invocations and their results
output
Final agent output text
error
Error message, if any
Integrations
Integrations are the approved API registry. The platform operates on a default-deny model: an agent can only make outbound HTTP requests to domains that belong to a registered integration. There are 18 pre-seeded integrations spanning analytics, social media, email, productivity, finance, data, and search categories. Administrators can add or deprecate integrations at any time.
Tools
Agents have access to 4 built-in tools:
api_call
Authenticated HTTP requests (GET, POST, PUT, DELETE) with automatic credential injection
http_get
Unauthenticated HTTPS GET to approved integration domains
http_post
Unauthenticated HTTPS POST for webhook-style calls
webhook
POST to pre-registered webhook URLs associated with the task
Tools are explicitly enabled per task. An agent cannot invoke a tool that is not listed in its task configuration.
Architecture
The agent executor runs as a separate Cloud Run service in its own GCP project (inference-agents), isolated from the main API (inference-platform). This project-level separation provides a hard security boundary between the platform that serves user requests and the system that executes autonomous agent actions with external API credentials.
Credits are charged through the main API. The executor calls /internal/agent/code on the main API, which deducts credits from the task owner's balance.
Pre-Built Agents
The platform ships with 50+ pre-built agent templates covering common use cases:
Market intelligence -- crypto price briefings, portfolio alerts, whale movement tracking.
Social media automation -- scheduled posts, engagement reports, cross-platform publishing.
Data pipelines -- API-to-spreadsheet syncs, daily report generation, RSS digest compilation.
Monitoring -- uptime checks with Slack/Discord alerts, API health dashboards.
Research -- news aggregation, competitor tracking, sentiment analysis.
Users can deploy a pre-built agent with minimal configuration (supply credentials and adjust the schedule) or create fully custom agents from scratch.
Next Steps
How It Works -- step-by-step execution flow and plan limits.
Creating Agents -- task configuration, ensemble, and swarm modes.
Credentials -- encrypted credential storage and injection.
Integrations -- the approved API registry.
Tools -- built-in tool reference and schemas.
Security -- 8-layer defense-in-depth architecture.
Last updated
