Skip to content

Future-Outlier/flyte-custom-agent-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

flyte-custom-agent-template

How to write your custom agent and build it with a Dockerfile.

Concepts

  1. flytekit will load plugin here, so you must add your plugin to entry_points in setup.py.
  2. Agent registration is triggered by loading the plugin. For example, BigQuery's agent registration is triggered here

Build your custom agent

  1. Following the folder structure in this repo, you can build your custom agent.
  2. Build your own custom agent (learn more)

In the following command, localhost:30000 is the Docker registry that ships with the Flyte demo cluster. Use it or replace it with a registry where you have push permissions.

docker buildx build --platform linux/amd64 -t localhost:30000/flyteagent:custom-agent -f Dockerfile .
  1. Test the image:
docker run -it localhost:30000/flyteagent:custom-agent
  1. Check the logs (sensor is created by flytekit, bigquery and openai is created by the custom agent)
(dev) future@outlier ~ % docker run -it localhost:30000/flyteagent:custom-agent
    
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
🚀 Starting the agent service...
Starting up the server to expose the prometheus metrics...
                       Agent Metadata                       
┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ Agent Name     ┃ Support Task Types            ┃ Is Sync ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━┩
│ Sensor         │ sensor (v0)                   │ False   │
│ ChatGPT Agent  │ chatgpt (v0)                  │ True    │
│ Bigquery Agent │ bigquery_query_job_task (v0)  │ False   │
└────────────────┴───────────────────────────────┴─────────┘

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •