Guides / Intelligence
Run an agent with its own identity
This guide sets up an agent that works toward a goal you write. It observes your project through the API and acts through it as its own service account, so it can do exactly what the role you name allows. Every step it takes is recorded, and every call it makes is in your audit log under the agent's name.
Access is by invitation. To ask for it, write to us.
1. Give the agent a model endpoint
A chat endpoint forwards requests to the model provider you choose, with a key you keep in a Secret. The key never leaves the platform. It does not reach the agent, the model's context, an object or a log.
kubectl apply -f - <<EOF
apiVersion: secrets.etorm.com/v1alpha1
kind: Secret
metadata: {name: model-key}
spec: {type: opaque, stringData: {api-key: "$PROVIDER_KEY"}}
---
apiVersion: intelligence.etorm.com/v1alpha1
kind: InferenceEndpoint
metadata: {name: chat}
spec:
provider: {type: anthropic, credentialRef: {name: model-key}}
limits: {requestsPerMinute: 30, inputTokensPerDay: 500000}
---
apiVersion: intelligence.etorm.com/v1alpha1
kind: InferenceEndpoint
metadata: {name: embed}
spec: {kind: embedding}
EOF
With no model named, a chat endpoint uses claude-opus-5-5. An embedding endpoint with no provider uses the built-in embedder, which needs no key and costs nothing. Endpoints answer the Anthropic Messages API and the OpenAI chat completions and embeddings APIs. The model a caller names is ignored, and the endpoint's model is used.
2. Choose what the agent may do
The role you bind is the agent's set of tools, so give it the narrowest role that works. A role that grants access control, billing, projects, secret values, any /status, binding or wildcard writes is refused. If a role becomes unsafe later, the agent's binding is removed at once.
kubectl apply -f - <<EOF
apiVersion: iam.etorm.com/v1alpha1
kind: Role
metadata: {name: vpc-keeper}
spec:
rules:
- {apiGroups: [network.etorm.com], resources: [vpcs], verbs: [get, list, create, update, patch, delete]}
- {apiGroups: [intelligence.etorm.com], resources: [memories/records], verbs: [get, create]}
EOF
You need the right to bind the role yourself (project owners have it).
3. Create the agent and its memory
kubectl apply -f - <<EOF
apiVersion: intelligence.etorm.com/v1alpha1
kind: Memory
metadata: {name: notes}
spec: {embeddingEndpointRef: {name: embed}}
---
apiVersion: intelligence.etorm.com/v1alpha1
kind: Agent
metadata: {name: keeper}
spec:
goal: Keep VPC lan existing and Ready.
endpointRef: {name: chat}
roleRef: {name: vpc-keeper}
memoryRefs: [{name: notes}]
budget: {tokensPerDay: 100000, actionsPerHour: 10}
EOF
kubectl get agent keeper
kubectl get agentactions
The agent runs as serviceaccount:<project>:agent-keeper. Each action is an AgentAction with its outcome. An action its role does not allow shows as Refused with code 403.
4. Approve its actions, pause it or stop it
By default a delete waits for a person to approve it (spec.approval.requiredFrom: high). To approve or deny one, create an approval:
kubectl apply -f - <<EOF
apiVersion: intelligence.etorm.com/v1alpha1
kind: AgentApproval
metadata: {name: ok-keeper-6}
spec: {actionRef: {name: keeper-6}, decision: Approved, reason: expected change}
EOF
Only people can create approvals. An agent, or any other service account, cannot. Set spec.state to Paused to keep the agent's place without calling anything, or to Stopped to end it at once.
What the agent takes as instructions
The agent takes instructions only from your goal and instructions. Everything else it reads, such as objects, memory and the results of its own calls, is given to the model as data, marked and escaped. Every decision is checked before anything runs. Even so, text an agent reads could talk it into a delete if its role allows one. That is why deletes need approval unless you change it.