# Developing

This assumes you already [installed the SDK](broken://pages/DYDEfcEH0s318CRml8Y3) and set [things up for development](broken://pages/dgNgdggTF2qhMJEsIv5K#setting-up-the-server-for-development).

## Set Up Your Connection

You should start with setting up your connection. First, adjust your `Options` and `Secrets` so that you collect the necessary information for connecting to the external system you want to integrate with.

For example:

```python
from pydantic import BaseModel
from integrations_sdk.server import start_workflow_server


class Options(BaseModel):
    baseUrl: str


class Secrets(BaseModel):
    apiKey: str

app = start_workflow_server(
    "fns",
    "http://localhost:9000",
    "engine-api-key",
    Options,
    Secrets,
    dev_mode=True # Set to true.
)
```

## Test Creating Your Connection

[Start the server](broken://pages/dgNgdggTF2qhMJEsIv5K#starting-the-server) and go to <http://localhost:8000/docs>

You will be presented with the API documentation where you can test your server.

Creating a connection is done using the `POST /connections` endpoint:

Store the connection ID you get back and then close the server.

## Adding an Action

Let's add an [action](https://github.com/ebbot-ai/external-docs/blob/main/actions.md) by creating the directory `fns`, then create the file `fns/actions.py` and add the following action:

```python
from pydantic import BaseModel, Field
from integrations_sdk.component import workflow_action

class Result(BaseModel):
    result: str

@workflow_action(
    description="Hello world",
    result=Result,
    display_name="Say hello",
    docs="How the say_hello action works",
    arguments={}
)
def say_hello() -> Result:
    return Result(result=f"Hello world!")
```

Restart the server and head to <http://localhost:8000/docs> again. You will see a new endpoint, `POST /connections/{connection_id/call/say_hello`. Go ahead and try it out (with the ID of the connection you created in the first step):

## Read More

Check the documentation on [actions](https://github.com/ebbot-ai/external-docs/blob/main/actions.md) and [triggers](https://github.com/ebbot-ai/external-docs/blob/main/triggers/README.md) to read more.


---

# 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.ebbot.ai/ebbot-docs/developer-resources/ebbot-automations/integrations-sdk/developing.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.
