---
title: "How Tarka works: your coding agent sets it up, Tarka runs it"
description: "How your coding agent sets up an agent on Tarka, how your product calls it, and how the blocks fit together for one agent and for a whole application."
url: "https://tarkahq.com/how-it-works/"
---

How it works

# Your coding agent sets it up. Tarka runs it.

Connect Claude Code, Codex or the Tarka CLI once. From then on your coding agent sets up what an agent needs in production, from its host and models to sandboxes, storage and Git, on one account with one bill.

[Create an account](https://tarkahq.com/console?auth=signup) [Read the docs](https://tarkahq.com/docs/)

## From a prompt to a running agent.

What happens between connecting your coding agent and an agent answering its first message, here for a running coach.

1. ### Connect your coding agent

   Install the Tarka CLI, or add Tarka’s MCP server to Claude Code or Codex. One sign-in covers both.
2. ### Describe the agent

   Tell your coding agent what the agent should do and where people reach it. It picks a template or writes a Compose stack, and chooses the model.
3. ### It sets up the blocks

   Buckets, Git repositories and sandbox templates are created in your Tarka account, each with its own keys and limits.
4. ### Tarka hosts the agent

   The agent runs on a host of its own in US East, priced before it starts, and calls Tarka’s models without an API key of its own.
5. ### Run it and change it

   Change a setting and apply it again, or open a shell on the host. Every part reports to one usage record and one bill.

```text
> Put my running coach on Tarka: Hermes on
  GLM-5.3 Flash, answering on WhatsApp.
 
- tarka_list_agent_host_templates
- tarka_create_storage_bucket coach-files
- tarka_create_agent_host coach, as a dry run
  US East, priced by the hour
- tarka_create_agent_host coach
- tarka_get_agent_host_gateway_pairing whatsapp
  scan the code to link the coach to WhatsApp
- tarka_get_usage_summary
```

```bash
curl -fsSL https://tarkahq.com/install.sh | sh
tarka login
# the blocks it needs
tarka buckets create coach-files
tarka git create coach
# its host, priced before it starts
tarka hosts create coach --template hermes \
  --model glm-5.3-flash-eu
# look inside, and see what it costs
tarka hosts shell coach
tarka usage
```

## Build agents into your own software.

Your product keeps its code, users and screens. The agent runs behind it, on Tarka.

Your product’s interface talks to its backend. The backend sends requests to your agent on Tarka with your user’s ID, and the agent makes tool calls back into your API with its own login. The agent runs on an agent host, and the blocks it uses are on the same Tarka account: models, sandboxes, agent templates, storage and Git, speech and OCR, and usage and limits.

Your product

**Your interface** Where users talk to the agent

**Your backend** Sign-in, data and business rules

Tarka

**Your agent** On an agent host: your code or a template, always on, at its own address.

On the same account

- [Models](https://tarkahq.com/inference/#language-models)
- [Sandboxes](https://tarkahq.com/compute/#sandboxes)
- [Agent templates](https://tarkahq.com/compute/#hosted-agents)
- [Storage and Git](https://tarkahq.com/data/)
- [Speech and OCR](https://tarkahq.com/inference/#speech-and-documents)
- [Usage and limits](https://tarkahq.com/pricing/)

1. Step 1

   ### Define it

   Your code as container images in a Compose file, or a ready template.
2. Step 2

   ### Wire it in

   Tools for your API, and its own login with limited rights.
3. Step 3

   ### Call it

   From your backend over HTTPS, or call models at tarka.rest/v1.
4. Step 4

   ### Keep clients apart

   One workspace per client, with its own keys, limits and usage.

Any stack works: if it can make an HTTPS call, it can talk to your agent.

## Start with one API. Add the runtime your workload needs.

Your coding agent sets up the blocks through MCP. They call each other with your account’s credentials and report to one usage record.

ExampleAn order fulfillment agent

- Called at run time
- A live request
- Set up by your coding agent
- How a block is sized and metered

## Build the application. Embed agents anywhere in it.

Agents can sit in your product, run in the background or work inside software you already use. Give each user a private copy, or share one agent across a group.

ExampleAn online store with four agents

- Called at run time
- Where an agent plugs in
- Yours, outside Tarka
- How a block is sized and metered

1. ### In your product

   The storefront’s chat calls the store’s API, which calls the assistant, so the agent is part of the app rather than a widget beside it.
2. ### One copy per user

   Each signed-in customer gets their own copy of the shopping assistant, with its own memory and sandbox, so nothing one customer says reaches another.
3. ### Shared by a group

   Each group gets one agent host with its own key, storage, secrets and list of users, so customers share the support agent while the warehouse team has its own.
4. ### In the background

   The fulfillment agent picks up each new order from a webhook, checks stock in a nightly batch job and writes status back through the store’s API.
5. ### In software you already use

   Connectors reach Zendesk, Gmail, NetSuite and Slack with the permissions you set, and a client tool lets the store’s own code issue the refund.

## Connect your coding agent and build your first agent.

Sign up, then request the products you need from the console.

[Create an account](https://tarkahq.com/console?auth=signup) [Read the docs](https://tarkahq.com/docs/)
