An agent is a hosted bot that runs in Allternit’s cloud for one of your accounts. You set what it says and does; Allternit runs it. Scope agents.

Runtime rules

The rules run only when the request sets runtime. A save without runtime is never refused for it, and keeps the stored runtime. When runtime is set, the answer is 422 with one of these codes: With runtime: "allternit" the brain it will run (the model in the request, or the stored one) is checked with the same runtime rules every Allternit app uses (see Runtimes). allternit runs every provider’s models and takes every provider’s plan, so these two codes can’t come from a Platform agent today. They are listed for the day other runtimes run here:
Limits. Sandbox projects can have 3 agents (agent_limit_reached; deleting one frees its slot). Live projects have no cap; agents after the first 3 are billed per agent per month (see Usage). Isolation. A key bound to an account creates agents in that account and can only see that account’s agents; another account’s agent answers 404 agent_not_found, as if it didn’t exist.

Tools

Each conversation runs with every tool denied except the ones in the agent’s tools list (plus looking people up and noting facts about them, which every agent has). The model can’t reach an unlisted tool, and the hosted runtime checks the list again before a tool runs.

Texting and calling

Bind a number to an agent and it can text and call from that number. Bind it with agent_id on POST /v1/numbers, or with PATCH /v1/numbers/{id} (see Numbers). The agent then gets the send_text and call tools, if they are in its tools list. An agent with no bound number has nothing to send from. With more than one bound number, the agent names the one to use, or the tool refuses with number_required. The tools follow the same rules as POST /v1/texts and POST /v1/calls: consent, STOP opt-outs, a card on file, the monthly spend cap and metering. A refusal comes back to the agent as a plain sentence, and the conversation keeps going. Autonomy decides what happens before the send:
  • draft: the agent writes the text but never sends it.
  • ask: the first attempt raises an approval and nothing is sent. The turn ends, and GET /v1/responses/{id} reads requires_action. After you approve it, send a new response with previous_response_id. The agent’s next attempt sends exactly the text you approved, even if the model words it differently. One approval allows one send; the next text raises a new approval.
  • tell: the agent sends, then reports.
  • limits: the agent sends within the daily limits, then asks.
A denied approval is not reported to the agent. Its next attempt raises a new approval. When a tool refuses (no channel connected, a file type the agent can’t read), the agent gets a plain sentence saying why and passes it on; the conversation keeps going.

Model keys

To run an agent on your own Anthropic, OpenAI or xAI account, store the project’s key once and set the agent’s model to provider/model. Scope agents; not for account-bound keys. Keys are encrypted at rest. The project’s hosted runtime gets the key before the agent’s next message. To rotate a key, PUT the new one: the next message uses it. An agent on a provider model with no key for it answers model_key_missing when you send it a message. Errors use the standard format: invalid_name, invalid_instructions, invalid_greeting, greeting_missing_ai_disclosure, invalid_model, invalid_voice, invalid_tool, tool_not_available (calendar, transfer), invalid_autonomy, invalid_transfer_target, invalid_business_hours, invalid_metadata, missing_account_id, account_not_found, agent_not_found, agent_limit_reached, insufficient_scope; model keys: invalid_provider, invalid_api_key, model_key_not_found, model_keys_unavailable.