ResearcherContainer
This module interacts with an AI Agent hosted in Modal.It carries out research on a company; what they do and who its users are, grouping them into user personas.
It does this by interacting with a web automation tool to browse the internet. It generates paths the agent should explore.
Exploring these paths returns keywords and adtext. This data is written into a MongoDB collection matching the company's name.
Args:
business_name (str): Name of the business
personas (str): The user personas
connection (Secret): Mongo connection string
modal_entry_point: web entry point to AI Agent deployed in Modal
Returns:
- Success if data is successfully written to MongoDB
Installation
dagger install github.com/EmmS21/daggerverse/ResearcherContainer@bd0e80d862e048ff0033b305e33c935b8ae40da3
Entrypoint
Return Type
ResearcherContainer !
Example
dagger -m github.com/EmmS21/daggerverse/ResearcherContainer@bd0e80d862e048ff0033b305e33c935b8ae40da3 call \
func (m *myModule) example() *ResearcherContainer {
return dag.
ResearcherContainer()
}
@function
def example() -> dag.ResearcherContainer:
return (
dag.researcher_container()
)
@func()
example(): ResearcherContainer {
return dag
.researcherContainer()
}
Types
ResearcherContainer 🔗
run() 🔗
Calls marketing agent with business and persona data, then writes results to MongoDB.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
businessName | String ! | - | No description provided |
personas | String ! | - | No description provided |
connection | Secret ! | - | A reference to a secret value, which can be handled more safely than the value itself. |
modalEntryPoint | Secret ! | - | A reference to a secret value, which can be handled more safely than the value itself. |
Example
dagger -m github.com/EmmS21/daggerverse/ResearcherContainer@bd0e80d862e048ff0033b305e33c935b8ae40da3 call \
run --business-name string --personas string --connection env:MYSECRET --modal-entry-point env:MYSECRET
func (m *myModule) example(ctx context.Context, businessName string, personas string, connection *Secret, modalEntryPoint *Secret) string {
return dag.
ResearcherContainer().
Run(ctx, businessName, personas, connection, modalEntryPoint)
}
@function
async def example(business_name: str, personas: str, connection: dagger.Secret, modal_entry_point: dagger.Secret) -> str:
return await (
dag.researcher_container()
.run(business_name, personas, connection, modal_entry_point)
)
@func()
async example(businessName: string, personas: string, connection: Secret, modalEntryPoint: Secret): Promise<string> {
return dag
.researcherContainer()
.run(businessName, personas, connection, modalEntryPoint)
}