# Services

Services are the main unit of organization in the AssemblyLift framework. Primarily, they serve as a logical grouping of related [functions](/learn-assemblylift/functions.md).

## Make a New Service

You can create a new service in an existing AssemblyLift application via the `make` command:

```
$ asml make service myservice
```

This will create a directory under `services/` named `myservice` containing a default `service.toml` manifest.

In order for a service to be recognized by `cast`, it must be listed in the application manifest `assemblylift.toml`.

{% code title="assemblylift.toml" %}

```
[project]
name = "my-amazing-project"

[services]
default = { name = "myservice" }
```

{% endcode %}

## The Service Manifest

Each service is defined by its manifest, `service.toml`.

{% code title="service.toml" %}

```
# Each service must have a service table
[service]
name = "service-name" # A name is required

# The API table contains functions and authorizers
[api.functions.function-id]
name = "function-name" # A name is required

[api.authorizers.authorizer-id]
auth_type = "type"

# The IOmod table defines service dependencies
[iomod.dependencies.dependency-id]
version = "x.x.x"
coordinates = "organization.namespace.name"
```

{% endcode %}

The service manifest defines the service's API, as well as an IOmods we wish to use in our service's functions. Each section of the service manifest is described in greater detail in the following sections.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.assemblylift.akkoro.io/learn-assemblylift/services.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
