Skip to content

Commit

Permalink
Merge branch 'dev' into f/api-call-tool
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorrr authored Oct 3, 2024
2 parents 9df45af + 2d62857 commit fb32a44
Show file tree
Hide file tree
Showing 4 changed files with 446 additions and 24 deletions.
114 changes: 113 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,115 @@ To contribute code changes:

Please ensure your code follows the existing style and passes all tests.

## Project Overview and Architecture

### Key Components

1. **agents-api**: The core API service for Julep.
2. **typespec**: API specifications and contracts.
3. **integrations-service**: Handles external integrations.
4. **embedding-service**: Manages text embeddings.
5. **memory-store**: Handles persistent storage.
6. **llm-proxy**: Proxy for language model interactions.
7. **scheduler**: Manages task scheduling.
8. **gateway**: API gateway and routing.
9. **monitoring**: System monitoring and metrics.

### Technology Stack

- **FastAPI**: Web framework for building APIs
- **TypeSpec**: API specification language
- **Cozo**: Database system
- **Temporal**: Workflow engine
- **Docker**: Containerization

### Relationships Between Components

The `agents-api` serves as the central component, interacting with most other services:
- It uses `typespec` definitions for API contracts.
- Communicates with `integrations-service` for external tool interactions.
- Utilizes `embedding-service` for text processing.
- Stores data in `memory-store`.
- Interacts with language models through `llm-proxy`.
- Uses `scheduler` for task management.
- All API requests pass through the `gateway`.
- `monitoring` observes the entire system.

## Understanding the Codebase

To get a comprehensive understanding of Julep, we recommend exploring the codebase in the following order:

1. **Project Overview**
- Read `README.md` in the root directory
- Explore `docs/` for detailed documentation

2. **System Architecture**
- Examine `docker-compose.yml` in the root directory
- Review `deploy/` directory for different deployment configurations

3. **API Specifications**
- Learn about TypeSpec: https://typespec.io/docs/
- Explore `typespec/` directory:
- Start with `common/` folder
- Review `main.tsp`
- Examine each module sequentially

4. **Core API Implementation**
- Learn about FastAPI: https://fastapi.tiangolo.com/
- Explore `agents-api/` directory:
- Review `README.md` for an overview
- Examine `routers/` for API endpoints
- Look into `models/` for data models

5. **Database and Storage**
- Learn about Cozo: https://docs.cozodb.org/en/latest/tutorial.html
- Review `agents-api/README.md` for database schema
- Explore `agents-api/models/` for database queries

6. **Workflow Management**
- Learn about Temporal: https://docs.temporal.io/develop/python
- Explore `agents-api/activities/` for individual workflow steps
- Review `agents-api/workflows/task_execution/` for main workflow logic

7. **Testing**
- Examine `agents-api/tests/` for test cases

8. **Additional Services**
- Explore other service directories (`integrations-service/`, `embedding-service/`, etc.) to understand their specific roles and implementations

## Contributing Guidelines

1. **Set Up Development Environment**
- Clone the repository
- Install Docker and Docker Compose
- Set up necessary API keys and environment variables

2. **Choose an Area to Contribute**
- Check the issue tracker for open issues
- Look for "good first issue" labels for newcomers

3. **Make Changes**
- Create a new branch for your changes
- Write clean, well-documented code
- Ensure your changes adhere to the project's coding standards

4. **Test Your Changes**
- Run existing tests
- Add new tests for new functionality
- Ensure all tests pass before submitting your changes

5. **Submit a Pull Request**
- Provide a clear description of your changes
- Reference any related issues
- Be prepared to respond to feedback and make adjustments

6. **Code Review**
- Address any comments or suggestions from reviewers
- Make necessary changes and push updates to your branch

7. **Merge**
- Once approved, your changes will be merged into the main branch

### Documentation Improvements

Improvements to documentation are always appreciated! If you see areas that could be clarified or expanded, feel free to make the changes and submit a pull request.
Expand Down Expand Up @@ -98,4 +207,7 @@ This command generates a JWT token that will be valid for 10 days.
##### Troubleshooting
- Ensure that all required Docker images are available.
- Check for missing environment variables in the `.env` file.
- Use the `docker compose logs` command to view detailed logs for debugging.
- Use the `docker compose logs` command to view detailed logs for debugging.


Remember, contributions aren't limited to code. Documentation improvements, bug reports, and feature suggestions are also valuable contributions to the project.
26 changes: 16 additions & 10 deletions agents-api/agents_api/autogen/Tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ class CaseThen(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
| ReturnStep
| SleepStep
| ErrorWorkflowStep
| YieldStep
| WaitForInputStep
)
"""
Expand All @@ -63,10 +63,10 @@ class CaseThenUpdateItem(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
| ReturnStep
| SleepStep
| ErrorWorkflowStep
| YieldStep
| WaitForInputStep
)
"""
Expand Down Expand Up @@ -130,10 +130,10 @@ class CreateTaskRequest(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
| ReturnStep
| SleepStep
| ErrorWorkflowStep
| YieldStep
| WaitForInputStep
| IfElseWorkflowStep
| SwitchStep
Expand Down Expand Up @@ -227,6 +227,7 @@ class ForeachDo(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
)
"""
The steps to run for each iteration
Expand All @@ -251,6 +252,7 @@ class ForeachDoUpdateItem(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
)
"""
The steps to run for each iteration
Expand Down Expand Up @@ -324,10 +326,10 @@ class IfElseWorkflowStep(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
| ReturnStep
| SleepStep
| ErrorWorkflowStep
| YieldStep
| WaitForInputStep
)
"""
Expand All @@ -342,10 +344,10 @@ class IfElseWorkflowStep(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
| ReturnStep
| SleepStep
| ErrorWorkflowStep
| YieldStep
| WaitForInputStep
| None,
Field(None, alias="else"),
Expand Down Expand Up @@ -376,10 +378,10 @@ class IfElseWorkflowStepUpdateItem(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
| ReturnStep
| SleepStep
| ErrorWorkflowStep
| YieldStep
| WaitForInputStep
)
"""
Expand All @@ -394,10 +396,10 @@ class IfElseWorkflowStepUpdateItem(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
| ReturnStep
| SleepStep
| ErrorWorkflowStep
| YieldStep
| WaitForInputStep
| None,
Field(None, alias="else"),
Expand Down Expand Up @@ -462,6 +464,7 @@ class Main(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
)
"""
The steps to run for each iteration
Expand Down Expand Up @@ -503,6 +506,7 @@ class MainModel(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
)
"""
The steps to run for each iteration
Expand Down Expand Up @@ -543,6 +547,7 @@ class ParallelStep(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
],
Field(max_length=100),
]
Expand All @@ -569,6 +574,7 @@ class ParallelStepUpdateItem(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
],
Field(max_length=100),
]
Expand Down Expand Up @@ -596,10 +602,10 @@ class PatchTaskRequest(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
| ReturnStep
| SleepStep
| ErrorWorkflowStep
| YieldStep
| WaitForInputStep
| IfElseWorkflowStepUpdateItem
| SwitchStepUpdateItem
Expand Down Expand Up @@ -874,10 +880,10 @@ class Task(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
| ReturnStep
| SleepStep
| ErrorWorkflowStep
| YieldStep
| WaitForInputStep
| IfElseWorkflowStep
| SwitchStep
Expand Down Expand Up @@ -1009,10 +1015,10 @@ class UpdateTaskRequest(BaseModel):
| LogStep
| EmbedStep
| SearchStep
| YieldStep
| ReturnStep
| SleepStep
| ErrorWorkflowStep
| YieldStep
| WaitForInputStep
| IfElseWorkflowStep
| SwitchStep
Expand Down
Loading

0 comments on commit fb32a44

Please sign in to comment.