> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emidat.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using AI Agents

Our API is built with agentic use in mind and we strongly encourage experimentation with them to streamline your own workflows on the Emidat platform.

This guide walks you through an example of a tedious task made simple by connecting a coding agent to Emidat through our API.

This guide will use [Claude Code](https://claude.com/de/product/claude-code) as a coding agent. Similar principles apply for other tools like [OpenAI Codex](https://openai.com/codex/), [Pi](https://pi.dev/) or [OpenCode](https://opencode.ai/?ref=grigio.org).

## Set up a workspace for your project

In our experience coding agents work best if you create a project directory that can contain their work. For instance, this will allow your agent to save scripts it writes, read input files and write output files. To get started, simply create an empty directory with just a single file:

<Tree>
  <Tree.File name=".env" />
</Tree>

You can use the `.env` file to store the API key you use to authenticate with the Emidat API:

```text theme={"dark"}
EMIDAT_API_KEY=emidat-{key_id}-{secret}
```

## Teach your agent how to use our API

We offer a Model Context Protocol (MCP) server that your agent can use to teach itself how to use the Emidat API. You can install it with the following command:

```text theme={"dark"}
claude mcp add --transport http emidat-docs https://docs.emidat.com/mcp
```

You can also point your agent to our skill file in your prompt if you do not want to configure an MCP connection:

```
Use this skill to understand the Emidat API: https://docs.emidat.com/skill.md
```

## Ask your agent to solve the issue

At this point you are fully set up to ask your agent to create a bespoke automation for the task you require, you could for instance ask it to do the following:

```text theme={"dark"}
We have rebranded from SmallCo to BigCo. Our product instances currently all
contain "SmallCo" in their names. Write a script that replaces "SmallCo" with
"BigCo" in all of our product instances.

Use this skill to understand the Emidat API: https://docs.emidat.com/skill.md
The file ".env" contains the required API key.
```
