System Analysis

Agent for prompt interpretation

Overview

Overview

This service is responsible for handling incoming requests, ensuring their validity by cross-referencing pre-existing data stored in the database. Once validated, it carries out the necessary database operations to process the request. Additionally, it provides tools that facilitate the invocation of code or the deployment of agents when needed. This ensures that the entire lifecycle of a request, from reception to the execution of necessary functions or agents, is managed efficiently and securely.

Key Functions

  1. Incoming Request Handling

    • Receives and processes all incoming requests.

    • Ensures that requests are correctly formatted and contain all required information.

  2. Request Validation

    • Cross-references each request with pre-existing data stored in the database.

    • Validates the request to ensure that it meets all necessary criteria and constraints.

  3. Database Operations

    • Once validated, initiates the required database operations.

    • These operations may include fetching data, updating records, or adding new entries.

  4. Code Invocation and Agent Deployment

    • Generates necessary tools for invoking additional code or deploying agents.

    • Ensures that these operations are performed seamlessly and integrate well with the existing system.

Process Workflow

  1. Reception

    • An incoming request is received by the service.

    • Initial checks are performed to ensure that the request is properly formatted.

  2. Validation

    • The request is validated against the data stored in the database.

    • Any discrepancies or issues are flagged, and the request may be rejected if it fails validation.

  3. Database Interaction

    • Validated requests trigger the necessary database operations.

    • The database is queried or updated as needed to fulfill the request.

  4. Tool Generation

    • Tools for code invocation or agent deployment are generated as needed.

    • These tools enable further processing and automation where required.

  5. Execution

    • The generated tools are used to execute the required code or deploy agents.

    • The request lifecycle is completed, ensuring all necessary actions have been taken.

Benefits

  • Efficiency: Streamlines the processing of requests by automating validation and database operations.

  • Security: Ensures that only valid requests proceed, reducing the risk of errors or malicious activity.

  • Flexibility: Provides tools for additional processing or deployment, enabling a wide range of applications.

Parameters

Name
Type
Required
Description

request

string

Request Resume as a JSON

scheme

object

The data example or parameters for your function to work

return

object

The data example of your expected return

data

object

parameters for the function to execute

Prompt Example

request = "crea un post" 
data = {title:" el título", content:"el content"} 
return = {post_id: "el id"} 
scheme = [ { "table": "posts", "columns": [ { "column_name": "id", "data_type": "integer", "is_nullable": "NO" }, { "column_name": "created_at", "data_type": "timestamp without time zone", "is_nullable": "YES" }, { "column_name": "user_id", "data_type": "integer", "is_nullable": "YES", "foreign_key": "posts_user_id_fkey" }, { "column_name": "title", "data_type": "character varying", "is_nullable": "NO" }, { "column_name": "content", "data_type": "text", "is_nullable": "YES" } ] }]

Response Object

Name
Type
Description

tools

array

The list of tools for functions or agents to be used

database_operations

array

The list of database operations to extend the scheme

Result Example

{ "request": "crea un post", "data": { "title": "el título", "content": "el content" }, "tools": [ { "type": "function", "name": "create_post", "description": "creates a new post in the posts collection and returns the id", "return": "post_id", "params": ["title", "content"] } ], "database_operations": [] }

Last updated

Was this helpful?