Skip to content

Commit

Permalink
Monorepo Conversion (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
jzanecook committed Nov 21, 2023
1 parent 82a339c commit 17052b5
Show file tree
Hide file tree
Showing 47 changed files with 10,889 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/js-sdk-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and Publish JS SDK Package

on:
push:
tags: [js-sdk-v*]

permissions:
contents: write

jobs:
publish:
name: Build and publish SDK to NPM
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
cache: npm
cache-dependency-path: package-lock.json

- name: Install dependencies
working-directory: ./packages/sdk/js/
run: npm ci

- name: Publish package
run: npm publish --access=public
working-directory: ./packages/sdk/js/
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
47 changes: 47 additions & 0 deletions .github/workflows/python-client-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and Publish Python Agent Client Package

on:
push:
tags: [python-client-v*]

permissions:
contents: write

jobs:
publish:
name: Build and publish the Python package
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./packages/client/python/
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Build Package
run: poetry build

- name: Config Poetry
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- name: Publish Package
run: poetry publish

- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
47 changes: 47 additions & 0 deletions .github/workflows/python-sdk-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and Publish Python SDK Package

on:
push:
tags: [python-sdk-v*]

permissions:
contents: write

jobs:
publish:
name: Build and publish the Python package
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./packages/sdk/python/
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Build Package
run: poetry build

- name: Config Poetry
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- name: Publish Package
run: poetry publish

- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ your agent:

It has also a few additional routes for listing the tasks, steps and downloading / uploading artifacts.

### [SDK](https://github.com/AI-Engineer-Foundation/agent-protocol-sdk-python/tree/main)
### [SDK](https://github.com/AI-Engineer-Foundation/agent-protocol/tree/main/packages/sdk)

This is our implementation of the protocol. It’s a library that you can use to build your agent. You can use it, or you can implement it on your own. It’s up to you.

Expand All @@ -84,7 +84,7 @@ builders to build their agents and the SDK should solve the rest.
Basically it wraps your agent in a web server that allows for communication with
your agent (and in between agents in the future).

### [Client](https://github.com/AI-Engineer-Foundation/agent-protocol-client-python)
### [Client](https://github.com/AI-Engineer-Foundation/agent-protocol/tree/main/packages/client)

This library should be used by the users of the agents. Your agent is deployed somewhere and the users of your agent can use this library to interact with your agent.

Expand Down
3 changes: 3 additions & 0 deletions packages/client/python/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.PHONY: generate
generate:
./scripts/generate.sh
15 changes: 15 additions & 0 deletions packages/client/python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Agent Communication Protocol - Python Client

Python client for Agent Communication Protocol. This client simplifies the communication with the agent.

## Installation

```bash
pip install agent-protocol-client
```

## Getting Started

You can find simple usage in the example [here](./examples/minimal.py).

For more functionalities look at the [API docs](./docs/AgentApi.md).
40 changes: 40 additions & 0 deletions packages/client/python/agent_protocol_client/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding: utf-8

# flake8: noqa

"""
Agent Communication Protocol
Specification of the API protocol for communication with an agent. # noqa: E501
The version of the OpenAPI document: v0.2
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
"""


__version__ = "1.0.0"

# import apis into sdk package
from agent_protocol_client.api.agent_api import AgentApi

# import ApiClient
from agent_protocol_client.api_response import ApiResponse
from agent_protocol_client.api_client import ApiClient
from agent_protocol_client.configuration import Configuration
from agent_protocol_client.exceptions import OpenApiException
from agent_protocol_client.exceptions import ApiTypeError
from agent_protocol_client.exceptions import ApiValueError
from agent_protocol_client.exceptions import ApiKeyError
from agent_protocol_client.exceptions import ApiAttributeError
from agent_protocol_client.exceptions import ApiException

# import models into sdk package
from agent_protocol_client.models.artifact import Artifact
from agent_protocol_client.models.step import Step
from agent_protocol_client.models.step_all_of import StepAllOf
from agent_protocol_client.models.step_request_body import StepRequestBody
from agent_protocol_client.models.task import Task
from agent_protocol_client.models.task_all_of import TaskAllOf
from agent_protocol_client.models.task_request_body import TaskRequestBody
4 changes: 4 additions & 0 deletions packages/client/python/agent_protocol_client/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# flake8: noqa

# import apis into api package
from agent_protocol_client.api.agent_api import AgentApi
Loading

0 comments on commit 17052b5

Please sign in to comment.