Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
# Declare your Agent
agent = Agent('Smith')
agent.set_token('your openai api token')
agent.set_role('AI program in the Matrix')

# Add Instructions
agent.add_instruction('your written instruction 1')
agent.add_instruction('your written instruction 2')

# Provide Knowledge
agent.set_knowledge('any string')

# If you want to scale it on issues, create a text field and pass set it as follows;
agent.set_state_field('customfield_100xx') # with your actual field
Id.
agent.set_state('Investigating') # thisThis will update the field on issues so you can query the agent state via jql
agent.set_state('Investigating') 

# Ask something to your agent
response = agent.process('any string input')

...