Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port the agent(s) to Python #39

Open
bracesproul opened this issue Oct 15, 2024 · 12 comments
Open

Port the agent(s) to Python #39

bracesproul opened this issue Oct 15, 2024 · 12 comments
Labels

Comments

@bracesproul
Copy link
Member

It would be great if both agents were ported to Python and included in this repo.

@bracesproul bracesproul added the ai label Oct 15, 2024
@siddicky
Copy link

What would the project structure look like. Split it into frontend and backend (langgraph template) design?

@bracesproul
Copy link
Member Author

@siddicky I'm thinking:

js-agent/
py-agent/
frontend/

With src/agent/ being moved into js-agent/

@snifhex
Copy link
Contributor

snifhex commented Oct 17, 2024

Hey @bracesproul Is someone working on this? If not, I would like to try this

@siddicky
Copy link

siddicky commented Oct 17, 2024

@snifhex Which agent would you like to work on first?
I created initial project structure and planned to make a PR over the weekend. Though haven't started actual port yet.

So far: Port Branch

@snifhex
Copy link
Contributor

snifhex commented Oct 18, 2024

@siddicky I was planning to port reflection first.

@snifhex
Copy link
Contributor

snifhex commented Oct 18, 2024

@bracesproul Do you think it will be good idea to do something like this

frontend/
agent/js
agent/py
agent/prompts.json

have prompts in some universal format which js or py can use like json or something or do we want to have them seperate and duplicate for pormpt content is okay??

@bracesproul
Copy link
Member Author

@bracesproul Do you think it will be good idea to do something like this


frontend/

agent/js

agent/py

agent/prompts.json

have prompts in some universal format which js or py can use like json or something or do we want to have them seperate and duplicate for pormpt content is okay??

@snifhex yeah i like that structure. Only thing id change is I would put the prompts into individual .txt files inside a prompts/ dir (nested inside agent/)

This way we don't need to deal with any sort of quote escaping or new lines etc that a json file would require us to deal with.

@snifhex
Copy link
Contributor

snifhex commented Oct 18, 2024

@bracesproul Yeah that sounds good.

So final structure would look something like this:

frontend/
agent/js
agent/py
agent/prompts/open-canvas.txt
agent/prompts/reflection.txt

@bracesproul
Copy link
Member Author

@bracesproul Yeah that sounds good.

So final structure would look something like this:


frontend/

agent/js

agent/py

agent/prompts/open-canvas.txt

agent/prompts/reflection.txt

Yeah exactly. But note there's like 10 diff prompts inside open canvas so maybe even have the structure be:

agent/prompts/open-canvas/...

agent/prompts/reflection/...

(Reflection only has a single prompt but will def have more in the future)

@santosshima
Copy link

py-agent in this case would be based in LangGraph? Would love to have this feature

@IsraelShok
Copy link

Hi @bracesproul, is anyone working on the Python port?
I can try to do this, but I'm not fluent in JS and TS, so I'll need to know what is backend and what's frontend.
Do you have such a separation you can share?

Thanks

@bracesproul
Copy link
Member Author

hey @IsraelShok the only code you need to port is the code inside the src/agent/** directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

5 participants